From 2e8460cffe99f9fe880360c32f23845b2940593d Mon Sep 17 00:00:00 2001 From: Cam0Cow Date: Sat, 30 Sep 2023 14:34:20 -0500 Subject: [PATCH] Remove contactor handling and extraneous delays from main --- Apps/Src/main.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Apps/Src/main.c b/Apps/Src/main.c index 56655828c..bd1254ce2 100644 --- a/Apps/Src/main.c +++ b/Apps/Src/main.c @@ -70,15 +70,9 @@ void Task_Init(void *p_arg){ // Start systick OS_CPU_SysTickInit(SystemCoreClock / (CPU_INT32U) OSCfg_TickRate_Hz); - - OSTimeDlyHMSM(0,0,5,0,OS_OPT_TIME_HMSM_STRICT,&err); - - assertOSError(OS_MAIN_LOC, err); // Initialize drivers Pedals_Init(); - OSTimeDlyHMSM(0,0,5,0,OS_OPT_TIME_HMSM_STRICT,&err); - OSTimeDlyHMSM(0,0,10,0,OS_OPT_TIME_HMSM_STRICT,&err); BSP_UART_Init(UART_2); CANbus_Init(CARCAN, (CANId_t*)carCANFilterList, NUM_CARCAN_FILTERS); CANbus_Init(MOTORCAN, NULL, NUM_MOTORCAN_FILTERS); @@ -198,10 +192,5 @@ void Task_Init(void *p_arg){ ); assertOSError(OS_MAIN_LOC, err); - - while(1){ - Contactors_Set(MOTOR_CONTACTOR, Minions_Read(IGN_2), true); //turn on the contactor if the ign switch lets us - assertOSError(OS_MINIONS_LOC, err); - OSTimeDlyHMSM(0, 0, 0, IGN_CONT_PERIOD, OS_OPT_TIME_HMSM_NON_STRICT, &err); - } + OSTaskDel(NULL, &err); }