aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-08-21 13:54:37 +0200
committerLorenz Meier <lm@inf.ethz.ch>2013-08-21 13:54:37 +0200
commit64b8f5232bcd12a819cb72e862158db6db5a0a66 (patch)
tree0bdb86d520830051cff5c1b1ce3d335e8f621ab5 /src
parent5fbee2394522d8b0c7a78d2751783845d011b56d (diff)
downloadpx4-firmware-64b8f5232bcd12a819cb72e862158db6db5a0a66.tar.gz
px4-firmware-64b8f5232bcd12a819cb72e862158db6db5a0a66.tar.bz2
px4-firmware-64b8f5232bcd12a819cb72e862158db6db5a0a66.zip
Build fix, added command line switch norc to disable RC
Diffstat (limited to 'src')
-rw-r--r--src/drivers/px4io/px4io.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp
index afbd4e695..2e8946264 100644
--- a/src/drivers/px4io/px4io.cpp
+++ b/src/drivers/px4io/px4io.cpp
@@ -176,6 +176,11 @@ public:
void print_status();
/**
+ * Disable RC input handling
+ */
+ int disable_rc_handling();
+
+ /**
* Set the DSM VCC is controlled by relay one flag
*
* @param[in] enable true=DSM satellite VCC is controlled by relay1, false=DSM satellite VCC not controlled
@@ -277,6 +282,11 @@ private:
int io_get_status();
/**
+ * Disable RC input handling
+ */
+ int io_disable_rc_handling();
+
+ /**
* Fetch RC inputs from IO.
*
* @param input_rc Input structure to populate.
@@ -856,6 +866,12 @@ PX4IO::io_set_arming_state()
int
PX4IO::io_disable_rc_handling()
{
+ return io_disable_rc_handling();
+}
+
+int
+PX4IO::io_disable_rc_handling()
+{
uint16_t set = PX4IO_P_SETUP_ARMING_RC_HANDLING_DISABLED;
uint16_t clear = 0;
@@ -1785,6 +1801,16 @@ start(int argc, char *argv[])
errx(1, "driver init failed");
}
+ /* disable RC handling on request */
+ if (argc > 0 && !strcmp(argv[0], "norc")) {
+
+ if(g_dev->disable_rc_handling())
+ warnx("Failed disabling RC handling");
+
+ } else {
+ warnx("unknown argument: %s", argv[0]);
+ }
+
int dsm_vcc_ctl;
if (param_get(param_find("RC_RL1_DSM_VCC"), &dsm_vcc_ctl) == OK) {