diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-09-15 18:48:28 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-09-15 18:48:28 +0200 |
commit | 03727974f1249adce8f55faf4978910699e5a47e (patch) | |
tree | 3f756fbc431eaf16968bbdadd7faf6642fcde619 /src/drivers/px4io/px4io.cpp | |
parent | 2678aba9fe2a7f713dc48e8a362cd28d891b3675 (diff) | |
download | px4-firmware-03727974f1249adce8f55faf4978910699e5a47e.tar.gz px4-firmware-03727974f1249adce8f55faf4978910699e5a47e.tar.bz2 px4-firmware-03727974f1249adce8f55faf4978910699e5a47e.zip |
Fix binding states for DSM
Diffstat (limited to 'src/drivers/px4io/px4io.cpp')
-rw-r--r-- | src/drivers/px4io/px4io.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 3e83fcad8..5fff1feac 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -853,9 +853,9 @@ PX4IO::task_main() int32_t dsm_bind_val; param_t dsm_bind_param; - // See if bind parameter has been set, and reset it to 0 + // See if bind parameter has been set, and reset it to -1 param_get(dsm_bind_param = param_find("RC_DSM_BIND"), &dsm_bind_val); - if (dsm_bind_val) { + if (dsm_bind_val >= 0) { dsm_bind_ioctl(dsm_bind_val); dsm_bind_val = -1; param_set(dsm_bind_param, &dsm_bind_val); @@ -1167,7 +1167,7 @@ PX4IO::io_handle_status(uint16_t status) void PX4IO::dsm_bind_ioctl(int dsmMode) { - if (!(_status & PX4IO_P_STATUS_FLAGS_OUTPUTS_ARMED)) { + if (!(_status & PX4IO_P_STATUS_FLAGS_SAFETY_OFF)) { /* 0: dsm2, 1:dsmx */ if ((dsmMode >= 0) && (dsmMode <= 1)) { mavlink_log_info(_thread_mavlink_fd, "[IO] binding dsm%c rx", (dsmMode == 0) ? '2' : 'x'); |