mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-09 14:21:37 +08:00
commander: allow external modes to be assigned to RC
Stores a hash of the mode name so that the same mode is always assigned to the same index independent from registration order.
This commit is contained in:
@@ -345,150 +345,6 @@ PARAM_DEFINE_INT32(COM_OBL_RC_ACT, 0);
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(COM_OBC_LOSS_T, 5.0f);
|
||||
|
||||
/**
|
||||
* First flightmode slot (1000-1160)
|
||||
*
|
||||
* If the main switch channel is in this range the
|
||||
* selected flight mode will be applied.
|
||||
*
|
||||
* @value -1 Unassigned
|
||||
* @value 0 Manual
|
||||
* @value 1 Altitude
|
||||
* @value 2 Position
|
||||
* @value 3 Mission
|
||||
* @value 4 Hold
|
||||
* @value 10 Takeoff
|
||||
* @value 11 Land
|
||||
* @value 5 Return
|
||||
* @value 6 Acro
|
||||
* @value 7 Offboard
|
||||
* @value 8 Stabilized
|
||||
* @value 12 Follow Me
|
||||
* @value 13 Precision Land
|
||||
* @group Commander
|
||||
*/
|
||||
PARAM_DEFINE_INT32(COM_FLTMODE1, -1);
|
||||
|
||||
/**
|
||||
* Second flightmode slot (1160-1320)
|
||||
*
|
||||
* If the main switch channel is in this range the
|
||||
* selected flight mode will be applied.
|
||||
*
|
||||
* @value -1 Unassigned
|
||||
* @value 0 Manual
|
||||
* @value 1 Altitude
|
||||
* @value 2 Position
|
||||
* @value 3 Mission
|
||||
* @value 4 Hold
|
||||
* @value 10 Takeoff
|
||||
* @value 11 Land
|
||||
* @value 5 Return
|
||||
* @value 6 Acro
|
||||
* @value 7 Offboard
|
||||
* @value 8 Stabilized
|
||||
* @value 12 Follow Me
|
||||
* @value 13 Precision Land
|
||||
* @group Commander
|
||||
*/
|
||||
PARAM_DEFINE_INT32(COM_FLTMODE2, -1);
|
||||
|
||||
/**
|
||||
* Third flightmode slot (1320-1480)
|
||||
*
|
||||
* If the main switch channel is in this range the
|
||||
* selected flight mode will be applied.
|
||||
*
|
||||
* @value -1 Unassigned
|
||||
* @value 0 Manual
|
||||
* @value 1 Altitude
|
||||
* @value 2 Position
|
||||
* @value 3 Mission
|
||||
* @value 4 Hold
|
||||
* @value 10 Takeoff
|
||||
* @value 11 Land
|
||||
* @value 5 Return
|
||||
* @value 6 Acro
|
||||
* @value 7 Offboard
|
||||
* @value 8 Stabilized
|
||||
* @value 12 Follow Me
|
||||
* @value 13 Precision Land
|
||||
* @group Commander
|
||||
*/
|
||||
PARAM_DEFINE_INT32(COM_FLTMODE3, -1);
|
||||
|
||||
/**
|
||||
* Fourth flightmode slot (1480-1640)
|
||||
*
|
||||
* If the main switch channel is in this range the
|
||||
* selected flight mode will be applied.
|
||||
*
|
||||
* @value -1 Unassigned
|
||||
* @value 0 Manual
|
||||
* @value 1 Altitude
|
||||
* @value 2 Position
|
||||
* @value 3 Mission
|
||||
* @value 4 Hold
|
||||
* @value 10 Takeoff
|
||||
* @value 11 Land
|
||||
* @value 5 Return
|
||||
* @value 6 Acro
|
||||
* @value 7 Offboard
|
||||
* @value 8 Stabilized
|
||||
* @value 12 Follow Me
|
||||
* @value 13 Precision Land
|
||||
* @group Commander
|
||||
*/
|
||||
PARAM_DEFINE_INT32(COM_FLTMODE4, -1);
|
||||
|
||||
/**
|
||||
* Fifth flightmode slot (1640-1800)
|
||||
*
|
||||
* If the main switch channel is in this range the
|
||||
* selected flight mode will be applied.
|
||||
*
|
||||
* @value -1 Unassigned
|
||||
* @value 0 Manual
|
||||
* @value 1 Altitude
|
||||
* @value 2 Position
|
||||
* @value 3 Mission
|
||||
* @value 4 Hold
|
||||
* @value 10 Takeoff
|
||||
* @value 11 Land
|
||||
* @value 5 Return
|
||||
* @value 6 Acro
|
||||
* @value 7 Offboard
|
||||
* @value 8 Stabilized
|
||||
* @value 12 Follow Me
|
||||
* @value 13 Precision Land
|
||||
* @group Commander
|
||||
*/
|
||||
PARAM_DEFINE_INT32(COM_FLTMODE5, -1);
|
||||
|
||||
/**
|
||||
* Sixth flightmode slot (1800-2000)
|
||||
*
|
||||
* If the main switch channel is in this range the
|
||||
* selected flight mode will be applied.
|
||||
*
|
||||
* @value -1 Unassigned
|
||||
* @value 0 Manual
|
||||
* @value 1 Altitude
|
||||
* @value 2 Position
|
||||
* @value 3 Mission
|
||||
* @value 4 Hold
|
||||
* @value 10 Takeoff
|
||||
* @value 11 Land
|
||||
* @value 5 Return
|
||||
* @value 6 Acro
|
||||
* @value 7 Offboard
|
||||
* @value 8 Stabilized
|
||||
* @value 12 Follow Me
|
||||
* @value 13 Precision Land
|
||||
* @group Commander
|
||||
*/
|
||||
PARAM_DEFINE_INT32(COM_FLTMODE6, -1);
|
||||
|
||||
/**
|
||||
* Maximum EKF position innovation test ratio that will allow arming
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user