mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 01:11:37 +08:00
mc_pos_control: takeoff fix implicit switch fallthrough
This commit is contained in:
@@ -58,6 +58,7 @@ void Takeoff::updateTakeoffState(const bool armed, const bool landed, const bool
|
||||
break;
|
||||
}
|
||||
|
||||
// FALLTHROUGH
|
||||
case TakeoffState::spoolup:
|
||||
if (_spoolup_time_hysteresis.get_state()) {
|
||||
_takeoff_state = TakeoffState::ready_for_takeoff;
|
||||
@@ -66,6 +67,7 @@ void Takeoff::updateTakeoffState(const bool armed, const bool landed, const bool
|
||||
break;
|
||||
}
|
||||
|
||||
// FALLTHROUGH
|
||||
case TakeoffState::ready_for_takeoff:
|
||||
if (want_takeoff) {
|
||||
_takeoff_state = TakeoffState::rampup;
|
||||
@@ -75,6 +77,7 @@ void Takeoff::updateTakeoffState(const bool armed, const bool landed, const bool
|
||||
break;
|
||||
}
|
||||
|
||||
// FALLTHROUGH
|
||||
case TakeoffState::rampup:
|
||||
if (_takeoff_ramp_vz >= takeoff_desired_vz) {
|
||||
_takeoff_state = TakeoffState::flight;
|
||||
@@ -83,6 +86,7 @@ void Takeoff::updateTakeoffState(const bool armed, const bool landed, const bool
|
||||
break;
|
||||
}
|
||||
|
||||
// FALLTHROUGH
|
||||
case TakeoffState::flight:
|
||||
if (landed) {
|
||||
_takeoff_state = TakeoffState::ready_for_takeoff;
|
||||
|
||||
Reference in New Issue
Block a user