ardupilot/libraries/SITL/SIM_BattMonitor_SMBus_Gener...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1023 B
C
Raw Normal View History

2020-10-20 19:41:31 -03:00
#include "SIM_BattMonitor_SMBus.h"
#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;
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 { return 12; }
2020-10-20 19:41:31 -03:00
virtual uint8_t connected_cells() const { return 3; }
2020-10-20 19:41:31 -03:00
};
} // namespace SITL