mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_RPM: instance range should use define instead of hardcoded value
This commit is contained in:
parent
a117e4571d
commit
d27cd19daa
@ -32,7 +32,7 @@ public:
|
|||||||
virtual void update() = 0;
|
virtual void update() = 0;
|
||||||
|
|
||||||
int8_t get_pin(void) const {
|
int8_t get_pin(void) const {
|
||||||
if (state.instance > 1) {
|
if (state.instance >= RPM_MAX_INSTANCES) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return ap_rpm._pin[state.instance].get();
|
return ap_rpm._pin[state.instance].get();
|
||||||
|
Loading…
Reference in New Issue
Block a user