Skip to content

Commit

Permalink
Cover scenario when battery is unplugged, but fc is still powered.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmosca committed Jan 18, 2025
1 parent 758ac7c commit fbd1ed5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/sensors/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ void batteryUpdate(timeUs_t timeDelta)
/* battery has been disconnected - can take a while for filter cap to disharge so we use a threshold of VBATT_PRESENT_THRESHOLD */
if (batteryState != BATTERY_NOT_PRESENT && vbat <= VBATT_PRESENT_THRESHOLD) {
batteryState = BATTERY_NOT_PRESENT;
batteryConnectedTime = 0;
batteryCellCount = 0;
batteryWarningVoltage = 0;
batteryCriticalVoltage = 0;
Expand Down

0 comments on commit fbd1ed5

Please sign in to comment.