Update freertos.c

master
ThinkPad-T460P 2020-12-22 15:56:15 +08:00
parent 9d791ab56d
commit a016eb7f81
1 changed files with 5 additions and 4 deletions

View File

@ -585,6 +585,7 @@ void StartPowerMonitTask(void *argument)
/* Infinite loop */
for(;;)
{
osDelay(5000);
if(NaviKit.sys.sta == running){
if(NaviKit.pmb.rails.out_24v > 26.4 || NaviKit.pmb.rails.out_24v < 21.6){
Log(error,"24V(±10%) power rail exception:%dV",NaviKit.pmb.rails.out_24v);
@ -595,22 +596,22 @@ void StartPowerMonitTask(void *argument)
if(NaviKit.pmb.rails.out_12v > 13.2 || NaviKit.pmb.rails.out_12v < 10.8){
Log(error ,"12V(±10%) power rail exception:%dV",NaviKit.pmb.rails.out_12v);
}
if(NaviKit.pmb.rails.bkp_bat < 10){
if(NaviKit.pmb.rails.bkp_bat < 9.5){
Log(warning,"Backup power is not online");
}
if(NaviKit.pmb.rails.main_pwr < 19){
Beep(100);
Beep(200);
Log(warning,"Main power has been lost, please shutdown computer as soon as possible");
}
}
if(NaviKit.pmb.rails.bkp_bat > 15){
Log(error,"Backup power is exception:%dV",NaviKit.pmb.rails.bkp_bat);
Beep(200);
}
if(NaviKit.pmb.rails.main_pwr > 30){
Beep(100);
Beep(200);
Log(error,"Backup power is exception:%dV",NaviKit.pmb.rails.main_pwr);
}
osDelay(5000);
}
/* USER CODE END StartPowerMonitTask */