From 62652fdd8adabad5d6ec09a99b733ea45608fa5d Mon Sep 17 00:00:00 2001
From: eried <1091420+eried@users.noreply.github.com>
Date: Tue, 9 Jun 2020 23:43:45 +0200
Subject: [PATCH] Debug sd card verbose by @gregoryfenton

---
 firmware/application/ui_sd_card_debug.cpp | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/firmware/application/ui_sd_card_debug.cpp b/firmware/application/ui_sd_card_debug.cpp
index 74367210..4c54ff9c 100644
--- a/firmware/application/ui_sd_card_debug.cpp
+++ b/firmware/application/ui_sd_card_debug.cpp
@@ -46,6 +46,18 @@ public:
 		Incomplete = 0,
 		OK = 1,
 	};
+	std::string ResultStr[10] = {
+		"Compare",
+		"Read incomplete",
+		"Write incomplete",
+		"Abort",
+		"File Open Read",
+		"File Open Write",
+		"Heap",
+		"Thread",
+		"Incomplete",
+		"OK",
+	};
 
 	struct Stats {
 		halrtcnt_t write_duration_min { 0 };
@@ -423,7 +435,7 @@ void SDCardDebugView::on_test() {
 			format_bytes_per_ticks_as_mib(stats.read_bytes, stats.read_test_duration)
 		);
 	} else {
-		text_test_write_time_value.set("Fail: " + to_string_dec_int(toUType(thread.result()), 4));
+		text_test_write_time_value.set("Fail: " + thread.ResultStr[thread.result() + 8]);
 	}
 }
 
-- 
GitLab