mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
IO driver: Fix naming of safety command line argument
This commit is contained in:
parent
f7d875d58d
commit
99a4724ef1
@ -3267,19 +3267,19 @@ px4io_main(int argc, char *argv[])
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[1], "safety_arm")) {
|
||||
if (!strcmp(argv[1], "safety_off")) {
|
||||
int ret = g_dev->ioctl(NULL, PWM_SERVO_SET_FORCE_SAFETY_OFF, 0);
|
||||
if (ret != OK) {
|
||||
printf("failed to arm px4io\n");
|
||||
printf("failed to disable safety\n");
|
||||
exit(1);
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[1], "safety_disarm")) {
|
||||
if (!strcmp(argv[1], "safety_on")) {
|
||||
int ret = g_dev->ioctl(NULL, PWM_SERVO_SET_FORCE_SAFETY_ON, 0);
|
||||
if (ret != OK) {
|
||||
printf("failed to disarm px4io\n");
|
||||
printf("failed to enable safety\n");
|
||||
exit(1);
|
||||
}
|
||||
exit(0);
|
||||
@ -3412,6 +3412,6 @@ px4io_main(int argc, char *argv[])
|
||||
|
||||
out:
|
||||
errx(1, "need a command, try 'start', 'stop', 'status', 'test', 'monitor', 'debug <level>',\n"
|
||||
"'recovery', 'limit <rate>', 'current', 'bind', 'checkcrc', 'safety_arm', 'safety_disarm',\n"
|
||||
"'recovery', 'limit <rate>', 'current', 'bind', 'checkcrc', 'safety_on', 'safety_off',\n"
|
||||
"'forceupdate', 'update', 'sbus1_out', 'sbus2_out', 'rssi_analog' or 'rssi_pwm'");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user