2024-12-12 08:05:43 -04:00
|
|
|
#include "SIM_config.h"
|
|
|
|
|
|
|
|
#if AP_SIM_BATT_MONITOR_SMBUS_ROTOYE_ENABLED
|
|
|
|
|
2020-11-11 00:03:49 -04:00
|
|
|
#include "SIM_BattMonitor_SMBus_Generic.h"
|
|
|
|
|
|
|
|
#include <AP_Common/Bitmask.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
Testing:
|
|
|
|
|
|
|
|
param set BATT_MONITOR 19
|
|
|
|
reboot
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace SITL {
|
|
|
|
|
|
|
|
class SMBusBattRotoyeDevReg : public SMBusBattGenericDevReg {
|
|
|
|
public:
|
2022-09-19 21:27:08 -03:00
|
|
|
static const uint8_t TEMP_EXT = 0x48;
|
2020-11-11 00:03:49 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
class Rotoye : public SIM_BattMonitor_SMBus_Generic
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
Rotoye();
|
|
|
|
|
|
|
|
uint8_t cellcount() const override { return 3; }
|
|
|
|
|
|
|
|
void update(const class Aircraft &aircraft) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
uint32_t last_temperature_update_ms;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace SITL
|
2024-12-12 08:05:43 -04:00
|
|
|
|
|
|
|
#endif // AP_SIM_BATT_MONITOR_SMBUS_ROTOYE_ENABLED
|