mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
[PX4IO/PWM driver] Fixed a bug in px4io driver
This commit is contained in:
parent
82bfaf3967
commit
bb52a77194
@ -2726,12 +2726,15 @@ PX4IO::ioctl(file *filep, int cmd, unsigned long arg)
|
||||
break;
|
||||
}
|
||||
|
||||
case PWM_SERVO_GET_TRIM_PWM:
|
||||
case PWM_SERVO_GET_TRIM_PWM: {
|
||||
struct pwm_output_values *pwm = (struct pwm_output_values *)arg;
|
||||
pwm->channel_count = _max_actuators;
|
||||
|
||||
ret = io_reg_get(PX4IO_PAGE_CONTROL_TRIM_PWM, 0, (uint16_t *)arg, _max_actuators);
|
||||
ret = io_reg_get(PX4IO_PAGE_CONTROL_TRIM_PWM, 0, pwm->values, _max_actuators);
|
||||
|
||||
if (ret != OK) {
|
||||
ret = -EIO;
|
||||
if (ret != OK) {
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user