aboutsummaryrefslogtreecommitdiff
path: root/src/modules/uORB
diff options
context:
space:
mode:
authorTickTock- <lukecell@safe-mail.net>2014-04-22 17:43:36 -0700
committerTickTock- <lukecell@safe-mail.net>2014-04-22 17:43:36 -0700
commitd6e6ee34401d79d428c025458940bbbf42f62236 (patch)
treee0cb854b65e8a026d8c8572a1e382fe6b1c7765c /src/modules/uORB
parent86a0862af6412906611ed295cae4604e7111b1e9 (diff)
parent0b97dd2b776ce61fd53776f036230ea0089e26e9 (diff)
downloadpx4-firmware-d6e6ee34401d79d428c025458940bbbf42f62236.tar.gz
px4-firmware-d6e6ee34401d79d428c025458940bbbf42f62236.tar.bz2
px4-firmware-d6e6ee34401d79d428c025458940bbbf42f62236.zip
Merge branch 'rc_timeout' of https://github.com/TickTock-/Firmware into rc_merged
Diffstat (limited to 'src/modules/uORB')
-rw-r--r--src/modules/uORB/topics/manual_control_setpoint.h37
-rw-r--r--src/modules/uORB/topics/rc_channels.h1
-rw-r--r--src/modules/uORB/topics/vehicle_status.h28
3 files changed, 21 insertions, 45 deletions
diff --git a/src/modules/uORB/topics/manual_control_setpoint.h b/src/modules/uORB/topics/manual_control_setpoint.h
index eac6d6e98..2b3a337b2 100644
--- a/src/modules/uORB/topics/manual_control_setpoint.h
+++ b/src/modules/uORB/topics/manual_control_setpoint.h
@@ -44,6 +44,16 @@
#include "../uORB.h"
/**
+ * Switch position
+ */
+typedef enum {
+ SWITCH_POS_NONE = 0, /**< switch is not mapped */
+ SWITCH_POS_ON, /**< switch activated (value = 1) */
+ SWITCH_POS_MIDDLE, /**< middle position (value = 0) */
+ SWITCH_POS_OFF /**< switch not activated (value = -1) */
+} switch_pos_t;
+
+/**
* @addtogroup topics
* @{
*/
@@ -51,32 +61,25 @@
struct manual_control_setpoint_s {
uint64_t timestamp;
- float roll; /**< ailerons roll / roll rate input */
- float pitch; /**< elevator / pitch / pitch rate */
- float yaw; /**< rudder / yaw rate / yaw */
- float throttle; /**< throttle / collective thrust / altitude */
-
- float mode_switch; /**< mode 3 position switch (mandatory): manual, assisted, auto */
- float return_switch; /**< land 2 position switch (mandatory): land, no effect */
- float assisted_switch; /**< assisted 2 position switch (optional): seatbelt, simple */
- float mission_switch; /**< mission 2 position switch (optional): mission, loiter */
-
/**
- * Any of the channels below may not be available and be set to NaN
+ * Any of the channels may not be available and be set to NaN
* to indicate that it does not contain valid data.
*/
-
- // XXX needed or parameter?
- //float auto_offboard_input_switch; /**< controller setpoint source (0 = onboard, 1 = offboard) */
-
- float flaps; /**< flap position */
-
+ float roll; /**< ailerons roll / roll rate input, -1..1 */
+ float pitch; /**< elevator / pitch / pitch rate, -1..1 */
+ float yaw; /**< rudder / yaw rate / yaw, -1..1 */
+ float throttle; /**< throttle / collective thrust / altitude, 0..1 */
+ float flaps; /**< flap position */
float aux1; /**< default function: camera yaw / azimuth */
float aux2; /**< default function: camera pitch / tilt */
float aux3; /**< default function: camera trigger */
float aux4; /**< default function: camera roll */
float aux5; /**< default function: payload drop */
+ switch_pos_t mode_switch; /**< mode 3 position switch (mandatory): manual, assisted, auto */
+ switch_pos_t return_switch; /**< land 2 position switch (mandatory): land, no effect */
+ switch_pos_t assisted_switch; /**< assisted 2 position switch (optional): seatbelt, simple */
+ switch_pos_t mission_switch; /**< mission 2 position switch (optional): mission, loiter */
}; /**< manual control inputs */
/**
diff --git a/src/modules/uORB/topics/rc_channels.h b/src/modules/uORB/topics/rc_channels.h
index 6eb20efd1..3246a39dd 100644
--- a/src/modules/uORB/topics/rc_channels.h
+++ b/src/modules/uORB/topics/rc_channels.h
@@ -94,6 +94,7 @@ struct rc_channels_s {
char function_name[RC_CHANNELS_FUNCTION_MAX][20];
int8_t function[RC_CHANNELS_FUNCTION_MAX];
uint8_t rssi; /**< Overall receive signal strength */
+ bool signal_lost; /**< control signal lost, should be checked together with topic timeout */
}; /**< radio control channels. */
/**
diff --git a/src/modules/uORB/topics/vehicle_status.h b/src/modules/uORB/topics/vehicle_status.h
index 56be4d241..48af4c9e2 100644
--- a/src/modules/uORB/topics/vehicle_status.h
+++ b/src/modules/uORB/topics/vehicle_status.h
@@ -93,29 +93,6 @@ typedef enum {
FAILSAFE_STATE_MAX
} failsafe_state_t;
-typedef enum {
- MODE_SWITCH_MANUAL = 0,
- MODE_SWITCH_ASSISTED,
- MODE_SWITCH_AUTO
-} mode_switch_pos_t;
-
-typedef enum {
- ASSISTED_SWITCH_SEATBELT = 0,
- ASSISTED_SWITCH_EASY
-} assisted_switch_pos_t;
-
-typedef enum {
- RETURN_SWITCH_NONE = 0,
- RETURN_SWITCH_NORMAL,
- RETURN_SWITCH_RETURN
-} return_switch_pos_t;
-
-typedef enum {
- MISSION_SWITCH_NONE = 0,
- MISSION_SWITCH_LOITER,
- MISSION_SWITCH_MISSION
-} mission_switch_pos_t;
-
enum VEHICLE_MODE_FLAG {
VEHICLE_MODE_FLAG_SAFETY_ARMED = 128,
VEHICLE_MODE_FLAG_MANUAL_INPUT_ENABLED = 64,
@@ -187,11 +164,6 @@ struct vehicle_status_s {
bool is_rotary_wing;
- mode_switch_pos_t mode_switch;
- return_switch_pos_t return_switch;
- assisted_switch_pos_t assisted_switch;
- mission_switch_pos_t mission_switch;
-
bool condition_battery_voltage_valid;
bool condition_system_in_air_restore; /**< true if we can restore in mid air */
bool condition_system_sensors_initialized;