Skip to content

Commit

Permalink
Remove contactor handling and extraneous delays from main
Browse files Browse the repository at this point in the history
  • Loading branch information
Cam0Cow committed Sep 30, 2023
1 parent a0d1c0c commit 2e8460c
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions Apps/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

0 comments on commit 2e8460c

Please sign in to comment.