mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 13:25:30 +03:00
Added ARMED guard to BATTERY_NOT_PRESENT
This commit is contained in:
parent
f1a2d58cff
commit
bca2a07441
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ void updateBattery(void)
|
||||||
batteryCriticalVoltage = batteryCellCount * batteryConfig->vbatmincellvoltage;
|
batteryCriticalVoltage = batteryCellCount * batteryConfig->vbatmincellvoltage;
|
||||||
}
|
}
|
||||||
/* battery has been disconnected - can take a while for filter cap to disharge so we use a threshold of VBATT_PRESENT_THRESHOLD */
|
/* battery has been disconnected - can take a while for filter cap to disharge so we use a threshold of VBATT_PRESENT_THRESHOLD */
|
||||||
else if (batteryState != BATTERY_NOT_PRESENT && vbat <= batteryConfig->batterynotpresentlevel)
|
else if (batteryState != BATTERY_NOT_PRESENT && vbat <= batteryConfig->batterynotpresentlevel && !ARMING_FLAG(ARMED))
|
||||||
{
|
{
|
||||||
batteryState = BATTERY_NOT_PRESENT;
|
batteryState = BATTERY_NOT_PRESENT;
|
||||||
batteryCellCount = 0;
|
batteryCellCount = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue