diff --git a/msg/manual_control_setpoint.msg b/msg/manual_control_setpoint.msg index 8295eba074..599e63d5a9 100644 --- a/msg/manual_control_setpoint.msg +++ b/msg/manual_control_setpoint.msg @@ -51,4 +51,5 @@ uint8 loiter_switch # loiter 2 position switch (optional): _MISSION_, LOITER uint8 acro_switch # acro 2 position switch (optional): _MANUAL_, ACRO uint8 offboard_switch # offboard 2 position switch (optional): _NORMAL_, OFFBOARD uint8 kill_switch # throttle kill: _NORMAL_, KILL +uint8 transition_switch # VTOL transition switch: _HOVER, FORWARD_FLIGHT int8 mode_slot # the slot a specific model selector is in diff --git a/msg/rc_channels.msg b/msg/rc_channels.msg index 769a393216..52d89df5fb 100644 --- a/msg/rc_channels.msg +++ b/msg/rc_channels.msg @@ -20,11 +20,12 @@ uint8 RC_CHANNELS_FUNCTION_PARAM_2=17 uint8 RC_CHANNELS_FUNCTION_PARAM_3_5=18 uint8 RC_CHANNELS_FUNCTION_RATTITUDE=19 uint8 RC_CHANNELS_FUNCTION_KILLSWITCH=20 +uint8 RC_CHANNELS_FUNCTION_TRANSITION=21 uint64 timestamp_last_valid # Timestamp of last valid RC signal float32[18] channels # Scaled to -1..1 (throttle: 0..1) uint8 channel_count # Number of valid channels -int8[21] function # Functions mapping +int8[22] function # Functions mapping uint8 rssi # Receive signal strength indicator (0-100) bool signal_lost # Control signal lost, should be checked together with topic timeout uint32 frame_drop_count # Number of dropped frames diff --git a/src/modules/sensors/sensor_params.c b/src/modules/sensors/sensor_params.c index 57313d2afb..b4e8983f2a 100644 --- a/src/modules/sensors/sensor_params.c +++ b/src/modules/sensors/sensor_params.c @@ -2516,6 +2516,34 @@ PARAM_DEFINE_INT32(RC_MAP_KILL_SW, 0); */ PARAM_DEFINE_INT32(RC_MAP_FLAPS, 0); +/** + * VTOL transition switch channel mapping + * + * @min 0 + * @max 18 + * @group Radio Switches + * @value 0 Unassigned + * @value 1 Channel 1 + * @value 2 Channel 2 + * @value 3 Channel 3 + * @value 4 Channel 4 + * @value 5 Channel 5 + * @value 6 Channel 6 + * @value 7 Channel 7 + * @value 8 Channel 8 + * @value 9 Channel 9 + * @value 10 Channel 10 + * @value 11 Channel 11 + * @value 12 Channel 12 + * @value 13 Channel 13 + * @value 14 Channel 14 + * @value 15 Channel 15 + * @value 16 Channel 16 + * @value 17 Channel 17 + * @value 18 Channel 18 + */ +PARAM_DEFINE_INT32(RC_MAP_TRANS_SW, 0); + /** * AUX1 Passthrough RC Channel * @@ -2930,6 +2958,24 @@ PARAM_DEFINE_FLOAT(RC_OFFB_TH, 0.5f); */ PARAM_DEFINE_FLOAT(RC_KILLSWITCH_TH, 0.25f); +/** + * Threshold for the VTOL transition switch + * + * 0-1 indicate where in the full channel range the threshold sits + * 0 : min + * 1 : max + * sign indicates polarity of comparison + * positive : true when channel>th + * negative : true when channel