Add debug messages for UART

This commit is contained in:
2026-06-17 18:11:46 +02:00
parent 91218e782e
commit 17c500e39a
+4 -1
View File
@@ -103,11 +103,14 @@ void vUARTLogger(void *argument)
for (;;)
{
DEBUG_PRINT("Waiting for CAN traffic...\r\n");
if (osMessageQueueGet(xUARTQueue, &message, NULL, osWaitForever) == osOK)
{
format_can_message(tx_buffer, message.source, &message); // Assuming you add 'source' to the struct
DEBUG_PRINT("CAN frame detected\r\n");
format_can_message(tx_buffer, message.source, &message);
HAL_UART_Transmit_DMA(&huart1, (uint8_t*)tx_buffer, 44);
osSemaphoreAcquire(xUARTDMASemaphore, osWaitForever);
DEBUG_PRINT("CAN frame sent via UART\r\n");
}
}
}