Browse Source

drivers/px4io: PWM_SERVO_GET_FAILSAFE_PWM don't get registers directly

master
Daniel Agar 3 years ago
parent
commit
03bdc460d8
  1. 6
      src/drivers/px4io/px4io.cpp

6
src/drivers/px4io/px4io.cpp

@ -1656,10 +1656,8 @@ int PX4IO::ioctl(file *filep, int cmd, unsigned long arg) @@ -1656,10 +1656,8 @@ int PX4IO::ioctl(file *filep, int cmd, unsigned long arg)
struct pwm_output_values *pwm = (struct pwm_output_values *)arg;
pwm->channel_count = _max_actuators;
ret = io_reg_get(PX4IO_PAGE_FAILSAFE_PWM, 0, pwm->values, _max_actuators);
if (ret != OK) {
ret = -EIO;
for (unsigned i = 0; i < _max_actuators; i++) {
pwm->values[i] = _mixing_output.failsafeValue(i);
}
break;

Loading…
Cancel
Save