Sub: Log manual control failsafe occurances

This commit is contained in:
Jacob Walser 2017-01-30 13:10:22 -05:00 committed by Andrew Tridgell
parent 852374ab4d
commit 3e97cc5b46
2 changed files with 2 additions and 1 deletions

View File

@ -348,7 +348,7 @@ enum LoiterModeState {
// Error message sub systems and error codes // Error message sub systems and error codes
#define ERROR_SUBSYSTEM_MAIN 1 #define ERROR_SUBSYSTEM_MAIN 1
#define ERROR_SUBSYSTEM_RADIO 2 #define ERROR_SUBSYSTEM_INPUT 2
#define ERROR_SUBSYSTEM_COMPASS 3 #define ERROR_SUBSYSTEM_COMPASS 3
#define ERROR_SUBSYSTEM_OPTFLOW 4 #define ERROR_SUBSYSTEM_OPTFLOW 4
#define ERROR_SUBSYSTEM_FAILSAFE_RADIO 5 #define ERROR_SUBSYSTEM_FAILSAFE_RADIO 5

View File

@ -40,6 +40,7 @@ void Sub::failsafe_manual_control_check() {
failsafe.manual_control = true; failsafe.manual_control = true;
set_neutral_controls(); set_neutral_controls();
init_disarm_motors(); init_disarm_motors();
Log_Write_Error(ERROR_SUBSYSTEM_INPUT, ERROR_CODE_FAILSAFE_OCCURRED);
gcs_send_text(MAV_SEVERITY_CRITICAL, "Lost manual control"); gcs_send_text(MAV_SEVERITY_CRITICAL, "Lost manual control");
} }
return; return;