From 6364c7cb2c033a0a63d15e2d755a4e21f655bbee Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Tue, 7 Mar 2023 00:18:54 -0500 Subject: [PATCH 1/2] TS: use BOARD_NAME in Test and Version commands reply (#211) * TS: use BOARD_NAME in Test and Version commands reply * making source code two bytes smaller * making source code two bytes smaller * making source code two bytes smaller --------- Co-authored-by: Andrey Gusakov Co-authored-by: rusefillc --- firmware/console/binary/tunerstudio.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/firmware/console/binary/tunerstudio.cpp b/firmware/console/binary/tunerstudio.cpp index e7a37c9..9af681e 100644 --- a/firmware/console/binary/tunerstudio.cpp +++ b/firmware/console/binary/tunerstudio.cpp @@ -215,8 +215,6 @@ static bool isKnownCommand(char command) { * rusEfi own test command */ -#define VCS_VERSION "unknown" - static void handleTestCommand(TsChannelBase* tsChannel) { tsState.testCommandCounter++; char testOutputBuffer[64]; @@ -225,10 +223,10 @@ static void handleTestCommand(TsChannelBase* tsChannel) { * extension of the protocol to simplify troubleshooting */ tunerStudioDebug(tsChannel, "got T (Test)"); - chsnprintf(testOutputBuffer, sizeof(testOutputBuffer), VCS_VERSION "\r\n"); + chsnprintf(testOutputBuffer, sizeof(testOutputBuffer), BOARD_NAME "\r\n"); tsChannel->write((const uint8_t*)testOutputBuffer, strlen(testOutputBuffer)); - chsnprintf(testOutputBuffer, sizeof(testOutputBuffer), __DATE__ "\r\n"); + chsnprintf(testOutputBuffer, sizeof(testOutputBuffer), __DATE__ "\r\n"); tsChannel->write((const uint8_t*)testOutputBuffer, strlen(testOutputBuffer)); /* @@ -464,8 +462,7 @@ void tunerStudioError(TsChannelBase* tsChannel, const char *msg) { static void handleGetVersion(TsChannelBase* tsChannel) { char versionBuffer[32]; - //chsnprintf(versionBuffer, sizeof(versionBuffer), "rusEFI v%d@%s", getRusEfiVersion(), VCS_VERSION); - chsnprintf(versionBuffer, sizeof(versionBuffer), "rusEFI Wideband Rev2"); + chsnprintf(versionBuffer, sizeof(versionBuffer), BOARD_NAME); tsChannel->sendResponse(TS_CRC, (const uint8_t *) versionBuffer, strlen(versionBuffer) + 1); } From 84c7c4c57695931cabc53ec84d9afecd1312f595 Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Tue, 7 Mar 2023 00:26:32 -0500 Subject: [PATCH 2/2] time to squash (#213) Co-authored-by: rusefillc --- firmware/boards/build_f1_board.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/firmware/boards/build_f1_board.sh b/firmware/boards/build_f1_board.sh index 46b8e95..b36d425 100755 --- a/firmware/boards/build_f1_board.sh +++ b/firmware/boards/build_f1_board.sh @@ -65,7 +65,9 @@ if [ $USE_OPENBLT = "yes" ]; then $SREC_CAT ${OPENBLT_HEX} -Intel build/wideband.hex -Intel -o ${DELIVER_DIR}/wideband.hex -Intel else echo "Bin for raw flashing" - cp build/wideband.bin ${DELIVER_DIR}/wideband.bin + cp build/wideband.bin ${DELIVER_DIR} + + cp build/wideband.hex ${DELIVER_DIR} echo "Invoking hex2dfu for DFU file" $HEX2DFU -i build/wideband.hex -o ${DELIVER_DIR}/wideband.dfu