From 1739ecc981a9e363783dc2ce4317822444ce4276 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Mon, 3 Jan 2022 18:07:23 -0500 Subject: [PATCH] delete PWM_SERVO_SET_FORCE_FAILSAFE --- src/drivers/drv_pwm_output.h | 3 --- src/drivers/px4io/px4io.cpp | 15 --------------- src/systemcmds/pwm/pwm.cpp | 27 --------------------------- 3 files changed, 45 deletions(-) diff --git a/src/drivers/drv_pwm_output.h b/src/drivers/drv_pwm_output.h index 0cde334c6a..15bfd39e29 100644 --- a/src/drivers/drv_pwm_output.h +++ b/src/drivers/drv_pwm_output.h @@ -194,9 +194,6 @@ typedef uint16_t servo_position_t; /** force safety switch off (to disable use of safety switch) */ #define PWM_SERVO_SET_FORCE_SAFETY_OFF _PX4_IOC(_PWM_SERVO_BASE, 25) -/** force failsafe mode (failsafe values are set immediately even if failsafe condition not met) */ -#define PWM_SERVO_SET_FORCE_FAILSAFE _PX4_IOC(_PWM_SERVO_BASE, 26) - /** make failsafe non-recoverable (termination) if it occurs */ #define PWM_SERVO_SET_TERMINATION_FAILSAFE _PX4_IOC(_PWM_SERVO_BASE, 27) diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 83ad3dd89d..5e1230d0a1 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -1768,21 +1768,6 @@ int PX4IO::ioctl(file *filep, int cmd, unsigned long arg) ret = io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_FORCE_SAFETY_ON, PX4IO_FORCE_SAFETY_MAGIC); break; - case PWM_SERVO_SET_FORCE_FAILSAFE: - PX4_DEBUG("PWM_SERVO_SET_FORCE_FAILSAFE"); - - /* force failsafe mode instantly */ - if (arg == 0) { - /* clear force failsafe flag */ - ret = io_reg_modify(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_ARMING, PX4IO_P_SETUP_ARMING_FORCE_FAILSAFE, 0); - - } else { - /* set force failsafe flag */ - ret = io_reg_modify(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_ARMING, 0, PX4IO_P_SETUP_ARMING_FORCE_FAILSAFE); - } - - break; - case PWM_SERVO_SET_TERMINATION_FAILSAFE: PX4_DEBUG("PWM_SERVO_SET_TERMINATION_FAILSAFE"); diff --git a/src/systemcmds/pwm/pwm.cpp b/src/systemcmds/pwm/pwm.cpp index 54f6f9cdaa..529af8900e 100644 --- a/src/systemcmds/pwm/pwm.cpp +++ b/src/systemcmds/pwm/pwm.cpp @@ -115,9 +115,6 @@ $ pwm test -c 13 -p 1200 PRINT_MODULE_USAGE_COMMAND_DESCR("disarm", "Disarm output"); PRINT_MODULE_USAGE_COMMAND_DESCR("status", "Print current configuration of all channels"); - PRINT_MODULE_USAGE_COMMAND_DESCR("forcefail", "Force Failsafe mode. " - "PWM outputs are set to failsafe values."); - PRINT_MODULE_USAGE_ARG("on|off", "Turn on or off", false); PRINT_MODULE_USAGE_COMMAND_DESCR("terminatefail", "Enable Termination Failsafe mode. " "While this is true, " "any failsafe that occurs will be unrecoverable (even if recovery conditions are met)."); @@ -861,30 +858,6 @@ err_out_no_test: return 0; - } else if (!strcmp(command, "forcefail")) { - - if (argc < 3) { - PX4_ERR("arg missing [on|off]"); - return 1; - - } else { - - if (!strcmp(argv[2], "on")) { - /* force failsafe */ - ret = px4_ioctl(fd, PWM_SERVO_SET_FORCE_FAILSAFE, 1); - - } else { - /* disable failsafe */ - ret = px4_ioctl(fd, PWM_SERVO_SET_FORCE_FAILSAFE, 0); - } - - if (ret != OK) { - PX4_ERR("FAILED setting forcefail %s", argv[2]); - } - } - - return 0; - } else if (!strcmp(command, "terminatefail")) { if (argc < 3) {