mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-05 07:28:29 -04:00
Plane: fixed range check for RC channel
This commit is contained in:
parent
d9a255afc3
commit
0e79044285
@ -25,7 +25,7 @@ public:
|
|||||||
|
|
||||||
RC_Channel_Plane obj_channels[NUM_RC_CHANNELS];
|
RC_Channel_Plane obj_channels[NUM_RC_CHANNELS];
|
||||||
RC_Channel_Plane *channel(const uint8_t chan) override {
|
RC_Channel_Plane *channel(const uint8_t chan) override {
|
||||||
if (chan > NUM_RC_CHANNELS) {
|
if (chan >= NUM_RC_CHANNELS) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
return &obj_channels[chan];
|
return &obj_channels[chan];
|
||||||
|
Loading…
Reference in New Issue
Block a user