forked from Archive/PX4-Autopilot
pwm system command: Allow to force failsave (forcefail command)
This commit is contained in:
parent
903b482378
commit
5c8c58a1e6
|
@ -635,7 +635,23 @@ pwm_main(int argc, char *argv[])
|
|||
}
|
||||
exit(0);
|
||||
|
||||
} else if (!strcmp(argv[1], "forcefail")) {
|
||||
|
||||
if (argc < 3) {
|
||||
errx(1, "arg missing [on|off]");
|
||||
} else {
|
||||
|
||||
if (!strcmp(argv[2], "on")) {
|
||||
/* force failsafe */
|
||||
ret = ioctl(fd, PWM_SERVO_SET_FORCE_FAILSAFE, 1);
|
||||
} else {
|
||||
/* force failsafe */
|
||||
ret = ioctl(fd, PWM_SERVO_SET_FORCE_FAILSAFE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
usage("specify arm|disarm|rate|failsafe|disarmed|min|max|test|info");
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue