1.更新电压分位;2默认开启mcu dbg

This commit is contained in:
payton 2024-01-19 21:23:38 +08:00
parent 6bfe77d556
commit e1a4a03362
5 changed files with 25 additions and 21 deletions

View File

@ -1177,9 +1177,9 @@ UINT8 sf_battery_value_get(UINT8 nightMode)
{
batteryVal = LiPolymerVoltageVal;
if(batteryVal < 65)
if(batteryVal < 66)
{
if(nightMode && (batteryVal >= 43))
if(nightMode && (batteryVal >= 45))
value = 1;
else
value = 0;
@ -1235,9 +1235,9 @@ UINT8 sf_battery_value_get(UINT8 nightMode)
if(puiPara->BatteryType == SF_BATT_ALKALINE) //ALK
{
if(batteryVal < 62)
if(batteryVal < 63)
{
if(nightMode && (batteryVal >= 43))
if(nightMode && (batteryVal >= 45))
value = 1;
else
value = 0;
@ -1289,18 +1289,18 @@ UINT8 sf_battery_value_get(UINT8 nightMode)
}
else if(puiPara->BatteryType == SF_BATT_NI_MH) //NIH
{
if(batteryVal < 60)
if(batteryVal < 61)
{
if(nightMode && (batteryVal >= 43))
if(nightMode && (batteryVal >= 45))
value = 1;
else
value = 0;
}
else if(batteryVal < 61)
else if(batteryVal < 62)
{
value = 1;
}
else if(batteryVal < 62)
else if(batteryVal < 63)
{
value = 10;
}
@ -1343,9 +1343,9 @@ UINT8 sf_battery_value_get(UINT8 nightMode)
}
else
{
if(batteryVal < 62)
if(batteryVal < 63)
{
if(nightMode && (batteryVal >= 43))
if(nightMode && (batteryVal >= 45))
value = 1;
else
value = 0;

View File

@ -412,5 +412,6 @@ SINT32 sf_sys_rtc_time_set(SF_PARA_TIME_S* pstDateTime);
void sf_set_ae_night_mode(UINT8 isNightMode);
UINT32 sf_get_send_pic_sieze(void);
void sf_mcu_version_get(UINT8 *mcuVer);
BOOL sf_is_night_mode(BOOL isRefresh);
#endif

View File

@ -2595,7 +2595,7 @@ BOOL sf_is_flash_voltage_abnormal(void)
printf("powerVal=%d batteryType=%d \n", powerVal, batteryType);
if((/*SF_POWER_TYPE_DC*/1 != batteryType) && (powerVal < 55) )
if((/*SF_POWER_TYPE_DC*/1 != batteryType) && (powerVal < 56) )
{
printf("low battery no write flash\n");
return TRUE;

View File

@ -1049,9 +1049,9 @@ UINT8 sf_battery_value_get(UINT8 nightMode)
{
batteryVal = LiPolymerVoltageVal;
if(batteryVal < 65)
if(batteryVal < 66)
{
if(nightMode && (batteryVal >= 43))
if(nightMode && (batteryVal >= 45))
value = 1;
else
value = 0;
@ -1107,9 +1107,9 @@ UINT8 sf_battery_value_get(UINT8 nightMode)
if(puiPara->BatteryType == SF_BATT_ALKALINE) //ALK
{
if(batteryVal < 62)
if(batteryVal < 63)
{
if(nightMode && (batteryVal >= 43))
if(nightMode && (batteryVal >= 45))
value = 1;
else
value = 0;
@ -1161,18 +1161,18 @@ UINT8 sf_battery_value_get(UINT8 nightMode)
}
else if(puiPara->BatteryType == SF_BATT_NI_MH) //NIH
{
if(batteryVal < 60)
if(batteryVal < 61)
{
if(nightMode && (batteryVal >= 43))
if(nightMode && (batteryVal >= 45))
value = 1;
else
value = 0;
}
else if(batteryVal < 61)
else if(batteryVal < 62)
{
value = 1;
}
else if(batteryVal < 62)
else if(batteryVal < 63)
{
value = 10;
}
@ -1215,9 +1215,9 @@ UINT8 sf_battery_value_get(UINT8 nightMode)
}
else
{
if(batteryVal < 62)
if(batteryVal < 63)
{
if(nightMode && (batteryVal >= 43))
if(nightMode && (batteryVal >= 45))
value = 1;
else
value = 0;

View File

@ -1770,6 +1770,9 @@ UINT8 sf_mcu_reg_set(MCUParam_t attrId, UINT8 val)
mcuData[i++] = puiPara->TimeSend4.Min;
}else if(attrId == SF_MCU_CTRL_MODULE_PIR){
mcuReg[i] = FUNCTION_SWTICH2;//dbg test
mcuData[i++] = 2;
mcuReg[i] = WDT_TIME;
mcuData[i++] = 5;//sf_mcu_wdg_set(5);