mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 14:40:35 +08:00
MPC_POS_MODE remove old metadata and explicitly handle invalid configuration
This commit is contained in:
committed by
Mathieu Bresciani
parent
d01806a0c6
commit
0ba1bc0ce1
@@ -314,6 +314,12 @@ void FlightModeManager::start_flight_task()
|
||||
|
||||
case 4:
|
||||
default:
|
||||
if (_param_mpc_pos_mode.get() != 4) {
|
||||
PX4_ERR("MPC_POS_MODE %d invalid, resetting", _param_mpc_pos_mode.get());
|
||||
_param_mpc_pos_mode.set(4);
|
||||
_param_mpc_pos_mode.commit();
|
||||
}
|
||||
|
||||
error = switchTask(FlightTaskIndex::ManualAcceleration);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user