mirror of https://github.com/ArduPilot/ardupilot
AP_Generator_RichenPower: allow operation with no generator present
This commit is contained in:
parent
df8d8cefd6
commit
c5ac42d985
|
@ -305,6 +305,12 @@ bool AP_Generator_RichenPower::pre_arm_check(char *failmsg, uint8_t failmsg_len)
|
|||
// not configured in serial manager
|
||||
return true;
|
||||
}
|
||||
if (last_reading_ms == 0) {
|
||||
// allow optional use of generator
|
||||
snprintf(failmsg, failmsg_len, "no RichenPower generator present");
|
||||
return true;
|
||||
}
|
||||
|
||||
const uint32_t now = AP_HAL::millis();
|
||||
|
||||
if (now - last_reading_ms > 2000) { // we expect @1Hz
|
||||
|
|
Loading…
Reference in New Issue