From e505bdcb064bb52090b4e86425b7ab28b6c5eaf0 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Tue, 27 Jan 2015 22:04:23 -0600 Subject: [PATCH] auto-sync --- firmware/console/tunerstudio/tunerstudio_algo.cpp | 9 +++++++-- firmware/console/tunerstudio/tunerstudio_algo.h | 3 ++- firmware/console/tunerstudio/tunerstudio_configuration.h | 2 +- firmware/tunerstudio/rusefi.ini | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/firmware/console/tunerstudio/tunerstudio_algo.cpp b/firmware/console/tunerstudio/tunerstudio_algo.cpp index 304f08ef38..804c9db9b0 100644 --- a/firmware/console/tunerstudio/tunerstudio_algo.cpp +++ b/firmware/console/tunerstudio/tunerstudio_algo.cpp @@ -76,8 +76,8 @@ void tunerStudioError(const char *msg) { int tunerStudioHandleCrcCommand(uint8_t *data, int incomingPacketSize) { char command = data[0]; data++; - if (command == TS_HELLO_COMMAND) { - tunerStudioDebug("got CRC Query"); + if (command == TS_HELLO_COMMAND || command == TS_HELLO_COMMAND_DEPRECATED) { + tunerStudioDebug("got Query command"); handleQueryCommand(TS_CRC); } else if (command == TS_OUTPUT_COMMAND) { handleOutputChannelsCommand(TS_CRC); @@ -103,6 +103,11 @@ int tunerStudioHandleCrcCommand(uint8_t *data, int incomingPacketSize) { handlePageReadCommand(TS_CRC, page, offset, count); } else if (command == 't' || command == 'T') { handleTestCommand(); + } else if (command == 'Q') { + /** + * 'Q' is the query command used for compatibility with older ECUs + */ + tunerStudioDebug("ignoring Q"); } else if (command == 'F') { tunerStudioDebug("ignoring F"); /** diff --git a/firmware/console/tunerstudio/tunerstudio_algo.h b/firmware/console/tunerstudio/tunerstudio_algo.h index 90574887b7..de779698d0 100644 --- a/firmware/console/tunerstudio/tunerstudio_algo.h +++ b/firmware/console/tunerstudio/tunerstudio_algo.h @@ -61,7 +61,8 @@ void tunerStudioDebug(const char *msg); void tunerStudioError(const char *msg); -#define TS_HELLO_COMMAND 'H' +#define TS_HELLO_COMMAND_DEPRECATED 'H' +#define TS_HELLO_COMMAND 'S' #define TS_OUTPUT_COMMAND 'O' #define TS_READ_COMMAND 'R' #define TS_PAGE_COMMAND 'P' diff --git a/firmware/console/tunerstudio/tunerstudio_configuration.h b/firmware/console/tunerstudio/tunerstudio_configuration.h index 3c093f1e26..ea11b46aae 100644 --- a/firmware/console/tunerstudio/tunerstudio_configuration.h +++ b/firmware/console/tunerstudio/tunerstudio_configuration.h @@ -14,7 +14,7 @@ /** * this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version */ -#define TS_FILE_VERSION 20150112 +#define TS_FILE_VERSION 20150127 #define PAGE_0_SIZE 11832 #define TS_OUTPUT_SIZE 116 diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index b659fcb94c..523a4fd2fe 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -4,7 +4,7 @@ enable2ndByteCanID = false [TunerStudio] - queryCommand = "H" + queryCommand = "S" signature = "MShift v0.01" ; signature is expected to be 7 or more characters. [Constants] @@ -399,7 +399,7 @@ enable2ndByteCanID = false [OutputChannels] ; see TS_FILE_VERSION in firmware code -fileVersion = { 20150112 } +fileVersion = { 20150127 } ochGetCommand = "O"