Plane: prevent stability shutdown in transition
this prevents the vertical motors from shutting down while transitioning if the desired throttle was too low at the start of the transition
This commit is contained in:
parent
0d4405106f
commit
07cedd8a66
@ -1065,8 +1065,10 @@ void QuadPlane::update_transition(void)
|
||||
}
|
||||
float trans_time_ms = (float)transition_time_ms.get();
|
||||
float throttle_scaled = last_throttle * (trans_time_ms - (millis() - transition_start_ms)) / trans_time_ms;
|
||||
if (throttle_scaled < 0) {
|
||||
throttle_scaled = 0;
|
||||
if (throttle_scaled < 0.01) {
|
||||
// ensure we don't drop all the way to zero or the motors
|
||||
// will stop stabilizing
|
||||
throttle_scaled = 0.01;
|
||||
}
|
||||
assisted_flight = true;
|
||||
hold_stabilize(throttle_scaled);
|
||||
|
Loading…
Reference in New Issue
Block a user