From 53772ccb7d784315c2060b598c31031b03958d55 Mon Sep 17 00:00:00 2001 From: Erick Ahmed Date: Sun, 14 Jun 2026 16:45:02 +0200 Subject: [PATCH] Remove error handling as it would cause crash on full queue --- Core/Src/canlog.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Core/Src/canlog.c b/Core/Src/canlog.c index 0017e6b..509a9b2 100644 --- a/Core/Src/canlog.c +++ b/Core/Src/canlog.c @@ -82,12 +82,12 @@ void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan) memcpy(message.payload, data, rxHeader.DLC); osMessageQueueId_t queue = (hcan->Instance == CAN1) ? xCAN1RxQueue : xCAN2RxQueue; - if (osMessageQueuePut(queue, &message, 0U, 0U) != osOK) Error_Handler(); - // TODO: better handling: flash error_led on osTimeout, call Error_Handler() when other errors - - // Issue #1: set an event flag for led task - // osEventFlagsSet(xCanEventFlags, (hcan->Instance == CAN1) ? 0x01 : 0x02); + if (osMessageQueuePut(queue, &message, 0U, 0U) != osOK) + { + // TODO: better handling: flash error_led on osTimeout, call Error_Handler() when other errors + // send errors like queue full via UART + } /* CODE END */ } /* END HAL_CAN_RxFifo0MsgPendingCallback */