Plane: set heartbeat.system_status to Critical for low-battery failsafe events

This commit is contained in:
Tom Pittenger 2016-06-07 17:13:10 -07:00
parent 263931b4b1
commit 204abfd45e
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ void Plane::send_heartbeat(mavlink_channel_t chan)
uint8_t system_status;
uint32_t custom_mode = control_mode;
if (failsafe.state != FAILSAFE_NONE) {
if (failsafe.state != FAILSAFE_NONE || failsafe.low_battery) {
system_status = MAV_STATE_CRITICAL;
} else if (plane.crash_state.is_crashed) {
system_status = MAV_STATE_EMERGENCY;