低电量报警修改
authorhcj <1224667075@qq.com>
Thu, 24 Oct 2024 08:05:45 +0000 (16:05 +0800)
committerhcj <1224667075@qq.com>
Thu, 24 Oct 2024 08:05:45 +0000 (16:05 +0800)
code/sdk/application/battery/service/battery_service.cpp

index 5858473..821d5ff 100644 (file)
@@ -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