AP_RPM: correct compilation when RPM_PIN disabled

This commit is contained in:
Peter Barker 2022-09-30 22:15:16 +10:00 committed by Andrew Tridgell
parent 3a76d248a0
commit d4a7ff1ccd
1 changed files with 2 additions and 0 deletions

View File

@ -258,6 +258,7 @@ bool AP_RPM::arming_checks(size_t buflen, char *buffer) const
{
for (uint8_t i=0; i<RPM_MAX_INSTANCES; i++) {
switch (_params[i].type) {
#if AP_RPM_PIN_ENABLED
case RPM_TYPE_PWM:
case RPM_TYPE_PIN:
if (_params[i].pin == -1) {
@ -274,6 +275,7 @@ bool AP_RPM::arming_checks(size_t buflen, char *buffer) const
return false;
}
break;
#endif
}
}
return true;