mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 14:48:03 +03:00
On-screen battery level when charging
This commit is contained in:
@ -68,23 +68,29 @@ void BATTERY_GetReadings(bool bDisplayBatteryLevel)
|
||||
if (gBatteryCurrent < 501)
|
||||
{
|
||||
if (gChargingWithTypeC)
|
||||
gUpdateStatus = true;
|
||||
gChargingWithTypeC = 0;
|
||||
{
|
||||
gUpdateStatus = true;
|
||||
gUpdateDisplay = true;
|
||||
}
|
||||
gChargingWithTypeC = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!gChargingWithTypeC)
|
||||
{
|
||||
gUpdateStatus = true;
|
||||
gUpdateStatus = true;
|
||||
gUpdateDisplay = true;
|
||||
BACKLIGHT_TurnOn();
|
||||
}
|
||||
gChargingWithTypeC = 1;
|
||||
gChargingWithTypeC = true;
|
||||
}
|
||||
|
||||
if (PreviousBatteryLevel != gBatteryDisplayLevel)
|
||||
{
|
||||
if (gBatteryDisplayLevel < 2)
|
||||
{
|
||||
gLowBattery = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
gLowBattery = false;
|
||||
|
Reference in New Issue
Block a user