AP_BattMonitor: DroneCAN: always have consumed energy

This commit is contained in:
Iampete1 2023-10-13 13:00:41 +01:00 committed by Andrew Tridgell
parent 7713b531a0
commit 816b92346e
2 changed files with 2 additions and 3 deletions

View File

@ -157,7 +157,6 @@ void AP_BattMonitor_DroneCAN::handle_battery_info_aux(const ardupilot_equipment_
_has_cell_voltages = true;
_has_time_remaining = true;
_has_consumed_energy = true;
_has_battery_info_aux = true;
}

View File

@ -35,7 +35,8 @@ public:
bool has_current() const override { return true; }
bool has_consumed_energy() const override { return _has_consumed_energy; }
// Always have consumed energy, either directly from BatteryInfoAux msg or by cumulative current draw
bool has_consumed_energy() const override { return true; }
bool has_time_remaining() const override { return _has_time_remaining; }
@ -99,7 +100,6 @@ private:
bool _has_temperature;
bool _has_cell_voltages;
bool _has_time_remaining;
bool _has_consumed_energy;
bool _has_battery_info_aux;
uint8_t _instance; // instance of this battery monitor