From b43b2a6616d60412fb4e063127e696198346d169 Mon Sep 17 00:00:00 2001 From: ThinkPad-T460P Date: Fri, 15 Jan 2021 17:04:20 +0800 Subject: [PATCH] Update freertos.c --- Core/Src/freertos.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Core/Src/freertos.c b/Core/Src/freertos.c index 0e7dcbd..873b69b 100644 --- a/Core/Src/freertos.c +++ b/Core/Src/freertos.c @@ -285,7 +285,7 @@ void MX_FREERTOS_Init(void) { // CoulombReadHandle = osThreadNew(StartCoulombRead, NULL, &CoulombRead_attributes); /* creation of PowerMonitTask */ - PowerMonitTaskHandle = osThreadNew(StartPowerMonitTask, NULL, &PowerMonitTask_attributes); +// PowerMonitTaskHandle = osThreadNew(StartPowerMonitTask, NULL, &PowerMonitTask_attributes); /* creation of EventDetect */ EventDetectHandle = osThreadNew(StartEventDetect, NULL, &EventDetect_attributes); @@ -380,30 +380,30 @@ void StartDefaultTask(void *argument) NaviKit.sys.sta = NaviKit.sys.next_sta; } break; case run: { - if(NaviKit.pmb.rails.main_pwr>19){ +// if(NaviKit.pmb.rails.main_pwr>19){ enter_run_state(100); NaviKit.sys.sta = NaviKit.sys.next_sta; - }else{ - NaviKit.sys.next_sta = NaviKit.sys.sta; - TaskBeep(500,2); - Log(error,pmb,"Main power not exist, retry after plug in it."); - Log(fatal,pmb,"Main power is exception:%dmV",(uint32_t)(NaviKit.pmb.rails.main_pwr*1000)); - } +// }else{ +// NaviKit.sys.next_sta = NaviKit.sys.sta; +// TaskBeep(500,2); +// Log(error,pmb,"Main power not exist, retry after plug in it."); +// Log(fatal,pmb,"Main power is exception:%dmV",(uint32_t)(NaviKit.pmb.rails.main_pwr*1000)); +// } }break; case sleep:{ enter_sleep_state(100); NaviKit.sys.sta = NaviKit.sys.next_sta; }break; case dfu:{ - if(NaviKit.pmb.rails.main_pwr>19){ +// if(NaviKit.pmb.rails.main_pwr>19){ enter_dfu_state(100); NaviKit.sys.sta = NaviKit.sys.next_sta; - }else{ - NaviKit.sys.next_sta = NaviKit.sys.sta; - TaskBeep(500,2); - Log(error,pmb,"Main power not exist, retry after plug in it."); - Log(fatal,pmb,"Main power is exception:%dmV",(uint32_t)(NaviKit.pmb.rails.main_pwr*1000)); - } +// }else{ +// NaviKit.sys.next_sta = NaviKit.sys.sta; +// TaskBeep(500,2); +// Log(error,pmb,"Main power not exist, retry after plug in it."); +// Log(fatal,pmb,"Main power is exception:%dmV",(uint32_t)(NaviKit.pmb.rails.main_pwr*1000)); +// } }break; case isp:{ enter_isp_state();