1.电池调整

This commit is contained in:
payton 2024-02-05 11:36:08 +08:00
parent 7345c7f689
commit b7a5536a9c

View File

@ -1508,11 +1508,15 @@ BOOL sf_is_battery_low(UINT8 refresh, UINT8 nightMode)
{
UINT8 batteryVal = 0;
UINT8 batteryLevel = 0;
int cnt = 100;
UINT8 PowerOnMode = sf_poweron_type_get();
if((refresh) && (PowerOnMode != PWR_ON_SETUP))
{
sf_battery_value_fast_get();
while((sf_battery_level_get() == SF_BATT_LEVEL_TOTAL) && (cnt--))
{
vos_util_delay_ms(10);
}
//printf("DC=%d Custom=%d bat=%d\n", dcValue, CustomValue, batli8v);
}
@ -1593,8 +1597,13 @@ void sf_set_need_check_first(void)
*************************************************/
BOOL sf_is_enough_power_to_update(void)
{
int cnt = 100;
//sf_set_need_check_first();
sf_battery_value_fast_get();
while((sf_battery_level_get() == SF_BATT_LEVEL_TOTAL) && (cnt--))
{
vos_util_delay_ms(10);
}
printf("update DC=%d Li=%d Bat=%d\n", DcVoltageVal, LiPolymerVoltageVal, BatVoltageVal);
if(sf_battery_value_get(0) < 40)