From d2d9d21f3df814ca49f90f32b7132054f3877b11 Mon Sep 17 00:00:00 2001 From: Erick Ahmed Date: Thu, 30 Jul 2026 00:09:52 +0200 Subject: [PATCH] Add timeout to LED heartbeat thread flags --- Core/Src/canlog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/Src/canlog.c b/Core/Src/canlog.c index 85b0ada..5b21da9 100644 --- a/Core/Src/canlog.c +++ b/Core/Src/canlog.c @@ -140,10 +140,11 @@ void vLEDHeartbeat(void *argument) for (;;) { - uint32_t notification = osThreadFlagsWait(0x01, osFlagsWaitAny, osWaitForever); + uint32_t notification = osThreadFlagsWait(0x01, osFlagsWaitAny, LED_BLINK_MS); if (notification & 0x01) HAL_GPIO_WritePin(led->port, led->pin, GPIO_PIN_SET); else HAL_GPIO_WritePin(led->port, led->pin, GPIO_PIN_RESET); + } } /* END vLEDHeartbeat */ /* USER CODE END FunctionPrototypes */