mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 02:16:53 +08:00
FW ALTCTL requires altitude
This commit is contained in:
committed by
Lorenz Meier
parent
6aa935fed6
commit
99aa5f49fc
@@ -361,10 +361,8 @@ main_state_transition(struct vehicle_status_s *status, main_state_t new_main_sta
|
|||||||
|
|
||||||
case commander_state_s::MAIN_STATE_ALTCTL:
|
case commander_state_s::MAIN_STATE_ALTCTL:
|
||||||
/* need at minimum altitude estimate */
|
/* need at minimum altitude estimate */
|
||||||
/* TODO: add this for fixedwing as well */
|
if (status_flags->condition_local_altitude_valid ||
|
||||||
if (!status->is_rotary_wing ||
|
status_flags->condition_global_position_valid) {
|
||||||
(status_flags->condition_local_altitude_valid ||
|
|
||||||
status_flags->condition_global_position_valid)) {
|
|
||||||
ret = TRANSITION_CHANGED;
|
ret = TRANSITION_CHANGED;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user