From 6f5468d3ea08abf3fa150097f930888b2ddf0633 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 28 Mar 2020 20:14:17 -0400 Subject: [PATCH] critical error usability improvements --- ...ngine_configuration_generated_structures.h | 12 +++++--- .../controllers/algo/rusefi_generated.h | 3 ++ firmware/console/binary/tunerstudio.cpp | 2 +- firmware/controllers/algo/rusefi_types.h | 2 ++ firmware/controllers/core/error_handling.cpp | 29 +++++++++++++------ firmware/controllers/core/error_handling.h | 2 +- firmware/controllers/engine_controller.cpp | 2 +- firmware/controllers/flash_main.cpp | 1 + ...ngine_configuration_generated_structures.h | 12 +++++--- .../controllers/generated/rusefi_generated.h | 3 ++ firmware/integration/rusefi_config.txt | 8 ++++- firmware/tunerstudio/rusefi.ini | 26 +++++++++++++---- firmware/tunerstudio/rusefi.input | 23 +++++++++++---- firmware/tunerstudio/rusefi_frankenso.ini | 26 +++++++++++++---- firmware/tunerstudio/rusefi_kinetis.ini | 24 ++++++++++++--- firmware/tunerstudio/rusefi_microrusefi.ini | 26 +++++++++++++---- firmware/tunerstudio/rusefi_prometheus.ini | 26 +++++++++++++---- firmware/tunerstudio/rusefi_proteus.ini | 26 +++++++++++++---- .../com/rusefi/config/generated/Fields.java | 7 ++++- 19 files changed, 199 insertions(+), 61 deletions(-) diff --git a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h index 3338e56048..2bbb8ef61d 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Fri Mar 27 12:13:02 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Sat Mar 28 19:52:44 EDT 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONFIG_BOARDS_KINETIS_CONFIG_CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -2947,8 +2947,8 @@ struct engine_configuration_s { /** * offset 4140 */ - int mainUnusedEnd[495]; - /** total size 6120*/ + int mainUnusedEnd[475]; + /** total size 6040*/ }; typedef struct engine_configuration_s engine_configuration_s; @@ -2959,6 +2959,10 @@ struct persistent_config_s { * offset 0 */ engine_configuration_s engineConfiguration; + /** + * offset 6040 + */ + critical_error_message_t critical_error_message; /** * offset 6120 */ @@ -3246,4 +3250,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Fri Mar 27 12:13:02 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Sat Mar 28 19:52:44 EDT 2020 diff --git a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h index 1eefdd5a9b..992ee0843f 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h @@ -485,6 +485,8 @@ #define crankingTpsBins_offset_hex 688 #define crankingTpsCoef_offset 1640 #define crankingTpsCoef_offset_hex 668 +#define critical_error_message_offset 6040 +#define critical_error_message_offset_hex 1798 #define cutFuelOnHardLimit_offset 1464 #define cutFuelOnHardLimit_offset_hex 5b8 #define cutSparkOnHardLimit_offset 1464 @@ -562,6 +564,7 @@ #define engineSnifferRpmThreshold_offset_hex 4 #define engineType_offset 0 #define engineType_offset_hex 0 +#define ERROR_BUFFER_SIZE 80 #define ETB_BIAS_CURVE_LENGTH 8 #define ETB_COUNT 2 #define etb_dFactor_offset 1744 diff --git a/firmware/console/binary/tunerstudio.cpp b/firmware/console/binary/tunerstudio.cpp index 4265369ff9..6acd8234c9 100644 --- a/firmware/console/binary/tunerstudio.cpp +++ b/firmware/console/binary/tunerstudio.cpp @@ -89,7 +89,7 @@ #if EFI_SIMULATOR #include "rusEfiFunctionalTest.h" -#endif +#endif /* EFI_SIMULATOR */ #if EFI_TUNER_STUDIO diff --git a/firmware/controllers/algo/rusefi_types.h b/firmware/controllers/algo/rusefi_types.h index c4ebbe8f51..981434cd30 100644 --- a/firmware/controllers/algo/rusefi_types.h +++ b/firmware/controllers/algo/rusefi_types.h @@ -81,6 +81,8 @@ typedef float percent_t; typedef void (*Void)(void); +typedef char critical_error_message_t[ERROR_BUFFER_SIZE]; + typedef char le_formula_t[LE_COMMAND_LENGTH]; typedef brain_pin_e egt_cs_array_t[EGT_CHANNEL_COUNT]; diff --git a/firmware/controllers/core/error_handling.cpp b/firmware/controllers/core/error_handling.cpp index 88e382d97d..c6e2b2b425 100644 --- a/firmware/controllers/core/error_handling.cpp +++ b/firmware/controllers/core/error_handling.cpp @@ -15,8 +15,7 @@ static MemoryStream warningStream; static MemoryStream firmwareErrorMessageStream; #endif /* EFI_SIMULATOR || EFI_PROD_CODE */ -#define WARNING_BUFFER_SIZE 80 -static char warningBuffer[WARNING_BUFFER_SIZE]; +static char warningBuffer[ERROR_BUFFER_SIZE]; static volatile bool isWarningStreamInitialized = false; #if EFI_HD44780_LCD @@ -32,15 +31,18 @@ EXTERN_ENGINE; extern int warningEnabled; extern bool main_loop_started; -// todo: rename to fatalErrorMessage? -static fatal_msg_t errorMessageBuffer; +static fatal_msg_t criticalErrorMessageBuffer; bool hasFirmwareErrorFlag = false; const char *dbg_panic_file; int dbg_panic_line; +#if EFI_TUNER_STUDIO && !defined(EFI_NO_CONFIG_WORKING_COPY) +extern persistent_config_s configWorkingCopy; +#endif + char *getFirmwareError(void) { - return (char*) errorMessageBuffer; + return (char*) criticalErrorMessageBuffer; } #if EFI_PROD_CODE @@ -205,8 +207,8 @@ void onUnlockHook(void) { */ void initErrorHandlingDataStructures(void) { #if EFI_SIMULATOR || EFI_PROD_CODE - msObjectInit(&warningStream, (uint8_t *) warningBuffer, WARNING_BUFFER_SIZE, 0); - msObjectInit(&firmwareErrorMessageStream, errorMessageBuffer, sizeof(errorMessageBuffer), 0); + msObjectInit(&warningStream, (uint8_t *) warningBuffer, ERROR_BUFFER_SIZE, 0); + msObjectInit(&firmwareErrorMessageStream, criticalErrorMessageBuffer, sizeof(criticalErrorMessageBuffer), 0); #endif isWarningStreamInitialized = true; } @@ -230,8 +232,8 @@ void firmwareError(obd_code_e code, const char *fmt, ...) { * in case of simple error message let's reduce stack usage * because chvprintf might be causing an error */ - strncpy((char*) errorMessageBuffer, fmt, sizeof(errorMessageBuffer) - 1); - errorMessageBuffer[sizeof(errorMessageBuffer) - 1] = 0; // just to be sure + strncpy((char*) criticalErrorMessageBuffer, fmt, sizeof(criticalErrorMessageBuffer) - 1); + criticalErrorMessageBuffer[sizeof(criticalErrorMessageBuffer) - 1] = 0; // just to be sure } else { // todo: look into chsnprintf once on Chibios 3 firmwareErrorMessageStream.eos = 0; // reset @@ -242,6 +244,15 @@ void firmwareError(obd_code_e code, const char *fmt, ...) { // todo: reuse warning buffer helper method firmwareErrorMessageStream.buffer[firmwareErrorMessageStream.eos] = 0; // need to terminate explicitly } + +#if EFI_TUNER_STUDIO + #if defined(EFI_NO_CONFIG_WORKING_COPY) + memcpy(persistentState.persistentConfiguration.critical_error_message, criticalErrorMessageBuffer, sizeof(criticalErrorMessageBuffer)); + #else /* defined(EFI_NO_CONFIG_WORKING_COPY) */ + memcpy(configWorkingCopy.critical_error_message, criticalErrorMessageBuffer, sizeof(criticalErrorMessageBuffer)); + #endif /* defined(EFI_NO_CONFIG_WORKING_COPY) */ +#endif /* EFI_TUNER_STUDIO */ + #else printf("firmwareError [%s]\r\n", fmt); diff --git a/firmware/controllers/core/error_handling.h b/firmware/controllers/core/error_handling.h index 1eea226cce..463257871c 100644 --- a/firmware/controllers/core/error_handling.h +++ b/firmware/controllers/core/error_handling.h @@ -33,7 +33,7 @@ void firmwareError(obd_code_e code, const char *fmt, ...); #define hasFirmwareError() hasFirmwareErrorFlag -// todo: rename to getFatalErrorMessage +// todo: rename to getCriticalErrorMessage char *getFirmwareError(void); void initErrorHandlingDataStructures(void); diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index fee9bd93bc..8304703e50 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -759,6 +759,6 @@ int getRusEfiVersion(void) { if (initBootloader() != 0) return 123; #endif /* EFI_BOOTLOADER_INCLUDE_CODE */ - return 201200326; + return 201200328; } #endif /* EFI_UNIT_TEST */ diff --git a/firmware/controllers/flash_main.cpp b/firmware/controllers/flash_main.cpp index 9bc8d2252b..7c21e98762 100644 --- a/firmware/controllers/flash_main.cpp +++ b/firmware/controllers/flash_main.cpp @@ -150,6 +150,7 @@ persisted_configuration_state_e readConfiguration(Logging * logger) { } // we can only change the state after the CRC check engineConfiguration->byFirmwareVersion = getRusEfiVersion(); + memset(persistentState.persistentConfiguration.critical_error_message, 0, ERROR_BUFFER_SIZE); validateConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); return result; } diff --git a/firmware/controllers/generated/engine_configuration_generated_structures.h b/firmware/controllers/generated/engine_configuration_generated_structures.h index 9862a55ced..4134b4a990 100644 --- a/firmware/controllers/generated/engine_configuration_generated_structures.h +++ b/firmware/controllers/generated/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Fri Mar 27 12:12:49 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sat Mar 28 19:52:31 EDT 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONTROLLERS_GENERATED_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -2947,8 +2947,8 @@ struct engine_configuration_s { /** * offset 4140 */ - int mainUnusedEnd[495]; - /** total size 6120*/ + int mainUnusedEnd[475]; + /** total size 6040*/ }; typedef struct engine_configuration_s engine_configuration_s; @@ -2959,6 +2959,10 @@ struct persistent_config_s { * offset 0 */ engine_configuration_s engineConfiguration; + /** + * offset 6040 + */ + critical_error_message_t critical_error_message; /** * offset 6120 */ @@ -3246,4 +3250,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Fri Mar 27 12:12:49 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sat Mar 28 19:52:31 EDT 2020 diff --git a/firmware/controllers/generated/rusefi_generated.h b/firmware/controllers/generated/rusefi_generated.h index 18307b429c..f43aa631ba 100644 --- a/firmware/controllers/generated/rusefi_generated.h +++ b/firmware/controllers/generated/rusefi_generated.h @@ -485,6 +485,8 @@ #define crankingTpsBins_offset_hex 688 #define crankingTpsCoef_offset 1640 #define crankingTpsCoef_offset_hex 668 +#define critical_error_message_offset 6040 +#define critical_error_message_offset_hex 1798 #define cutFuelOnHardLimit_offset 1464 #define cutFuelOnHardLimit_offset_hex 5b8 #define cutSparkOnHardLimit_offset 1464 @@ -562,6 +564,7 @@ #define engineSnifferRpmThreshold_offset_hex 4 #define engineType_offset 0 #define engineType_offset_hex 0 +#define ERROR_BUFFER_SIZE 80 #define ETB_BIAS_CURVE_LENGTH 8 #define ETB_COUNT 2 #define etb_dFactor_offset 1744 diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 7145f57380..a50269fc4b 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -738,6 +738,11 @@ custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:7], @@maf_sensor_type_e_enum@ maf_sensor_type_e mafSensorType; +! same length used for critical and soft error messages +#define ERROR_BUFFER_SIZE 80 + +! todo: improve code generator so that we could use reuse 'ERROR_BUFFER_SIZE' for type size + custom critical_error_message_t 80 string, ASCII, @OFFSET@, @@ERROR_BUFFER_SIZE@@ custom le_formula_t 200 string, ASCII, @OFFSET@, 200 brain_pin_e[FSIO_COMMAND_COUNT iterate] fsioDigitalInputs;todo:not finished\nThese input pins allow us to pull toggle buttons state; @@ -1192,13 +1197,14 @@ uint8_t[4] unusuedsw; uint8_t[IAC_PID_MULT_SIZE] iacPidMultLoadBins;;"Load", 1, 0.0, 0, 500.0, 2 uint8_t[IAC_PID_MULT_SIZE] iacPidMultRpmBins;;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 - int[495] mainUnusedEnd; + int[475] mainUnusedEnd; ! end of engine_configuration_s end_struct engine_configuration_s engineConfiguration; +critical_error_message_t critical_error_message; float[AFTERSTART_HOLD_CURVE_SIZE] afterstartCoolantBins;;"C", 1, 0, -100.0, 250.0, 0 float[AFTERSTART_HOLD_CURVE_SIZE] afterstartHoldTime;;"Seconds", 1, 0, 0, 100, 1 diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index f6f92bbcc2..fdbd13444d 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -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 Fri Mar 27 12:12:49 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sat Mar 28 20:11:35 EDT 2020 pageSize = 20000 page = 1 @@ -1011,6 +1011,7 @@ page = 1 iacPidMultLoadBins = array, U08, 4124, [8], "Load", 1, 0.0, 0, 500.0, 2 iacPidMultRpmBins = array, U08, 4132, [8], "RPM", 50, 0, 0.0, 12000.0, 0 ;no TS info - skipping mainUnusedEnd offset 4140 + critical_error_message = string, ASCII, 6040, 80 afterstartCoolantBins = array, F32, 6120, [8], "C", 1, 0, -100.0, 250.0, 0 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1, 0, 0, 100, 1 afterstartEnrich = array, F32, 6184, [8], "%", 1, 0, 0, 600, 1 @@ -1411,7 +1412,8 @@ fileVersion = { 20200310 } knockLevel = scalar, F32, 108, "Volts", 1, 0 ; Mode, firmware, protocol, run time - timeSeconds = scalar, U32, 112, "sec", 1, 0.0 +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 engineMode = scalar, U32, 116, "em", 1, 0.0; firmwareVersion = scalar, U32, 120,"version_f", 1, 0 firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 @@ -1500,8 +1502,21 @@ fileVersion = { 20200310 } debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle df4", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "" debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle df5", "", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5" [ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + readOnly = critical_error_message + + [CurveEditor] ; xAxis = leftValue, rightValue, step ; yAxis = bottomValue, topValue, step @@ -1928,7 +1943,7 @@ gaugeCategory = ECU Status recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 - timeSecondsGauge = timeSeconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 gaugeCategory = Debug @@ -2053,7 +2068,7 @@ gaugeCategory = Throttle Body (incl. ETB) ; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg ; important status - indicator = { ind_hasFatalError }, "", "FATAL ERROR", green, black, red, black + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", green, black, red, black indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version", red, black, green, black indicator = { ind_isWarnNow }, "", "warn", green, black, red, black indicator = { ind_check_engine }, "ok", "Check engine", green, black, red, black @@ -2812,7 +2827,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = mc33816_driven, mc33816_driven field = mc33816spiDevice, mc33816spiDevice field = "Warning Led", warningLedPin - ; field = "Fatal Error Led", fatalErrorPin field = "tle6240_cs", tle6240_cs field = "tle6240 SPI", tle6240spiDevice field = "mc33972_cs", mc33972_cs @@ -3222,7 +3236,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Running status LED", runningLedPin field = "TS communication status LED", communicationLedPin field = "Trigger error LED", triggerErrorPin - ; field = "Fatal Error Led", fatalErrorPin ; Engine->MIL Settings dialog = malfunction, "Check Engine Settings" @@ -3465,6 +3478,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = debugging, "Debug" field = "!https://rusefi.com/s/debugmode" field = "Debug mode", debugMode + field = "Critical Error", critical_error_message dialog = limits, "Limits" diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 596d24b1ca..14b7017028 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -275,7 +275,8 @@ fileVersion = { @@TS_FILE_VERSION@@ } knockLevel = scalar, F32, 108, "Volts", 1, 0 ; Mode, firmware, protocol, run time - timeSeconds = scalar, U32, 112, "sec", 1, 0.0 +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 engineMode = scalar, U32, 116, "em", 1, 0.0; firmwareVersion = scalar, U32, 120,"version_f", 1, 0 firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 @@ -364,8 +365,21 @@ fileVersion = { @@TS_FILE_VERSION@@ } debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle df4", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "" debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle df5", "", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5" [ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + readOnly = critical_error_message + + [CurveEditor] ; xAxis = leftValue, rightValue, step ; yAxis = bottomValue, topValue, step @@ -792,7 +806,7 @@ gaugeCategory = ECU Status recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 - timeSecondsGauge = timeSeconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 gaugeCategory = Debug @@ -917,7 +931,7 @@ gaugeCategory = Throttle Body (incl. ETB) ; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg ; important status - indicator = { ind_hasFatalError }, "", "FATAL ERROR", green, black, red, black + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", green, black, red, black indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version", red, black, green, black indicator = { ind_isWarnNow }, "", "warn", green, black, red, black indicator = { ind_check_engine }, "ok", "Check engine", green, black, red, black @@ -1677,7 +1691,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = mc33816_driven, mc33816_driven field = mc33816spiDevice, mc33816spiDevice field = "Warning Led", warningLedPin - ; field = "Fatal Error Led", fatalErrorPin field = "tle6240_cs", tle6240_cs field = "tle6240 SPI", tle6240spiDevice field = "mc33972_cs", mc33972_cs @@ -2087,7 +2100,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Running status LED", runningLedPin field = "TS communication status LED", communicationLedPin field = "Trigger error LED", triggerErrorPin - ; field = "Fatal Error Led", fatalErrorPin ; Engine->MIL Settings dialog = malfunction, "Check Engine Settings" @@ -2330,6 +2342,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = debugging, "Debug" field = "!https://rusefi.com/s/debugmode" field = "Debug mode", debugMode + field = "Critical Error", critical_error_message dialog = limits, "Limits" diff --git a/firmware/tunerstudio/rusefi_frankenso.ini b/firmware/tunerstudio/rusefi_frankenso.ini index 90e6cd0117..1c7767d7b0 100644 --- a/firmware/tunerstudio/rusefi_frankenso.ini +++ b/firmware/tunerstudio/rusefi_frankenso.ini @@ -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 Fri Mar 27 12:12:55 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sat Mar 28 20:11:41 EDT 2020 pageSize = 20000 page = 1 @@ -1011,6 +1011,7 @@ page = 1 iacPidMultLoadBins = array, U08, 4124, [8], "Load", 1, 0.0, 0, 500.0, 2 iacPidMultRpmBins = array, U08, 4132, [8], "RPM", 50, 0, 0.0, 12000.0, 0 ;no TS info - skipping mainUnusedEnd offset 4140 + critical_error_message = string, ASCII, 6040, 80 afterstartCoolantBins = array, F32, 6120, [8], "C", 1, 0, -100.0, 250.0, 0 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1, 0, 0, 100, 1 afterstartEnrich = array, F32, 6184, [8], "%", 1, 0, 0, 600, 1 @@ -1411,7 +1412,8 @@ fileVersion = { 20200310 } knockLevel = scalar, F32, 108, "Volts", 1, 0 ; Mode, firmware, protocol, run time - timeSeconds = scalar, U32, 112, "sec", 1, 0.0 +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 engineMode = scalar, U32, 116, "em", 1, 0.0; firmwareVersion = scalar, U32, 120,"version_f", 1, 0 firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 @@ -1500,8 +1502,21 @@ fileVersion = { 20200310 } debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle df4", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "" debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle df5", "", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5" [ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + readOnly = critical_error_message + + [CurveEditor] ; xAxis = leftValue, rightValue, step ; yAxis = bottomValue, topValue, step @@ -1928,7 +1943,7 @@ gaugeCategory = ECU Status recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 - timeSecondsGauge = timeSeconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 gaugeCategory = Debug @@ -2053,7 +2068,7 @@ gaugeCategory = Throttle Body (incl. ETB) ; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg ; important status - indicator = { ind_hasFatalError }, "", "FATAL ERROR", green, black, red, black + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", green, black, red, black indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version", red, black, green, black indicator = { ind_isWarnNow }, "", "warn", green, black, red, black indicator = { ind_check_engine }, "ok", "Check engine", green, black, red, black @@ -2812,7 +2827,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = mc33816_driven, mc33816_driven field = mc33816spiDevice, mc33816spiDevice field = "Warning Led", warningLedPin - ; field = "Fatal Error Led", fatalErrorPin field = "tle6240_cs", tle6240_cs field = "tle6240 SPI", tle6240spiDevice field = "mc33972_cs", mc33972_cs @@ -3222,7 +3236,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Running status LED", runningLedPin field = "TS communication status LED", communicationLedPin field = "Trigger error LED", triggerErrorPin - ; field = "Fatal Error Led", fatalErrorPin ; Engine->MIL Settings dialog = malfunction, "Check Engine Settings" @@ -3465,6 +3478,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = debugging, "Debug" field = "!https://rusefi.com/s/debugmode" field = "Debug mode", debugMode + field = "Critical Error", critical_error_message dialog = limits, "Limits" diff --git a/firmware/tunerstudio/rusefi_kinetis.ini b/firmware/tunerstudio/rusefi_kinetis.ini index d0b1707f90..b965de1df4 100644 --- a/firmware/tunerstudio/rusefi_kinetis.ini +++ b/firmware/tunerstudio/rusefi_kinetis.ini @@ -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 Fri Mar 27 12:13:02 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Sat Mar 28 19:52:44 EDT 2020 pageSize = 20000 page = 1 @@ -1011,6 +1011,7 @@ page = 1 iacPidMultLoadBins = array, U08, 4124, [8], "Load", 1, 0.0, 0, 500.0, 2 iacPidMultRpmBins = array, U08, 4132, [8], "RPM", 50, 0, 0.0, 12000.0, 0 ;no TS info - skipping mainUnusedEnd offset 4140 + critical_error_message = string, ASCII, 6040, 80 afterstartCoolantBins = array, F32, 6120, [8], "C", 1, 0, -100.0, 250.0, 0 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1, 0, 0, 100, 1 afterstartEnrich = array, F32, 6184, [8], "%", 1, 0, 0, 600, 1 @@ -1411,7 +1412,8 @@ fileVersion = { 20200310 } knockLevel = scalar, F32, 108, "Volts", 1, 0 ; Mode, firmware, protocol, run time - timeSeconds = scalar, U32, 112, "sec", 1, 0.0 +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 engineMode = scalar, U32, 116, "em", 1, 0.0; firmwareVersion = scalar, U32, 120,"version_f", 1, 0 firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 @@ -1500,8 +1502,21 @@ fileVersion = { 20200310 } debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle df4", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "" debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle df5", "", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5" [ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + readOnly = critical_error_message + + [CurveEditor] ; xAxis = leftValue, rightValue, step ; yAxis = bottomValue, topValue, step @@ -1928,7 +1943,7 @@ gaugeCategory = ECU Status recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 - timeSecondsGauge = timeSeconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 gaugeCategory = Debug @@ -2053,7 +2068,7 @@ gaugeCategory = Throttle Body (incl. ETB) ; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg ; important status - indicator = { ind_hasFatalError }, "", "FATAL ERROR", green, black, red, black + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", green, black, red, black indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version", red, black, green, black indicator = { ind_isWarnNow }, "", "warn", green, black, red, black indicator = { ind_check_engine }, "ok", "Check engine", green, black, red, black @@ -3466,6 +3481,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = debugging, "Debug" field = "!https://rusefi.com/s/debugmode" field = "Debug mode", debugMode + field = "Critical Error", critical_error_message dialog = limits, "Limits" diff --git a/firmware/tunerstudio/rusefi_microrusefi.ini b/firmware/tunerstudio/rusefi_microrusefi.ini index cb5d6e1d4d..becf11ebed 100644 --- a/firmware/tunerstudio/rusefi_microrusefi.ini +++ b/firmware/tunerstudio/rusefi_microrusefi.ini @@ -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 Fri Mar 27 12:12:52 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sat Mar 28 20:11:38 EDT 2020 pageSize = 20000 page = 1 @@ -1011,6 +1011,7 @@ page = 1 iacPidMultLoadBins = array, U08, 4124, [8], "Load", 1, 0.0, 0, 500.0, 2 iacPidMultRpmBins = array, U08, 4132, [8], "RPM", 50, 0, 0.0, 12000.0, 0 ;no TS info - skipping mainUnusedEnd offset 4140 + critical_error_message = string, ASCII, 6040, 80 afterstartCoolantBins = array, F32, 6120, [8], "C", 1, 0, -100.0, 250.0, 0 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1, 0, 0, 100, 1 afterstartEnrich = array, F32, 6184, [8], "%", 1, 0, 0, 600, 1 @@ -1411,7 +1412,8 @@ fileVersion = { 20200310 } knockLevel = scalar, F32, 108, "Volts", 1, 0 ; Mode, firmware, protocol, run time - timeSeconds = scalar, U32, 112, "sec", 1, 0.0 +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 engineMode = scalar, U32, 116, "em", 1, 0.0; firmwareVersion = scalar, U32, 120,"version_f", 1, 0 firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 @@ -1500,8 +1502,21 @@ fileVersion = { 20200310 } debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle df4", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "" debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle df5", "", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5" [ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + readOnly = critical_error_message + + [CurveEditor] ; xAxis = leftValue, rightValue, step ; yAxis = bottomValue, topValue, step @@ -1928,7 +1943,7 @@ gaugeCategory = ECU Status recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 - timeSecondsGauge = timeSeconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 gaugeCategory = Debug @@ -2053,7 +2068,7 @@ gaugeCategory = Throttle Body (incl. ETB) ; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg ; important status - indicator = { ind_hasFatalError }, "", "FATAL ERROR", green, black, red, black + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", green, black, red, black indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version", red, black, green, black indicator = { ind_isWarnNow }, "", "warn", green, black, red, black indicator = { ind_check_engine }, "ok", "Check engine", green, black, red, black @@ -2804,7 +2819,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = mc33816_driven, mc33816_driven field = mc33816spiDevice, mc33816spiDevice field = "Warning Led", warningLedPin - ; field = "Fatal Error Led", fatalErrorPin field = "tle6240_cs", tle6240_cs field = "tle6240 SPI", tle6240spiDevice field = "mc33972_cs", mc33972_cs @@ -3192,7 +3206,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Running status LED", runningLedPin field = "TS communication status LED", communicationLedPin field = "Trigger error LED", triggerErrorPin - ; field = "Fatal Error Led", fatalErrorPin ; Engine->MIL Settings dialog = malfunction, "Check Engine Settings" @@ -3427,6 +3440,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = debugging, "Debug" field = "!https://rusefi.com/s/debugmode" field = "Debug mode", debugMode + field = "Critical Error", critical_error_message dialog = limits, "Limits" diff --git a/firmware/tunerstudio/rusefi_prometheus.ini b/firmware/tunerstudio/rusefi_prometheus.ini index fc6e6ac9e8..814bd086a2 100644 --- a/firmware/tunerstudio/rusefi_prometheus.ini +++ b/firmware/tunerstudio/rusefi_prometheus.ini @@ -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 Fri Mar 27 12:12:57 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sat Mar 28 20:11:43 EDT 2020 pageSize = 20000 page = 1 @@ -1011,6 +1011,7 @@ page = 1 iacPidMultLoadBins = array, U08, 4124, [8], "Load", 1, 0.0, 0, 500.0, 2 iacPidMultRpmBins = array, U08, 4132, [8], "RPM", 50, 0, 0.0, 12000.0, 0 ;no TS info - skipping mainUnusedEnd offset 4140 + critical_error_message = string, ASCII, 6040, 80 afterstartCoolantBins = array, F32, 6120, [8], "C", 1, 0, -100.0, 250.0, 0 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1, 0, 0, 100, 1 afterstartEnrich = array, F32, 6184, [8], "%", 1, 0, 0, 600, 1 @@ -1411,7 +1412,8 @@ fileVersion = { 20200310 } knockLevel = scalar, F32, 108, "Volts", 1, 0 ; Mode, firmware, protocol, run time - timeSeconds = scalar, U32, 112, "sec", 1, 0.0 +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 engineMode = scalar, U32, 116, "em", 1, 0.0; firmwareVersion = scalar, U32, 120,"version_f", 1, 0 firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 @@ -1500,8 +1502,21 @@ fileVersion = { 20200310 } debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle df4", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "" debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle df5", "", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5" [ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + readOnly = critical_error_message + + [CurveEditor] ; xAxis = leftValue, rightValue, step ; yAxis = bottomValue, topValue, step @@ -1928,7 +1943,7 @@ gaugeCategory = ECU Status recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 - timeSecondsGauge = timeSeconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 gaugeCategory = Debug @@ -2053,7 +2068,7 @@ gaugeCategory = Throttle Body (incl. ETB) ; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg ; important status - indicator = { ind_hasFatalError }, "", "FATAL ERROR", green, black, red, black + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", green, black, red, black indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version", red, black, green, black indicator = { ind_isWarnNow }, "", "warn", green, black, red, black indicator = { ind_check_engine }, "ok", "Check engine", green, black, red, black @@ -2808,7 +2823,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = mc33816_driven, mc33816_driven field = mc33816spiDevice, mc33816spiDevice field = "Warning Led", warningLedPin - ; field = "Fatal Error Led", fatalErrorPin field = "tle6240_cs", tle6240_cs field = "tle6240 SPI", tle6240spiDevice field = "mc33972_cs", mc33972_cs @@ -3218,7 +3232,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Running status LED", runningLedPin field = "TS communication status LED", communicationLedPin field = "Trigger error LED", triggerErrorPin - ; field = "Fatal Error Led", fatalErrorPin ; Engine->MIL Settings dialog = malfunction, "Check Engine Settings" @@ -3461,6 +3474,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = debugging, "Debug" field = "!https://rusefi.com/s/debugmode" field = "Debug mode", debugMode + field = "Critical Error", critical_error_message dialog = limits, "Limits" diff --git a/firmware/tunerstudio/rusefi_proteus.ini b/firmware/tunerstudio/rusefi_proteus.ini index f2be6f439f..f21b5acb62 100644 --- a/firmware/tunerstudio/rusefi_proteus.ini +++ b/firmware/tunerstudio/rusefi_proteus.ini @@ -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 Fri Mar 27 12:13:00 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sat Mar 28 20:11:46 EDT 2020 pageSize = 20000 page = 1 @@ -1011,6 +1011,7 @@ page = 1 iacPidMultLoadBins = array, U08, 4124, [8], "Load", 1, 0.0, 0, 500.0, 2 iacPidMultRpmBins = array, U08, 4132, [8], "RPM", 50, 0, 0.0, 12000.0, 0 ;no TS info - skipping mainUnusedEnd offset 4140 + critical_error_message = string, ASCII, 6040, 80 afterstartCoolantBins = array, F32, 6120, [8], "C", 1, 0, -100.0, 250.0, 0 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1, 0, 0, 100, 1 afterstartEnrich = array, F32, 6184, [8], "%", 1, 0, 0, 600, 1 @@ -1411,7 +1412,8 @@ fileVersion = { 20200310 } knockLevel = scalar, F32, 108, "Volts", 1, 0 ; Mode, firmware, protocol, run time - timeSeconds = scalar, U32, 112, "sec", 1, 0.0 +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 engineMode = scalar, U32, 116, "em", 1, 0.0; firmwareVersion = scalar, U32, 120,"version_f", 1, 0 firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 @@ -1500,8 +1502,21 @@ fileVersion = { 20200310 } debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle df4", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "" debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle df5", "", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5" [ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + readOnly = critical_error_message + + [CurveEditor] ; xAxis = leftValue, rightValue, step ; yAxis = bottomValue, topValue, step @@ -1928,7 +1943,7 @@ gaugeCategory = ECU Status recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 - timeSecondsGauge = timeSeconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 gaugeCategory = Debug @@ -2053,7 +2068,7 @@ gaugeCategory = Throttle Body (incl. ETB) ; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg ; important status - indicator = { ind_hasFatalError }, "", "FATAL ERROR", green, black, red, black + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", green, black, red, black indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version", red, black, green, black indicator = { ind_isWarnNow }, "", "warn", green, black, red, black indicator = { ind_check_engine }, "ok", "Check engine", green, black, red, black @@ -2804,7 +2819,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = mc33816_driven, mc33816_driven field = mc33816spiDevice, mc33816spiDevice field = "Warning Led", warningLedPin - ; field = "Fatal Error Led", fatalErrorPin field = "tle6240_cs", tle6240_cs field = "tle6240 SPI", tle6240spiDevice field = "mc33972_cs", mc33972_cs @@ -3198,7 +3212,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Running status LED", runningLedPin field = "TS communication status LED", communicationLedPin field = "Trigger error LED", triggerErrorPin - ; field = "Fatal Error Led", fatalErrorPin ; Engine->MIL Settings dialog = malfunction, "Check Engine Settings" @@ -3433,6 +3446,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = debugging, "Debug" field = "!https://rusefi.com/s/debugmode" field = "Debug mode", debugMode + field = "Critical Error", critical_error_message dialog = limits, "Limits" diff --git a/java_console/models/src/com/rusefi/config/generated/Fields.java b/java_console/models/src/com/rusefi/config/generated/Fields.java index 0cf66dbd94..97265505e1 100644 --- a/java_console/models/src/com/rusefi/config/generated/Fields.java +++ b/java_console/models/src/com/rusefi/config/generated/Fields.java @@ -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 Fri Mar 27 12:12:49 EDT 2020 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sat Mar 28 19:52:31 EDT 2020 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; @@ -318,6 +318,8 @@ public class Fields { public static final int crankingTpsBins_offset_hex = 688; public static final int crankingTpsCoef_offset = 1640; public static final int crankingTpsCoef_offset_hex = 668; + public static final int critical_error_message_offset = 6040; + public static final int critical_error_message_offset_hex = 1798; public static final int cutFuelOnHardLimit_offset = 1464; public static final int cutSparkOnHardLimit_offset = 1464; public static final int cylinderBore_offset = 408; @@ -368,6 +370,7 @@ public class Fields { public static final int engineSnifferRpmThreshold_offset_hex = 4; public static final int engineType_offset = 0; public static final int engineType_offset_hex = 0; + public static final int ERROR_BUFFER_SIZE = 80; public static final int ETB_BIAS_CURVE_LENGTH = 8; public static final int ETB_COUNT = 2; public static final int etb_dFactor_offset = 1744; @@ -2375,6 +2378,7 @@ public class Fields { public static final Field IDLERPMPID2_MINVALUE = Field.create("IDLERPMPID2_MINVALUE", 4056, FieldType.INT16); public static final Field IDLERPMPID2_MAXVALUE = Field.create("IDLERPMPID2_MAXVALUE", 4058, FieldType.INT16); public static final Field IACPIDMULTTABLE = Field.create("IACPIDMULTTABLE", 4060, FieldType.INT); + public static final Field CRITICAL_ERROR_MESSAGE = Field.create("CRITICAL_ERROR_MESSAGE", 6040, FieldType.INT); public static final Field BOOSTTABLEOPENLOOP = Field.create("BOOSTTABLEOPENLOOP", 6248, FieldType.INT); public static final Field BOOSTTABLECLOSEDLOOP = Field.create("BOOSTTABLECLOSEDLOOP", 6328, FieldType.INT); public static final Field PEDALTOTPSTABLE = Field.create("PEDALTOTPSTABLE", 6400, FieldType.INT); @@ -3271,6 +3275,7 @@ public class Fields { IDLERPMPID2_MINVALUE, IDLERPMPID2_MAXVALUE, IACPIDMULTTABLE, + CRITICAL_ERROR_MESSAGE, BOOSTTABLEOPENLOOP, BOOSTTABLECLOSEDLOOP, PEDALTOTPSTABLE,