Browse Source

Plane: enable fixed wing autotune switch

c415-sdk
Andrew Tridgell 3 years ago committed by Randy Mackay
parent
commit
845e2ab888
  1. 5
      ArduPlane/RC_Channel.cpp
  2. 2
      ArduPlane/control_modes.cpp

5
ArduPlane/RC_Channel.cpp

@ -161,6 +161,7 @@ void RC_Channel_Plane::init_aux_function(const RC_Channel::aux_func_t ch_option, @@ -161,6 +161,7 @@ void RC_Channel_Plane::init_aux_function(const RC_Channel::aux_func_t ch_option,
case AUX_FUNC::LANDING_FLARE:
case AUX_FUNC::PARACHUTE_RELEASE:
case AUX_FUNC::MODE_SWITCH_RESET:
case AUX_FUNC::FW_AUTOTUNE:
break;
case AUX_FUNC::Q_ASSIST:
@ -318,6 +319,10 @@ case AUX_FUNC::ARSPD_CALIBRATE: @@ -318,6 +319,10 @@ case AUX_FUNC::ARSPD_CALIBRATE:
plane.reset_control_switch();
break;
case AUX_FUNC::FW_AUTOTUNE:
plane.autotune_enable(ch_flag == AuxSwitchPos::HIGH);
break;
default:
return RC_Channel::do_aux_function(ch_option, ch_flag);
}

2
ArduPlane/control_modes.cpp

@ -148,6 +148,7 @@ void Plane::reset_control_switch() @@ -148,6 +148,7 @@ void Plane::reset_control_switch()
*/
void Plane::autotune_start(void)
{
gcs().send_text(MAV_SEVERITY_INFO, "Started autotune");
rollController.autotune_start();
pitchController.autotune_start();
}
@ -159,6 +160,7 @@ void Plane::autotune_restore(void) @@ -159,6 +160,7 @@ void Plane::autotune_restore(void)
{
rollController.autotune_restore();
pitchController.autotune_restore();
gcs().send_text(MAV_SEVERITY_INFO, "Stopped autotune");
}
/*

Loading…
Cancel
Save