Update freertos.c
parent
9d791ab56d
commit
a016eb7f81
|
@ -585,6 +585,7 @@ void StartPowerMonitTask(void *argument)
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
|
osDelay(5000);
|
||||||
if(NaviKit.sys.sta == running){
|
if(NaviKit.sys.sta == running){
|
||||||
if(NaviKit.pmb.rails.out_24v > 26.4 || NaviKit.pmb.rails.out_24v < 21.6){
|
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);
|
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){
|
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);
|
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");
|
Log(warning,"Backup power is not online");
|
||||||
}
|
}
|
||||||
if(NaviKit.pmb.rails.main_pwr < 19){
|
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");
|
Log(warning,"Main power has been lost, please shutdown computer as soon as possible");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(NaviKit.pmb.rails.bkp_bat > 15){
|
if(NaviKit.pmb.rails.bkp_bat > 15){
|
||||||
Log(error,"Backup power is exception:%dV",NaviKit.pmb.rails.bkp_bat);
|
Log(error,"Backup power is exception:%dV",NaviKit.pmb.rails.bkp_bat);
|
||||||
|
Beep(200);
|
||||||
}
|
}
|
||||||
if(NaviKit.pmb.rails.main_pwr > 30){
|
if(NaviKit.pmb.rails.main_pwr > 30){
|
||||||
Beep(100);
|
Beep(200);
|
||||||
Log(error,"Backup power is exception:%dV",NaviKit.pmb.rails.main_pwr);
|
Log(error,"Backup power is exception:%dV",NaviKit.pmb.rails.main_pwr);
|
||||||
}
|
}
|
||||||
osDelay(5000);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/* USER CODE END StartPowerMonitTask */
|
/* USER CODE END StartPowerMonitTask */
|
||||||
|
|
Loading…
Reference in New Issue