|
|
|
@ -2220,6 +2220,22 @@ void GCS_MAVLINK::send_gps_global_origin() const
@@ -2220,6 +2220,22 @@ void GCS_MAVLINK::send_gps_global_origin() const
|
|
|
|
|
AP_HAL::micros64()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
MAV_STATE GCS_MAVLINK::system_status() const |
|
|
|
|
{ |
|
|
|
|
MAV_STATE _system_status = vehicle_system_status(); |
|
|
|
|
if (_system_status < MAV_STATE_CRITICAL) { |
|
|
|
|
// note that POWEROFF and FLIGHT_TERMINATION are both >
|
|
|
|
|
// CRITICAL, so we will not overwrite POWEROFF and
|
|
|
|
|
// FLIGHT_TERMINATION even if we have internal errors. If new
|
|
|
|
|
// enum entries are added then this may also not overwrite
|
|
|
|
|
// those.
|
|
|
|
|
if (AP::internalerror().errors()) { |
|
|
|
|
_system_status = MAV_STATE_CRITICAL; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return _system_status; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
Send MAVLink heartbeat |
|
|
|
|
*/ |
|
|
|
|