Build fix, added command line switch norc to disable RC

This commit is contained in:
Lorenz Meier
2013-08-21 13:54:37 +02:00
parent 5fbee23945
commit 64b8f5232b
+26
View File
@@ -175,6 +175,11 @@ public:
*/
void print_status();
/**
* Disable RC input handling
*/
int disable_rc_handling();
/**
* Set the DSM VCC is controlled by relay one flag
*
@@ -276,6 +281,11 @@ private:
*/
int io_get_status();
/**
* Disable RC input handling
*/
int io_disable_rc_handling();
/**
* Fetch RC inputs from IO.
*
@@ -853,6 +863,12 @@ PX4IO::io_set_arming_state()
return io_reg_modify(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_ARMING, clear, set);
}
int
PX4IO::io_disable_rc_handling()
{
return io_disable_rc_handling();
}
int
PX4IO::io_disable_rc_handling()
{
@@ -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) {