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