mirror of https://github.com/ArduPilot/ardupilot
AP_Logger: Fix logging of current on non primary instances
This commit is contained in:
parent
ef7f8531fb
commit
05d104675e
|
@ -643,7 +643,7 @@ void AP_Logger::Write_Current_instance(const uint64_t time_us,
|
|||
float temp;
|
||||
bool has_temp = battery.get_temperature(temp, battery_instance);
|
||||
float current, consumed_mah, consumed_wh;
|
||||
if (!battery.current_amps(current)) {
|
||||
if (!battery.current_amps(current, battery_instance)) {
|
||||
current = quiet_nanf();
|
||||
}
|
||||
if (!battery.consumed_mah(consumed_mah, battery_instance)) {
|
||||
|
|
Loading…
Reference in New Issue