Simplify CAN error code handler
This commit is contained in:
+1
-1
@@ -449,7 +449,7 @@ void Error_Handler(void)
|
||||
uint32_t error_code;
|
||||
|
||||
if (HAL_CAN_GetState(&hcan1) != HAL_CAN_STATE_READY) error_code = HAL_CAN_GetError(&hcan1);
|
||||
else if (HAL_CAN_GetState(&hcan2) != HAL_CAN_STATE_READY) error_code = HAL_CAN_GetError(&hcan2);
|
||||
if (HAL_CAN_GetState(&hcan2) != HAL_CAN_STATE_READY) error_code = HAL_CAN_GetError(&hcan2);
|
||||
|
||||
// TODO: write error to SD and/or serial
|
||||
|
||||
|
||||
Reference in New Issue
Block a user