px4io: fixed RC_CONFIG channel limit check

number of channels is the right test, not number of actuators
This commit is contained in:
Andrew Tridgell
2014-11-26 11:37:56 +11:00
parent 7cb613bb26
commit 809500cfcd
+1 -1
View File
@@ -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;
}