|
|
|
@ -259,8 +259,7 @@ private:
@@ -259,8 +259,7 @@ private:
|
|
|
|
|
|
|
|
|
|
// Failsafe
|
|
|
|
|
struct { |
|
|
|
|
uint8_t rc_override_active : 1; // 0 // true if rc control are overwritten by ground station
|
|
|
|
|
uint8_t manual_control : 1; // 1 // A status flag for the radio failsafe
|
|
|
|
|
uint8_t pilot_input : 1; // true if pilot input failsafe is active, handles things like joystick being disconnected during operation
|
|
|
|
|
uint8_t battery : 1; // 2 // A status flag for the battery failsafe
|
|
|
|
|
uint8_t gcs : 1; // 4 // A status flag for the ground station failsafe
|
|
|
|
|
uint8_t ekf : 1; // 5 // true if ekf failsafe has occurred
|
|
|
|
@ -273,7 +272,7 @@ private:
@@ -273,7 +272,7 @@ private:
|
|
|
|
|
uint32_t last_gcs_warn_ms; |
|
|
|
|
|
|
|
|
|
uint32_t last_heartbeat_ms; // the time when the last HEARTBEAT message arrived from a GCS - used for triggering gcs failsafe
|
|
|
|
|
uint32_t last_manual_control_ms; // last time MANUAL_CONTROL message arrived from GCS
|
|
|
|
|
uint32_t last_pilot_input_ms; // last time we received pilot input in the form of MANUAL_CONTROL or RC_CHANNELS_OVERRIDE messages
|
|
|
|
|
uint32_t terrain_first_failure_ms; // the first time terrain data access failed - used to calculate the duration of the failure
|
|
|
|
|
uint32_t terrain_last_failure_ms; // the most recent time terrain data access failed
|
|
|
|
|
uint32_t last_battery_warn_ms; // last time a battery failsafe warning was sent to gcs
|
|
|
|
@ -595,7 +594,7 @@ private:
@@ -595,7 +594,7 @@ private:
|
|
|
|
|
void failsafe_ekf_check(void); |
|
|
|
|
void failsafe_battery_check(void); |
|
|
|
|
void failsafe_gcs_check(); |
|
|
|
|
void failsafe_manual_control_check(void); |
|
|
|
|
void failsafe_pilot_input_check(void); |
|
|
|
|
void set_neutral_controls(void); |
|
|
|
|
void failsafe_terrain_check(); |
|
|
|
|
void failsafe_terrain_set_status(bool data_ok); |
|
|
|
|