mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-03 01:41:37 +08:00
px4io: fixed RC_CONFIG channel limit check
number of channels is the right test, not number of actuators
This commit is contained in:
@@ -2592,7 +2592,7 @@ PX4IO::ioctl(file * filep, int cmd, unsigned long arg)
|
|||||||
on param_get()
|
on param_get()
|
||||||
*/
|
*/
|
||||||
struct pwm_output_rc_config* config = (struct pwm_output_rc_config*)arg;
|
struct pwm_output_rc_config* config = (struct pwm_output_rc_config*)arg;
|
||||||
if (config->channel >= _max_actuators) {
|
if (config->channel >= RC_INPUT_MAX_CHANNELS) {
|
||||||
/* fail with error */
|
/* fail with error */
|
||||||
return E2BIG;
|
return E2BIG;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user