mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
Plane: use axis specific tuning controller error
this gives user feedback on the axis they are tuning
This commit is contained in:
parent
b4bdfa2451
commit
b17c800f44
@ -270,24 +270,29 @@ void AP_Tuning_Plane::reload_value(uint8_t parm)
|
||||
*/
|
||||
float AP_Tuning_Plane::controller_error(uint8_t parm)
|
||||
{
|
||||
if (!plane.quadplane.available()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch(parm) {
|
||||
// special handling of dual-parameters
|
||||
case TUNING_RATE_ROLL_PI:
|
||||
case TUNING_RATE_ROLL_P:
|
||||
case TUNING_RATE_ROLL_I:
|
||||
case TUNING_RATE_ROLL_D:
|
||||
return plane.quadplane.attitude_control->control_monitor_rms_output_roll();
|
||||
|
||||
case TUNING_RATE_PITCH_PI:
|
||||
case TUNING_RATE_PITCH_P:
|
||||
case TUNING_RATE_PITCH_I:
|
||||
case TUNING_RATE_PITCH_D:
|
||||
return plane.quadplane.attitude_control->control_monitor_rms_output_pitch();
|
||||
|
||||
case TUNING_RATE_YAW_PI:
|
||||
case TUNING_RATE_YAW_P:
|
||||
case TUNING_RATE_YAW_I:
|
||||
case TUNING_RATE_YAW_D:
|
||||
if (!plane.quadplane.available()) {
|
||||
return 0;
|
||||
}
|
||||
return plane.quadplane.attitude_control->control_monitor_rms_output();
|
||||
return plane.quadplane.attitude_control->control_monitor_rms_output_yaw();
|
||||
|
||||
default:
|
||||
// no special handler
|
||||
|
Loading…
Reference in New Issue
Block a user