Implement serial debug logging #22

Manually merged
eeeck merged 13 commits from dev_debug into dev_serial-send 2026-06-17 20:52:29 +02:00
Showing only changes of commit 17c500e39a - Show all commits
+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");
}
}
}