mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-24 17:00:36 +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()
|
||||
*/
|
||||
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 */
|
||||
return E2BIG;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user