mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Copter: add SIMPLE_HEADING_RESET RCx_OPTION
This commit is contained in:
parent
1f7023b580
commit
ed83edc2a6
@ -90,6 +90,7 @@ void RC_Channel_Copter::init_aux_function(const aux_func_t ch_option, const AuxS
|
|||||||
case AUX_FUNC::ACRO:
|
case AUX_FUNC::ACRO:
|
||||||
case AUX_FUNC::AUTO_RTL:
|
case AUX_FUNC::AUTO_RTL:
|
||||||
case AUX_FUNC::TURTLE:
|
case AUX_FUNC::TURTLE:
|
||||||
|
case AUX_FUNC::SIMPLE_HEADING_RESET:
|
||||||
break;
|
break;
|
||||||
case AUX_FUNC::ACRO_TRAINER:
|
case AUX_FUNC::ACRO_TRAINER:
|
||||||
case AUX_FUNC::ATTCON_ACCEL_LIM:
|
case AUX_FUNC::ATTCON_ACCEL_LIM:
|
||||||
@ -575,6 +576,13 @@ bool RC_Channel_Copter::do_aux_function(const aux_func_t ch_option, const AuxSwi
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case AUX_FUNC::SIMPLE_HEADING_RESET:
|
||||||
|
if (ch_flag == AuxSwitchPos::HIGH) {
|
||||||
|
copter.init_simple_bearing();
|
||||||
|
gcs().send_text(MAV_SEVERITY_INFO, "Simple heading reset");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return RC_Channel::do_aux_function(ch_option, ch_flag);
|
return RC_Channel::do_aux_function(ch_option, ch_flag);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user