Skip to content

Commit

Permalink
AP_Logger: Fix logging of current on non primary instances
Browse files Browse the repository at this point in the history
  • Loading branch information
WickedShell authored and tridge committed Oct 10, 2019
1 parent ef7f853 commit 05d1046
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AP_Logger/LogFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 05d1046

Please sign in to comment.