From a9b5ee8ee63ffcb7d8f88646cb4a5496b763f908 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Thu, 24 Oct 2024 16:05:45 +0800 Subject: [PATCH] =?utf8?q?=E4=BD=8E=E7=94=B5=E9=87=8F=E6=8A=A5=E8=AD=A6?= =?utf8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../application/battery/service/battery_service.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/code/sdk/application/battery/service/battery_service.cpp b/code/sdk/application/battery/service/battery_service.cpp index 58584736e..821d5ff63 100644 --- a/code/sdk/application/battery/service/battery_service.cpp +++ b/code/sdk/application/battery/service/battery_service.cpp @@ -291,15 +291,17 @@ static void battery_check_chargement(void) * report alarm shutdown event at 5% * pay attention to : debounce */ - if (percent >0 && percent <= BATTERY_LOWPOWER_ALARM_POWERLEVEL) + if (percent <= BATTERY_LOWPOWER_ALARM_SHUTDOWNLEVEL ) { - low_power_play_toUI(0); + low_power_play_toUI(1); - }else if (percent <= BATTERY_LOWPOWER_ALARM_SHUTDOWNLEVEL ) + } + else if (percent >0 && percent <= BATTERY_LOWPOWER_ALARM_POWERLEVEL) { - low_power_play_toUI(1); + low_power_play_toUI(0); } + } #endif -- 2.17.1