From 6a6227ed8519683d9d0d80c4d081cd3cc6bda725 Mon Sep 17 00:00:00 2001 From: Marcel Peterkau Date: Sat, 18 Mar 2023 15:20:16 +0100 Subject: [PATCH] DTC-Debug Formatting --- Software/src/debugger.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Software/src/debugger.cpp b/Software/src/debugger.cpp index 3858f4b..6e2b6a0 100644 --- a/Software/src/debugger.cpp +++ b/Software/src/debugger.cpp @@ -305,6 +305,8 @@ void Debug_ShowDTCs() char buff_timestamp[16]; // Format: DD-hh:mm:ss:xxx char buff_active[9]; + Debug_pushMessage("\n timestamp | DTC-Nr. | status | severity\n"); + for (uint32_t i = 0; i < MAX_DTC_STORAGE; i++) { if (DTCStorage[i].Number < DTC_LAST_DTC) @@ -323,7 +325,7 @@ void Debug_ShowDTCs() else strcpy(buff_active, "none"); - Debug_pushMessage("%s \t %6d \t %s \t %d\n", buff_timestamp, DTCStorage[i].Number, buff_active, DTCStorage[i].severity); + Debug_pushMessage("%s %7d %8s %8d\n", buff_timestamp, DTCStorage[i].Number, buff_active, DTCStorage[i].severity); } } }