File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,9 @@ bool Sub::set_mode(Mode::Number mode, ModeReason reason)
95
95
96
96
// check for valid altitude if old mode did not require it but new one does
97
97
// we only want to stop changing modes if it could make things worse
98
- if (!sub. control_check_barometer () && // maybe use ekf_alt_ok() instead?
99
- flightmode ->has_manual_throttle () &&
100
- !new_flightmode-> has_manual_throttle ()) {
98
+ if (flightmode-> has_manual_throttle () &&
99
+ !new_flightmode ->has_manual_throttle () &&
100
+ !sub. control_check_barometer ()) { // maybe use ekf_alt_ok() instead?
101
101
gcs ().send_text (MAV_SEVERITY_WARNING, " Mode change failed: %s need alt estimate" , new_flightmode->name ());
102
102
LOGGER_WRITE_ERROR (LogErrorSubsystem::FLIGHT_MODE, LogErrorCode (mode));
103
103
return false ;
You can’t perform that action at this time.
0 commit comments