mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 17:38:32 -04:00
AP_BattMonitor: use separate register_driver method while contructing CAN Driver
This commit is contained in:
parent
cf535481e9
commit
b8c2a18eaf
@ -20,8 +20,10 @@ public:
|
|||||||
// construct the CAN Sensor
|
// construct the CAN Sensor
|
||||||
AP_BattMonitor_MPPT_PacketDigital(AP_BattMonitor &mon, AP_BattMonitor::BattMonitor_State &mon_state, AP_BattMonitor_Params ¶ms):
|
AP_BattMonitor_MPPT_PacketDigital(AP_BattMonitor &mon, AP_BattMonitor::BattMonitor_State &mon_state, AP_BattMonitor_Params ¶ms):
|
||||||
AP_BattMonitor_Backend(mon, mon_state, params),
|
AP_BattMonitor_Backend(mon, mon_state, params),
|
||||||
CANSensor("MPPT", AP_CANManager::Driver_Type_MPPT_PacketDigital)
|
CANSensor("MPPT")
|
||||||
{ };
|
{
|
||||||
|
register_driver(AP_CANManager::Driver_Type_MPPT_PacketDigital);
|
||||||
|
}
|
||||||
|
|
||||||
/// Read the battery voltage and current. Should be called at 10hz
|
/// Read the battery voltage and current. Should be called at 10hz
|
||||||
void read() override;
|
void read() override;
|
||||||
|
Loading…
Reference in New Issue
Block a user