mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 03:54:07 +08:00
delete PWM_SERVO_SET_ARM_OK
This commit is contained in:
parent
e1c32c10ad
commit
52b69f2f54
@ -155,9 +155,6 @@ typedef uint16_t servo_position_t;
|
||||
/** check the selected update rates */
|
||||
#define PWM_SERVO_GET_SELECT_UPDATE_RATE _PX4_IOC(_PWM_SERVO_BASE, 7)
|
||||
|
||||
/** set the 'ARM ok' bit, which activates the safety switch */
|
||||
#define PWM_SERVO_SET_ARM_OK _PX4_IOC(_PWM_SERVO_BASE, 8)
|
||||
|
||||
/** clear the 'ARM ok' bit, which deactivates the safety switch */
|
||||
#define PWM_SERVO_CLEAR_ARM_OK _PX4_IOC(_PWM_SERVO_BASE, 9)
|
||||
|
||||
|
||||
@ -488,7 +488,6 @@ int PCA9685Wrapper::ioctl(cdev::file_t *filep, int cmd, unsigned long arg)
|
||||
|
||||
break;
|
||||
|
||||
case PWM_SERVO_SET_ARM_OK:
|
||||
case PWM_SERVO_CLEAR_ARM_OK:
|
||||
break;
|
||||
|
||||
|
||||
@ -757,7 +757,6 @@ int PWMOut::pwm_ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
||||
lock();
|
||||
|
||||
switch (cmd) {
|
||||
case PWM_SERVO_SET_ARM_OK:
|
||||
case PWM_SERVO_CLEAR_ARM_OK:
|
||||
break;
|
||||
|
||||
|
||||
@ -1621,12 +1621,6 @@ int PX4IO::ioctl(file *filep, int cmd, unsigned long arg)
|
||||
|
||||
/* regular ioctl? */
|
||||
switch (cmd) {
|
||||
case PWM_SERVO_SET_ARM_OK:
|
||||
PX4_DEBUG("PWM_SERVO_SET_ARM_OK");
|
||||
/* set the 'OK to arm' bit */
|
||||
ret = io_reg_modify(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_ARMING, 0, PX4IO_P_SETUP_ARMING_IO_ARM_OK);
|
||||
break;
|
||||
|
||||
case PWM_SERVO_CLEAR_ARM_OK:
|
||||
PX4_DEBUG("PWM_SERVO_CLEAR_ARM_OK");
|
||||
/* clear the 'OK to arm' bit */
|
||||
|
||||
@ -866,7 +866,6 @@ UavcanNode::ioctl(file *filp, int cmd, unsigned long arg)
|
||||
lock();
|
||||
|
||||
switch (cmd) {
|
||||
case PWM_SERVO_SET_ARM_OK:
|
||||
case PWM_SERVO_CLEAR_ARM_OK:
|
||||
// these are no-ops, as no safety switch
|
||||
break;
|
||||
|
||||
@ -270,16 +270,6 @@ extern "C" __EXPORT int esc_calib_main(int argc, char *argv[])
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* tell IO/FMU that its ok to disable its safety with the switch */
|
||||
ret = ioctl(fd, PWM_SERVO_SET_ARM_OK, 0);
|
||||
|
||||
if (ret != OK) {
|
||||
PX4_ERR("PWM_SERVO_SET_ARM_OK");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
printf("Outputs armed");
|
||||
|
||||
|
||||
/* wait for user confirmation */
|
||||
printf("\nHigh PWM set: %d\n"
|
||||
|
||||
@ -338,12 +338,6 @@ int prepare(int fd, unsigned long *max_channels)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* tell IO/FMU that its ok to disable its safety with the switch */
|
||||
if (px4_ioctl(fd, PWM_SERVO_SET_ARM_OK, 0) != OK) {
|
||||
PX4_ERR("PWM_SERVO_SET_ARM_OK");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user