Plane: fixed use of multicopter mix_max

we need a settable mix_max for some vehicles
This commit is contained in:
Andrew Tridgell 2016-09-21 11:46:15 +10:00
parent 5512b6de02
commit dac7f45326
2 changed files with 13 additions and 3 deletions

View File

@ -1006,7 +1006,7 @@ void QuadPlane::update_transition(void)
}
assisted_flight = true;
hold_hover(assist_climb_rate_cms());
attitude_control->rate_controller_run();
run_rate_controller();
motors_output();
last_throttle = motors->get_throttle();
break;
@ -1027,7 +1027,7 @@ void QuadPlane::update_transition(void)
}
assisted_flight = true;
hold_stabilize(throttle_scaled);
attitude_control->rate_controller_run();
run_rate_controller();
motors_output();
break;
}
@ -1041,6 +1041,15 @@ void QuadPlane::update_transition(void)
}
}
/*
run multicopter rate controller
*/
void QuadPlane::run_rate_controller(void)
{
attitude_control->set_throttle_mix_max();
attitude_control->rate_controller_run();
}
/*
update motor output for quadplane
*/
@ -1067,7 +1076,7 @@ void QuadPlane::update(void)
assisted_flight = false;
// run low level rate controllers
attitude_control->rate_controller_run();
run_rate_controller();
// output to motors
motors_output();

View File

@ -168,6 +168,7 @@ private:
void init_hover(void);
void control_hover(void);
void run_rate_controller(void);
void init_loiter(void);
void init_land(void);