aboutsummaryrefslogtreecommitdiff
path: root/src/modules/uORB/topics/rc_channels.h
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2014-05-20 00:03:00 +0200
committerAnton Babushkin <anton.babushkin@me.com>2014-05-20 00:03:00 +0200
commitb12928548c8254ce305f0d96c1b1007b42005be4 (patch)
tree48ee722bdcddb4204b729bb01ea49942e4fcddd5 /src/modules/uORB/topics/rc_channels.h
parentb165e6ba2000f89b1220393e469911f3e3a73286 (diff)
parentb250e28abfaf4d1adc8bdfb815fff369e0e41cc6 (diff)
downloadpx4-firmware-b12928548c8254ce305f0d96c1b1007b42005be4.tar.gz
px4-firmware-b12928548c8254ce305f0d96c1b1007b42005be4.tar.bz2
px4-firmware-b12928548c8254ce305f0d96c1b1007b42005be4.zip
Merge branch 'master' into acro2
Diffstat (limited to 'src/modules/uORB/topics/rc_channels.h')
-rw-r--r--src/modules/uORB/topics/rc_channels.h58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/modules/uORB/topics/rc_channels.h b/src/modules/uORB/topics/rc_channels.h
index 36106751e..370c54442 100644
--- a/src/modules/uORB/topics/rc_channels.h
+++ b/src/modules/uORB/topics/rc_channels.h
@@ -52,30 +52,29 @@
*/
#define RC_CHANNELS_MAPPED_MAX 16
-/**
+/**
* This defines the mapping of the RC functions.
* The value assigned to the specific function corresponds to the entry of
* the channel array chan[].
*/
-enum RC_CHANNELS_FUNCTION
-{
- THROTTLE = 0,
- ROLL,
- PITCH,
- YAW,
- MODE,
- RETURN,
- ASSISTED,
- MISSION,
- OFFBOARD_MODE,
- ACRO,
- FLAPS,
- AUX_1,
- AUX_2,
- AUX_3,
- AUX_4,
- AUX_5,
- RC_CHANNELS_FUNCTION_MAX /**< indicates the number of functions. There can be more functions than RC channels. */
+enum RC_CHANNELS_FUNCTION {
+ THROTTLE = 0,
+ ROLL = 1,
+ PITCH = 2,
+ YAW = 3,
+ MODE = 4,
+ RETURN = 5,
+ POSCTL = 6,
+ LOITER = 7,
+ OFFBOARD_MODE = 8,
+ ACRO = 9,
+ FLAPS = 10,
+ AUX_1 = 11,
+ AUX_2 = 12,
+ AUX_3 = 13,
+ AUX_4 = 14,
+ AUX_5 = 15,
+ RC_CHANNELS_FUNCTION_MAX /**< indicates the number of functions. There can be more functions than RC channels. */
};
/**
@@ -86,16 +85,17 @@ enum RC_CHANNELS_FUNCTION
struct rc_channels_s {
uint64_t timestamp; /**< In microseconds since boot time. */
- uint64_t timestamp_last_valid; /**< timestamp of last valid RC signal. */
- struct {
- float scaled; /**< Scaled to -1..1 (throttle: 0..1) */
- } chan[RC_CHANNELS_MAPPED_MAX];
- uint8_t chan_count; /**< number of valid channels */
+ uint64_t timestamp_last_valid; /**< timestamp of last valid RC signal. */
+ struct {
+ float scaled; /**< Scaled to -1..1 (throttle: 0..1) */
+ } chan[RC_CHANNELS_MAPPED_MAX];
+ uint8_t chan_count; /**< number of valid channels */
- /*String array to store the names of the functions*/
- char function_name[RC_CHANNELS_FUNCTION_MAX][20];
- int8_t function[RC_CHANNELS_FUNCTION_MAX];
- uint8_t rssi; /**< Overall receive signal strength */
+ /*String array to store the names of the functions*/
+ 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. */
/**