diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-04-28 17:48:27 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-04-28 17:48:27 +0200 |
commit | 2c37ec16dc4a8ba47d985dc489b5b322758457c2 (patch) | |
tree | 883f3ac1bb34845159c8dfc76b900b11fd270436 /src/modules | |
parent | df8fb7d2dc645070ebb5fae3324ac6533f4ab7a3 (diff) | |
parent | e134537ae8f892ba3ae4a2f9c771bcfa62f905c8 (diff) | |
download | px4-firmware-2c37ec16dc4a8ba47d985dc489b5b322758457c2.tar.gz px4-firmware-2c37ec16dc4a8ba47d985dc489b5b322758457c2.tar.bz2 px4-firmware-2c37ec16dc4a8ba47d985dc489b5b322758457c2.zip |
Merge branch 'autodeclination' into ekf_params
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/px4iofirmware/protocol.h | 4 | ||||
-rw-r--r-- | src/modules/px4iofirmware/registers.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/px4iofirmware/protocol.h b/src/modules/px4iofirmware/protocol.h index a978d483a..6c20d6006 100644 --- a/src/modules/px4iofirmware/protocol.h +++ b/src/modules/px4iofirmware/protocol.h @@ -211,6 +211,10 @@ enum { /* DSM bind states */ /* 12 occupied by CRC */ #define PX4IO_P_SETUP_RC_THR_FAILSAFE_US 13 /**< the throttle failsafe pulse length in microseconds */ +#define PX4IO_P_SETUP_FORCE_SAFETY_OFF 12 /* force safety switch into + 'armed' (PWM enabled) state */ +#define PX4IO_FORCE_SAFETY_MAGIC 22027 /* required argument for force safety (random) */ + /* autopilot control values, -10000..10000 */ #define PX4IO_PAGE_CONTROLS 51 /**< actuator control groups, one after the other, 8 wide */ #define PX4IO_P_CONTROLS_GROUP_0 (PX4IO_PROTOCOL_MAX_CONTROL_COUNT * 0) /**< 0..PX4IO_PROTOCOL_MAX_CONTROL_COUNT - 1 */ diff --git a/src/modules/px4iofirmware/registers.c b/src/modules/px4iofirmware/registers.c index 6752e7b4b..9e5d7e7e2 100644 --- a/src/modules/px4iofirmware/registers.c +++ b/src/modules/px4iofirmware/registers.c @@ -570,6 +570,12 @@ registers_set_one(uint8_t page, uint8_t offset, uint16_t value) dsm_bind(value & 0x0f, (value >> 4) & 0xF); break; + case PX4IO_P_SETUP_FORCE_SAFETY_OFF: + if (value == PX4IO_FORCE_SAFETY_MAGIC) { + r_status_flags |= PX4IO_P_STATUS_FLAGS_SAFETY_OFF; + } + break; + default: return -1; } |