diff --git a/firmware/console/binary/tunerstudio.cpp b/firmware/console/binary/tunerstudio.cpp index 7d0d469dab..1e849cf87b 100644 --- a/firmware/console/binary/tunerstudio.cpp +++ b/firmware/console/binary/tunerstudio.cpp @@ -407,6 +407,7 @@ static bool isKnownCommand(char command) { return command == TS_HELLO_COMMAND || command == TS_READ_COMMAND || command == TS_OUTPUT_COMMAND || command == TS_PAGE_COMMAND || command == TS_BURN_COMMAND || command == TS_SINGLE_WRITE_COMMAND || command == TS_LEGACY_HELLO_COMMAND || command == TS_CHUNK_WRITE_COMMAND || command == TS_EXECUTE + || command == TS_IO_TEST_COMMAND || command == TS_GET_TEXT || command == TS_CRC_CHECK_COMMAND; } @@ -694,6 +695,10 @@ bool handlePlainCommand(ts_channel_s *tsChannel, uint8_t command) { } } +static void testIoCommand(void) { + +} + int tunerStudioHandleCrcCommand(ts_channel_s *tsChannel, char *data, int incomingPacketSize) { char command = data[0]; data++; @@ -748,6 +753,12 @@ int tunerStudioHandleCrcCommand(ts_channel_s *tsChannel, char *data, int incomin * If you are able to just make your firmware ignore the command that would work. * Currently on some firmware versions the F command is not used and is just ignored by the firmware as a unknown command." */ + } else if (command == TS_IO_TEST_COMMAND) { + int subsystem = data[3]; + int index = *(short*)data[0]; + + scheduleMsg(&tsLogger, "IO test %d %d %d", incomingPacketSize, subsystem, index); + testIoCommand(); } else { tunerStudioError("ERROR: ignoring unexpected command"); return false; diff --git a/firmware/console/binary/tunerstudio_io.h b/firmware/console/binary/tunerstudio_io.h index 67010f655e..2a1703a045 100644 --- a/firmware/console/binary/tunerstudio_io.h +++ b/firmware/console/binary/tunerstudio_io.h @@ -60,6 +60,7 @@ typedef struct { #define TS_SINGLE_WRITE_COMMAND 'W' #define TS_CHUNK_WRITE_COMMAND 'C' #define TS_BURN_COMMAND 'B' +#define TS_IO_TEST_COMMAND 'w' #define TS_CRC_CHECK_COMMAND 'k' diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index ab2e9d36b4..fd829f0a26 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -1180,22 +1180,22 @@ fileVersion = { 20160122 } ; and may create error messages. ; It is expected that these commands would not typically alter any ram mapped to a Constant. -cmdinjspk1 = "w\x00\x00\x00\x20" -cmdinjspk2 = "w\x00\x00\x00\x21" -cmdinjspk3 = "w\x00\x00\x00\x22" -cmdinjspk4 = "w\x00\x00\x00\x23" -cmdinjspk5 = "w\x00\x00\x00\x24" -cmdinjspk6 = "w\x00\x00\x00\x25" -cmdinjspk7 = "w\x00\x00\x00\x26" -cmdinjspk8 = "w\x00\x00\x00\x27" -cmdinjspk9 = "w\x00\x00\x00\x28" -cmdinjspk10 = "w\x00\x00\x00\x29" -cmdinjspk11 = "w\x00\x00\x00\x2a" -cmdinjspk12 = "w\x00\x00\x00\x2b" -cmdinjspk13 = "w\x00\x00\x00\x2c" -cmdinjspk14 = "w\x00\x00\x00\x2d" -cmdinjspk15 = "w\x00\x00\x00\x2e" -cmdinjspk16 = "w\x00\x00\x00\x2f" +cmd_test_spk1 = "w\x00\x00\x00\x00" +cmd_test_ppk2 = "w\x00\x00\x00\x01" +cmd_test_ppk3 = "w\x00\x00\x00\x02" +cmd_test_ppk4 = "w\x00\x00\x00\x03" +cmd_test_ppk5 = "w\x00\x00\x00\x04" +cmd_test_ppk6 = "w\x00\x00\x00\x05" +cmd_test_ppk7 = "w\x00\x00\x00\x06" +cmd_test_ppk8 = "w\x00\x00\x00\x07" +cmd_test_ppk9 = "w\x00\x00\x00\x08" +cmd_test_ppk10 = "w\x00\x00\x00\x09" +cmd_test_ppk11 = "w\x00\x00\x00\x0a" +cmd_test_ppk12 = "w\x00\x00\x00\x0b" +cmd_test_ppk13 = "w\x00\x00\x00\x0c" +cmd_test_ppk14 = "w\x00\x00\x00\x0d" +cmd_test_ppk15 = "w\x00\x00\x00\x0e" +cmd_test_ppk16 = "w\x00\x00\x00\x0f" [UserDefined]