Skip to content

Commit

Permalink
AP_BattMonitor: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
OXINARF committed Mar 3, 2018
1 parent 33288fa commit ee8adf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AP_BattMonitor/AP_BattMonitor_UAVCAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void AP_BattMonitor_UAVCAN::handle_bi_msg(float voltage, float current, float te
if (_state.last_time_micros != 0 && dt < 2000000) {
// .0002778 is 1/3600 (conversion to hours)
float mah = (float) ((double) _state.current_amps * (double) dt * (double) 0.0000002778f);
_state.current_total_mah += mah;
_state.consumed_mah += mah;
_state.consumed_wh += 0.001f * mah * _state.voltage;
}

Expand Down

0 comments on commit ee8adf9

Please sign in to comment.