1.电池调整
This commit is contained in:
parent
7345c7f689
commit
b7a5536a9c
|
@ -1508,11 +1508,15 @@ BOOL sf_is_battery_low(UINT8 refresh, UINT8 nightMode)
|
||||||
{
|
{
|
||||||
UINT8 batteryVal = 0;
|
UINT8 batteryVal = 0;
|
||||||
UINT8 batteryLevel = 0;
|
UINT8 batteryLevel = 0;
|
||||||
|
int cnt = 100;
|
||||||
UINT8 PowerOnMode = sf_poweron_type_get();
|
UINT8 PowerOnMode = sf_poweron_type_get();
|
||||||
if((refresh) && (PowerOnMode != PWR_ON_SETUP))
|
if((refresh) && (PowerOnMode != PWR_ON_SETUP))
|
||||||
{
|
{
|
||||||
|
sf_battery_value_fast_get();
|
||||||
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);
|
//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)
|
BOOL sf_is_enough_power_to_update(void)
|
||||||
{
|
{
|
||||||
|
int cnt = 100;
|
||||||
//sf_set_need_check_first();
|
//sf_set_need_check_first();
|
||||||
sf_battery_value_fast_get();
|
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);
|
printf("update DC=%d Li=%d Bat=%d\n", DcVoltageVal, LiPolymerVoltageVal, BatVoltageVal);
|
||||||
|
|
||||||
if(sf_battery_value_get(0) < 40)
|
if(sf_battery_value_get(0) < 40)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user