@ -22,15 +22,15 @@ void Copter::failsafe_radio_on_event()
@@ -22,15 +22,15 @@ void Copter::failsafe_radio_on_event()
// continue landing or other high priority failsafes
} else {
if ( g . failsafe_throttle = = FS_THR_ENABLED_ALWAYS_RTL ) {
set_mode_RTL_or_land_with_pause ( MODE_REASON_ RADIO_FAILSAFE ) ;
set_mode_RTL_or_land_with_pause ( ModeReason : : RADIO_FAILSAFE ) ;
} else if ( g . failsafe_throttle = = FS_THR_ENABLED_CONTINUE_MISSION ) {
set_mode_RTL_or_land_with_pause ( MODE_REASON_ RADIO_FAILSAFE ) ;
set_mode_RTL_or_land_with_pause ( ModeReason : : RADIO_FAILSAFE ) ;
} else if ( g . failsafe_throttle = = FS_THR_ENABLED_ALWAYS_SMARTRTL_OR_RTL ) {
set_mode_SmartRTL_or_RTL ( MODE_REASON_ RADIO_FAILSAFE ) ;
set_mode_SmartRTL_or_RTL ( ModeReason : : RADIO_FAILSAFE ) ;
} else if ( g . failsafe_throttle = = FS_THR_ENABLED_ALWAYS_SMARTRTL_OR_LAND ) {
set_mode_SmartRTL_or_land_with_pause ( MODE_REASON_ RADIO_FAILSAFE ) ;
set_mode_SmartRTL_or_land_with_pause ( ModeReason : : RADIO_FAILSAFE ) ;
} else { // g.failsafe_throttle == FS_THR_ENABLED_ALWAYS_LAND
set_mode_land_with_pause ( MODE_REASON_ RADIO_FAILSAFE ) ;
set_mode_land_with_pause ( ModeReason : : RADIO_FAILSAFE ) ;
}
}
}
@ -61,16 +61,16 @@ void Copter::handle_battery_failsafe(const char *type_str, const int8_t action)
@@ -61,16 +61,16 @@ void Copter::handle_battery_failsafe(const char *type_str, const int8_t action)
case Failsafe_Action_None :
return ;
case Failsafe_Action_Land :
set_mode_land_with_pause ( MODE_REASON_ BATTERY_FAILSAFE ) ;
set_mode_land_with_pause ( ModeReason : : BATTERY_FAILSAFE ) ;
break ;
case Failsafe_Action_RTL :
set_mode_RTL_or_land_with_pause ( MODE_REASON_ BATTERY_FAILSAFE ) ;
set_mode_RTL_or_land_with_pause ( ModeReason : : BATTERY_FAILSAFE ) ;
break ;
case Failsafe_Action_SmartRTL :
set_mode_SmartRTL_or_RTL ( MODE_REASON_ BATTERY_FAILSAFE ) ;
set_mode_SmartRTL_or_RTL ( ModeReason : : BATTERY_FAILSAFE ) ;
break ;
case Failsafe_Action_SmartRTL_Land :
set_mode_SmartRTL_or_land_with_pause ( MODE_REASON_ BATTERY_FAILSAFE ) ;
set_mode_SmartRTL_or_land_with_pause ( ModeReason : : BATTERY_FAILSAFE ) ;
break ;
case Failsafe_Action_Terminate :
# if ADVANCED_FAILSAFE == ENABLED
@ -138,11 +138,11 @@ void Copter::failsafe_gcs_check()
@@ -138,11 +138,11 @@ void Copter::failsafe_gcs_check()
g . failsafe_gcs = = FS_GCS_ENABLED_CONTINUE_MISSION ) {
// continue mission
} else if ( g . failsafe_gcs = = FS_GCS_ENABLED_ALWAYS_SMARTRTL_OR_RTL ) {
set_mode_SmartRTL_or_RTL ( MODE_REASON_ GCS_FAILSAFE ) ;
set_mode_SmartRTL_or_RTL ( ModeReason : : GCS_FAILSAFE ) ;
} else if ( g . failsafe_gcs = = FS_GCS_ENABLED_ALWAYS_SMARTRTL_OR_LAND ) {
set_mode_SmartRTL_or_land_with_pause ( MODE_REASON_ GCS_FAILSAFE ) ;
set_mode_SmartRTL_or_land_with_pause ( ModeReason : : GCS_FAILSAFE ) ;
} else { // g.failsafe_gcs == FS_GCS_ENABLED_ALWAYS_RTL
set_mode_RTL_or_land_with_pause ( MODE_REASON_ GCS_FAILSAFE ) ;
set_mode_RTL_or_land_with_pause ( ModeReason : : GCS_FAILSAFE ) ;
}
}
}
@ -210,7 +210,7 @@ void Copter::failsafe_terrain_on_event()
@@ -210,7 +210,7 @@ void Copter::failsafe_terrain_on_event()
mode_rtl . restart_without_terrain ( ) ;
# endif
} else {
set_mode_RTL_or_land_with_pause ( MODE_REASON_ TERRAIN_FAILSAFE ) ;
set_mode_RTL_or_land_with_pause ( ModeReason : : TERRAIN_FAILSAFE ) ;
}
}
@ -236,7 +236,7 @@ void Copter::gpsglitch_check()
@@ -236,7 +236,7 @@ void Copter::gpsglitch_check()
// set_mode_RTL_or_land_with_pause - sets mode to RTL if possible or LAND with 4 second delay before descent starts
// this is always called from a failsafe so we trigger notification to pilot
void Copter : : set_mode_RTL_or_land_with_pause ( mode_reason_t reason )
void Copter : : set_mode_RTL_or_land_with_pause ( ModeReason reason )
{
// attempt to switch to RTL, if this fails then switch to Land
if ( ! set_mode ( Mode : : Number : : RTL , reason ) ) {
@ -250,7 +250,7 @@ void Copter::set_mode_RTL_or_land_with_pause(mode_reason_t reason)
@@ -250,7 +250,7 @@ void Copter::set_mode_RTL_or_land_with_pause(mode_reason_t reason)
// set_mode_SmartRTL_or_land_with_pause - sets mode to SMART_RTL if possible or LAND with 4 second delay before descent starts
// this is always called from a failsafe so we trigger notification to pilot
void Copter : : set_mode_SmartRTL_or_land_with_pause ( mode_reason_t reason )
void Copter : : set_mode_SmartRTL_or_land_with_pause ( ModeReason reason )
{
// attempt to switch to SMART_RTL, if this failed then switch to Land
if ( ! set_mode ( Mode : : Number : : SMART_RTL , reason ) ) {
@ -263,7 +263,7 @@ void Copter::set_mode_SmartRTL_or_land_with_pause(mode_reason_t reason)
@@ -263,7 +263,7 @@ void Copter::set_mode_SmartRTL_or_land_with_pause(mode_reason_t reason)
// set_mode_SmartRTL_or_RTL - sets mode to SMART_RTL if possible or RTL if possible or LAND with 4 second delay before descent starts
// this is always called from a failsafe so we trigger notification to pilot
void Copter : : set_mode_SmartRTL_or_RTL ( mode_reason_t reason )
void Copter : : set_mode_SmartRTL_or_RTL ( ModeReason reason )
{
// attempt to switch to SmartRTL, if this failed then attempt to RTL
// if that fails, then land