In case of incompatible firmware and console we have a vague error message fix #1180
This commit is contained in:
parent
2a07d4f2e4
commit
ff7438162b
|
@ -2020,7 +2020,7 @@
|
|||
#define triggerSimulatorPins2_offset_hex 2e1
|
||||
#define triggerSimulatorPins3_offset 738
|
||||
#define triggerSimulatorPins3_offset_hex 2e2
|
||||
#define TS_FILE_VERSION 20191221
|
||||
#define TS_FILE_VERSION 20200310
|
||||
#define TS_OUTPUT_SIZE 240
|
||||
#define ts_show_analog_divider true
|
||||
#define ts_show_cj125 true
|
||||
|
@ -2032,7 +2032,7 @@
|
|||
#define ts_show_hip9011 true
|
||||
#define ts_show_joystick true
|
||||
#define ts_show_lcd true
|
||||
#define TS_SIGNATURE "rusEFI v1.08"
|
||||
#define TS_SIGNATURE "rusEFI v1.2020.3"
|
||||
#define tunerStudioSerialSpeed_offset 728
|
||||
#define tunerStudioSerialSpeed_offset_hex 2d8
|
||||
#define twoWireBatchIgnition_offset 1476
|
||||
|
|
|
@ -305,7 +305,7 @@ static void handleGetStructContent(ts_channel_s *tsChannel, int structId, int si
|
|||
// Returns true if an overrun would occur.
|
||||
static bool validateOffsetCount(size_t offset, size_t count, ts_channel_s *tsChannel) {
|
||||
if (offset + count > getTunerStudioPageSize()) {
|
||||
scheduleMsg(&tsLogger, "TS: ERROR invalid offset %d count %d", offset, count);
|
||||
scheduleMsg(&tsLogger, "TS: Project mismatch? Too much data requested %d/%d", offset, count);
|
||||
tunerStudioError("ERROR: out of range");
|
||||
sendErrorCode(tsChannel);
|
||||
return true;
|
||||
|
@ -631,7 +631,7 @@ void handleQueryCommand(ts_channel_s *tsChannel, ts_response_format_e mode) {
|
|||
*/
|
||||
void handleOutputChannelsCommand(ts_channel_s *tsChannel, ts_response_format_e mode, uint16_t offset, uint16_t count) {
|
||||
if (offset + count > sizeof(TunerStudioOutputChannels)) {
|
||||
scheduleMsg(&tsLogger, "TS: ERROR invalid offset %d count %d", offset, count);
|
||||
scheduleMsg(&tsLogger, "TS: Version Mismatch? Too much data requested %d+%d", offset, count);
|
||||
sendErrorCode(tsChannel);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -849,6 +849,6 @@ int getRusEfiVersion(void) {
|
|||
if (initBootloader() != 0)
|
||||
return 123;
|
||||
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
||||
return 201200309;
|
||||
return 201200310;
|
||||
}
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
|
|
@ -2020,7 +2020,7 @@
|
|||
#define triggerSimulatorPins2_offset_hex 2e1
|
||||
#define triggerSimulatorPins3_offset 738
|
||||
#define triggerSimulatorPins3_offset_hex 2e2
|
||||
#define TS_FILE_VERSION 20191221
|
||||
#define TS_FILE_VERSION 20200310
|
||||
#define TS_OUTPUT_SIZE 240
|
||||
#define ts_show_analog_divider true
|
||||
#define ts_show_cj125 true
|
||||
|
@ -2032,7 +2032,7 @@
|
|||
#define ts_show_hip9011 true
|
||||
#define ts_show_joystick true
|
||||
#define ts_show_lcd true
|
||||
#define TS_SIGNATURE "rusEFI v1.08"
|
||||
#define TS_SIGNATURE "rusEFI v1.2020.3"
|
||||
#define tunerStudioSerialSpeed_offset 728
|
||||
#define tunerStudioSerialSpeed_offset_hex 2d8
|
||||
#define twoWireBatchIgnition_offset 1476
|
||||
|
|
|
@ -23,12 +23,19 @@
|
|||
! type name;comment
|
||||
|
||||
|
||||
#define TS_SIGNATURE "rusEFI v1.08"
|
||||
#define TS_SIGNATURE "rusEFI v1.2020.3"
|
||||
|
||||
!
|
||||
! this is here so that rusEfi console can access it, too
|
||||
! [IMPORTANT] every time TS_OUTPUT_SIZE is changed make sure to increment TS_SIGNATURE above
|
||||
!
|
||||
#define TS_OUTPUT_SIZE 240
|
||||
|
||||
!
|
||||
! this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version
|
||||
! so not forget to change fileVersion in rusefi.ini
|
||||
! todo: is this not needed in light of TS_SIGNATURE?
|
||||
#define TS_FILE_VERSION 20191221
|
||||
#define TS_FILE_VERSION 20200310
|
||||
|
||||
|
||||
! all the sub-structures are going to be nested within the primary structure, that's
|
||||
|
@ -67,9 +74,6 @@ struct_no_prefix engine_configuration_s
|
|||
|
||||
#define ETB_BIAS_CURVE_LENGTH 8
|
||||
|
||||
! this is here so that rusEfi console can access it, too
|
||||
#define TS_OUTPUT_SIZE 240
|
||||
|
||||
#define MAP_ANGLE_SIZE 8
|
||||
#define MAP_WINDOW_SIZE 8
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ enable2ndByteCanID = false
|
|||
[TunerStudio]
|
||||
queryCommand = "S"
|
||||
versionInfo = "V" ; firmwave version for title bar.
|
||||
signature = "rusEFI v1.08" ; signature is expected to be 7 or more characters.
|
||||
signature = "rusEFI v1.2020.3" ; signature is expected to be 7 or more characters.
|
||||
|
||||
[Constants]
|
||||
; new packet serial format with CRC
|
||||
|
@ -85,7 +85,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Mar 10 14:31:37 EDT 2020
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Mar 10 18:46:05 EDT 2020
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
@ -1280,7 +1280,7 @@ page = 1
|
|||
|
||||
[OutputChannels]
|
||||
|
||||
fileVersion = { 20191221 }
|
||||
fileVersion = { 20200310 }
|
||||
|
||||
ochGetCommand = "O%2o%2c"
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ enable2ndByteCanID = false
|
|||
[TunerStudio]
|
||||
queryCommand = "S"
|
||||
versionInfo = "V" ; firmwave version for title bar.
|
||||
signature = "rusEFI v1.08" ; signature is expected to be 7 or more characters.
|
||||
signature = "rusEFI v1.2020.3" ; signature is expected to be 7 or more characters.
|
||||
|
||||
[Constants]
|
||||
; new packet serial format with CRC
|
||||
|
@ -85,7 +85,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Mar 10 14:31:45 EDT 2020
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Mar 10 18:46:13 EDT 2020
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
@ -1280,7 +1280,7 @@ page = 1
|
|||
|
||||
[OutputChannels]
|
||||
|
||||
fileVersion = { 20191221 }
|
||||
fileVersion = { 20200310 }
|
||||
|
||||
ochGetCommand = "O%2o%2c"
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ enable2ndByteCanID = false
|
|||
[TunerStudio]
|
||||
queryCommand = "S"
|
||||
versionInfo = "V" ; firmwave version for title bar.
|
||||
signature = "rusEFI v1.08" ; signature is expected to be 7 or more characters.
|
||||
signature = "rusEFI v1.2020.3" ; signature is expected to be 7 or more characters.
|
||||
|
||||
[Constants]
|
||||
; new packet serial format with CRC
|
||||
|
@ -85,7 +85,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Tue Mar 10 14:31:55 EDT 2020
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Tue Mar 10 18:46:23 EDT 2020
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
@ -1280,7 +1280,7 @@ page = 1
|
|||
|
||||
[OutputChannels]
|
||||
|
||||
fileVersion = { 20191221 }
|
||||
fileVersion = { 20200310 }
|
||||
|
||||
ochGetCommand = "O%2o%2c"
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ enable2ndByteCanID = false
|
|||
[TunerStudio]
|
||||
queryCommand = "S"
|
||||
versionInfo = "V" ; firmwave version for title bar.
|
||||
signature = "rusEFI v1.08" ; signature is expected to be 7 or more characters.
|
||||
signature = "rusEFI v1.2020.3" ; signature is expected to be 7 or more characters.
|
||||
|
||||
[Constants]
|
||||
; new packet serial format with CRC
|
||||
|
@ -85,7 +85,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Mar 10 14:31:41 EDT 2020
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Mar 10 18:46:10 EDT 2020
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
@ -1280,7 +1280,7 @@ page = 1
|
|||
|
||||
[OutputChannels]
|
||||
|
||||
fileVersion = { 20191221 }
|
||||
fileVersion = { 20200310 }
|
||||
|
||||
ochGetCommand = "O%2o%2c"
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ enable2ndByteCanID = false
|
|||
[TunerStudio]
|
||||
queryCommand = "S"
|
||||
versionInfo = "V" ; firmwave version for title bar.
|
||||
signature = "rusEFI v1.08" ; signature is expected to be 7 or more characters.
|
||||
signature = "rusEFI v1.2020.3" ; signature is expected to be 7 or more characters.
|
||||
|
||||
[Constants]
|
||||
; new packet serial format with CRC
|
||||
|
@ -85,7 +85,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Mar 10 14:31:48 EDT 2020
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Mar 10 18:46:17 EDT 2020
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
@ -1280,7 +1280,7 @@ page = 1
|
|||
|
||||
[OutputChannels]
|
||||
|
||||
fileVersion = { 20191221 }
|
||||
fileVersion = { 20200310 }
|
||||
|
||||
ochGetCommand = "O%2o%2c"
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ enable2ndByteCanID = false
|
|||
[TunerStudio]
|
||||
queryCommand = "S"
|
||||
versionInfo = "V" ; firmwave version for title bar.
|
||||
signature = "rusEFI v1.08" ; signature is expected to be 7 or more characters.
|
||||
signature = "rusEFI v1.2020.3" ; signature is expected to be 7 or more characters.
|
||||
|
||||
[Constants]
|
||||
; new packet serial format with CRC
|
||||
|
@ -85,7 +85,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Mar 10 14:31:52 EDT 2020
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Mar 10 18:46:20 EDT 2020
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
@ -1280,7 +1280,7 @@ page = 1
|
|||
|
||||
[OutputChannels]
|
||||
|
||||
fileVersion = { 20191221 }
|
||||
fileVersion = { 20200310 }
|
||||
|
||||
ochGetCommand = "O%2o%2c"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config.generated;
|
||||
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Mon Mar 09 19:26:17 EDT 2020
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Mar 10 18:46:05 EDT 2020
|
||||
|
||||
// by class com.rusefi.output.FileJavaFieldsConsumer
|
||||
import com.rusefi.config.*;
|
||||
|
@ -1344,9 +1344,9 @@ public class Fields {
|
|||
public static final int triggerSimulatorPins1_offset = 736;
|
||||
public static final int triggerSimulatorPins2_offset = 737;
|
||||
public static final int triggerSimulatorPins3_offset = 738;
|
||||
public static final int TS_FILE_VERSION = 20191221;
|
||||
public static final int TS_FILE_VERSION = 20200310;
|
||||
public static final int TS_OUTPUT_SIZE = 240;
|
||||
public static final String TS_SIGNATURE = "rusEFI v1.08";
|
||||
public static final String TS_SIGNATURE = "rusEFI v1.2020.3";
|
||||
public static final int tunerStudioSerialSpeed_offset = 728;
|
||||
public static final int twoWireBatchIgnition_offset = 1476;
|
||||
public static final int twoWireBatchInjection_offset = 1476;
|
||||
|
|
|
@ -49,7 +49,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
* @see EngineSnifferPanel
|
||||
*/
|
||||
public class Launcher {
|
||||
public static final int CONSOLE_VERSION = 20200308;
|
||||
public static final int CONSOLE_VERSION = 20200310;
|
||||
public static final String INI_FILE_PATH = System.getProperty("ini_file_path", "..");
|
||||
public static final String INPUT_FILES_PATH = System.getProperty("input_files_path", "..");
|
||||
public static final String TOOLS_PATH = System.getProperty("tools_path", ".");
|
||||
|
@ -415,6 +415,7 @@ public class Launcher {
|
|||
wrongVersionListener = new SensorCentral.SensorListener() {
|
||||
@Override
|
||||
public void onSensorUpdate(double value) {
|
||||
// todo: we need to migrate to TS_SIGNATURE validation!!!
|
||||
if (value != Fields.TS_FILE_VERSION) {
|
||||
String message = "This copy of rusEfi console is not compatible with this version of firmware\r\n" +
|
||||
"Console compatible with " + Fields.TS_FILE_VERSION + " while firmware compatible with " +
|
||||
|
|
Loading…
Reference in New Issue