drivers/px4io: PWM_SERVO_GET_FAILSAFE_PWM don't get registers directly

This commit is contained in:
Daniel Agar
2022-01-03 18:23:01 -05:00
parent d3301ba826
commit 03bdc460d8
+2 -4
View File
@@ -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;