Browse Source

AC_AutoTune; minor format fixes

master
Randy Mackay 6 years ago
parent
commit
c5a2065a86
  1. 5
      libraries/AC_AutoTune/AC_AutoTune.cpp

5
libraries/AC_AutoTune/AC_AutoTune.cpp

@ -350,14 +350,13 @@ void AC_AutoTune::run()
// if not auto armed or motor interlock not enabled set throttle to zero and exit immediately // if not auto armed or motor interlock not enabled set throttle to zero and exit immediately
// this should not actually be possible because of the init() checks // this should not actually be possible because of the init() checks
if (!motors->armed() || !motors->get_interlock()) { if (!motors->armed() || !motors->get_interlock()) {
motors->set_desired_spool_state(AP_Motors::DESIRED_SPIN_WHEN_ARMED); motors->set_desired_spool_state(AP_Motors::DESIRED_SPIN_WHEN_ARMED);
attitude_control->set_throttle_out_unstabilized(0.0f, true, 0); attitude_control->set_throttle_out_unstabilized(0.0f, true, 0);
pos_control->relax_alt_hold_controllers(0.0f); pos_control->relax_alt_hold_controllers(0.0f);
return; return;
} }
int32_t target_roll_cd, target_pitch_cd, target_yaw_rate_cds; int32_t target_roll_cd, target_pitch_cd, target_yaw_rate_cds;
get_pilot_desired_rp_yrate_cd(target_roll_cd, target_pitch_cd, target_yaw_rate_cds); get_pilot_desired_rp_yrate_cd(target_roll_cd, target_pitch_cd, target_yaw_rate_cds);
@ -651,7 +650,6 @@ void AC_AutoTune::control_attitude()
// re-enable rate limits // re-enable rate limits
attitude_control->use_sqrt_controller(true); attitude_control->use_sqrt_controller(true);
// log the latest gains // log the latest gains
if ((tune_type == SP_DOWN) || (tune_type == SP_UP)) { if ((tune_type == SP_DOWN) || (tune_type == SP_UP)) {
switch (axis) { switch (axis) {
@ -679,7 +677,6 @@ void AC_AutoTune::control_attitude()
} }
} }
// Check results after mini-step to increase rate D gain // Check results after mini-step to increase rate D gain
switch (tune_type) { switch (tune_type) {
case RD_UP: case RD_UP:

Loading…
Cancel
Save