2020-10-20 19:41:31 -03:00
|
|
|
#include "SIM_BattMonitor_SMBus.h"
|
|
|
|
|
2020-11-11 00:03:49 -04:00
|
|
|
#pragma once
|
|
|
|
|
2020-10-20 19:41:31 -03:00
|
|
|
namespace SITL {
|
|
|
|
|
|
|
|
class SMBusBattGenericDevReg : public SMBusBattDevReg {
|
|
|
|
public:
|
|
|
|
static const uint8_t CELL1 = 0x3f;
|
|
|
|
static const uint8_t CELL2 = 0x3e;
|
|
|
|
static const uint8_t CELL3 = 0x3d;
|
|
|
|
static const uint8_t CELL4 = 0x3c;
|
|
|
|
static const uint8_t CELL5 = 0x3b;
|
|
|
|
static const uint8_t CELL6 = 0x3a;
|
|
|
|
static const uint8_t CELL7 = 0x39;
|
|
|
|
static const uint8_t CELL8 = 0x38;
|
|
|
|
static const uint8_t CELL9 = 0x37;
|
|
|
|
static const uint8_t CELL10 = 0x36;
|
|
|
|
static const uint8_t CELL11 = 0x35;
|
|
|
|
static const uint8_t CELL12 = 0x34;
|
2021-06-08 02:22:42 -03:00
|
|
|
static const uint8_t CELL13 = 0x33;
|
|
|
|
static const uint8_t CELL14 = 0x32;
|
2020-10-20 19:41:31 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
class SIM_BattMonitor_SMBus_Generic : public SIM_BattMonitor_SMBus
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
SIM_BattMonitor_SMBus_Generic();
|
|
|
|
void init() override;
|
|
|
|
void update(const class Aircraft &aircraft) override;
|
|
|
|
|
|
|
|
virtual uint8_t cellcount() const = 0;
|
|
|
|
|
2021-06-08 02:22:42 -03:00
|
|
|
virtual uint8_t connected_cells() const { return 3; }
|
2020-10-20 19:41:31 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace SITL
|