From 1b2be671dd89fd074afc0b51ad32da8b167af418 Mon Sep 17 00:00:00 2001 From: rusefi Date: Tue, 13 Jul 2021 22:53:11 -0400 Subject: [PATCH] 't' comammand to return fatal error text --- firmware/console/binary/tunerstudio.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/firmware/console/binary/tunerstudio.cpp b/firmware/console/binary/tunerstudio.cpp index f5abe889ed..a3dcb65026 100644 --- a/firmware/console/binary/tunerstudio.cpp +++ b/firmware/console/binary/tunerstudio.cpp @@ -610,6 +610,12 @@ static void handleTestCommand(TsChannelBase* tsChannel) { chsnprintf(testOutputBuffer, sizeof(testOutputBuffer), " %s\r\n", PROTOCOL_TEST_RESPONSE_TAG); tsChannel->write((const uint8_t*)testOutputBuffer, strlen(testOutputBuffer)); + + if (hasFirmwareError()) { + const char* error = getFirmwareError(); + chsnprintf(testOutputBuffer, sizeof(testOutputBuffer), "error=%s\r\n", error); + tsChannel->write((const uint8_t*)testOutputBuffer, strlen(testOutputBuffer)); + } } extern CommandHandler console_line_callback;