Skip to content

Commit

Permalink
AP_BattMonitor_SMBus: set AP_Notify powering_off flag
Browse files Browse the repository at this point in the history
  • Loading branch information
jschall authored and tridge committed Apr 21, 2016
1 parent dba5518 commit 06ccf88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/AP_BattMonitor/AP_BattMonitor_SMBus_PX4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

#include <AP_HAL/AP_HAL.h>
#include <AP_Notify/AP_Notify.h>

#if CONFIG_HAL_BOARD == HAL_BOARD_PX4

Expand Down Expand Up @@ -70,6 +71,7 @@ void AP_BattMonitor_SMBus_PX4::read()
_state.current_total_mah = batt_status.discharged_mah;
_state.healthy = true;
_state.is_powering_off = batt_status.is_powering_off;
AP_Notify::flags.powering_off = batt_status.is_powering_off;

// read capacity
if ((_batt_fd >= 0) && !_capacity_updated) {
Expand Down

0 comments on commit 06ccf88

Please sign in to comment.