From a016eb7f81e73766608920314a5949ed188e14df Mon Sep 17 00:00:00 2001 From: ThinkPad-T460P Date: Tue, 22 Dec 2020 15:56:15 +0800 Subject: [PATCH] Update freertos.c --- Core/Src/freertos.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/Src/freertos.c b/Core/Src/freertos.c index 5ad7326..59a6127 100644 --- a/Core/Src/freertos.c +++ b/Core/Src/freertos.c @@ -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 */