mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 13:07:34 +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;
|
||||
}
|
||||
|
||||
@@ -708,13 +708,11 @@ PARAM_DEFINE_FLOAT(MPC_TKO_RAMP_T, 3.0f);
|
||||
* The supported sub-modes are:
|
||||
* 0 Simple position control where sticks map directly to velocity setpoints
|
||||
* without smoothing. Useful for velocity control tuning.
|
||||
* 1 Smooth position control with maximum acceleration and jerk limits based on slew-rates.
|
||||
* 3 Smooth position control with maximum acceleration and jerk limits based on
|
||||
* jerk optimized trajectory generator (different algorithm than 1).
|
||||
* 4 Smooth position control where sticks map to acceleration and there's a virtual brake drag
|
||||
*
|
||||
* @value 0 Simple position control
|
||||
* @value 1 Smooth position control
|
||||
* @value 3 Smooth position control (Jerk optimized)
|
||||
* @value 4 Acceleration based input
|
||||
* @group Multicopter Position Control
|
||||
|
||||
Reference in New Issue
Block a user