auto-sync

This commit is contained in:
rusEfi 2015-01-27 22:04:23 -06:00
parent 2f8c04aa14
commit e505bdcb06
4 changed files with 12 additions and 6 deletions

View File

@ -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");
/**

View File

@ -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'

View File

@ -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

View File

@ -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"