Merge remote-tracking branch 'origin/master' into master

# Conflicts:
#	firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp
This commit is contained in:
rusefi 2020-12-08 21:37:45 -05:00
commit ac186d2b85
122 changed files with 1381 additions and 758 deletions

View File

@ -2,6 +2,7 @@
"recommendations": [ "recommendations": [
"marus25.cortex-debug", "marus25.cortex-debug",
"Gruntfuggly.todo-tree", "Gruntfuggly.todo-tree",
"ms-vscode.cpptools" "ms-vscode.cpptools",
"vadimcn.vscode-lldb"
] ]
} }

10
.vscode/launch.json vendored
View File

@ -5,7 +5,7 @@
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "Debug Unit Tests", "name": "Debug Unit Tests (gdb)",
"type": "cppdbg", "type": "cppdbg",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/unit_tests/build/rusefi_test", "program": "${workspaceFolder}/unit_tests/build/rusefi_test",
@ -24,6 +24,14 @@
} }
] ]
}, },
{
"name": "Debug Unit Tests (lldb)",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/unit_tests/build/rusefi_test",
"args": [],
"cwd": "${workspaceFolder}/unit_tests/build/",
},
{ {
"name": "Debug F40x", "name": "Debug F40x",
"type": "cortex-debug", "type": "cortex-debug",

View File

@ -1,7 +1,7 @@
#include "global.h" #include "global.h"
#include "rusefi_enums.h" #include "rusefi_enums.h"
#include "rusefi_hw_enums.h" #include "rusefi_hw_enums.h"
// was generated automatically by rusEfi tool from rusefi_hw_enums.h // was generated automatically by rusEfi tool from rusefi_enums.h // by enum2string.jar tool on Fri Dec 04 00:17:48 EST 2020 // was generated automatically by rusEfi tool from rusefi_hw_enums.h // was generated automatically by rusEfi tool from rusefi_enums.h // by enum2string.jar tool on Sun Dec 06 09:01:42 EST 2020
// see also gen_config_and_enums.bat // see also gen_config_and_enums.bat
@ -104,6 +104,8 @@ case EFI_ADC_9:
return "EFI_ADC_9"; return "EFI_ADC_9";
case EFI_ADC_ERROR: case EFI_ADC_ERROR:
return "EFI_ADC_ERROR"; return "EFI_ADC_ERROR";
case EFI_ADC_LAST_CHANNEL:
return "EFI_ADC_LAST_CHANNEL";
case EFI_ADC_NONE: case EFI_ADC_NONE:
return "EFI_ADC_NONE"; return "EFI_ADC_NONE";
} }
@ -833,8 +835,6 @@ case BMW_M73_PROTEUS:
return "BMW_M73_PROTEUS"; return "BMW_M73_PROTEUS";
case CAMARO_4: case CAMARO_4:
return "CAMARO_4"; return "CAMARO_4";
case CHEVY_C20_1973:
return "CHEVY_C20_1973";
case CITROEN_TU3JP: case CITROEN_TU3JP:
return "CITROEN_TU3JP"; return "CITROEN_TU3JP";
case DEFAULT_FRANKENSO: case DEFAULT_FRANKENSO:
@ -921,6 +921,8 @@ case MRE_MIATA_NB2_MAF:
return "MRE_MIATA_NB2_MAF"; return "MRE_MIATA_NB2_MAF";
case MRE_MIATA_NB2_MAP: case MRE_MIATA_NB2_MAP:
return "MRE_MIATA_NB2_MAP"; return "MRE_MIATA_NB2_MAP";
case MRE_SUBARU_EJ18:
return "MRE_SUBARU_EJ18";
case NISSAN_PRIMERA: case NISSAN_PRIMERA:
return "NISSAN_PRIMERA"; return "NISSAN_PRIMERA";
case PROMETHEUS_DEFAULTS: case PROMETHEUS_DEFAULTS:

View File

@ -1,4 +1,4 @@
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on hellen_cypress_gen_config.bat integration/rusefi_config.txt Fri Dec 04 16:38:43 UTC 2020 // this section was generated automatically by rusEfi tool ConfigDefinition.jar based on hellen_cypress_gen_config.bat integration/rusefi_config.txt Wed Dec 09 02:10:31 UTC 2020
// by class com.rusefi.output.CHeaderConsumer // by class com.rusefi.output.CHeaderConsumer
// begin // begin
#pragma once #pragma once
@ -689,7 +689,7 @@ struct engine_configuration_s {
offset 76 bit 12 */ offset 76 bit 12 */
bool etb_use_two_wires : 1; bool etb_use_two_wires : 1;
/** /**
* Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position. * Subaru/BMW style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position.
offset 76 bit 13 */ offset 76 bit 13 */
bool isDoubleSolenoidIdle : 1; bool isDoubleSolenoidIdle : 1;
/** /**
@ -3473,14 +3473,18 @@ struct engine_configuration_s {
*/ */
pin_output_mode_e tcu_solenoid_mode[TCU_SOLENOID_COUNT]; pin_output_mode_e tcu_solenoid_mode[TCU_SOLENOID_COUNT];
/** /**
* need 4 byte alignment
* offset 4523 * offset 4523
*/ */
uint8_t alignmentFill_at_4523; int8_t knockBaseNoise[IGN_RPM_COUNT];
/** /**
* offset 4524 * need 4 byte alignment
* offset 4539
*/ */
int mainUnusedEnd[369]; uint8_t alignmentFill_at_4539;
/**
* offset 4540
*/
int mainUnusedEnd[365];
/** total size 6000*/ /** total size 6000*/
}; };
@ -3778,4 +3782,4 @@ struct persistent_config_s {
typedef struct persistent_config_s persistent_config_s; typedef struct persistent_config_s persistent_config_s;
// end // end
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on hellen_cypress_gen_config.bat integration/rusefi_config.txt Fri Dec 04 16:38:43 UTC 2020 // this section was generated automatically by rusEfi tool ConfigDefinition.jar based on hellen_cypress_gen_config.bat integration/rusefi_config.txt Wed Dec 09 02:10:31 UTC 2020

View File

@ -47,7 +47,7 @@
#define air_pressure_sensor_type_e_auto_enum "MT_CUSTOM", "MT_DENSO183", "MT_MPX4250", "MT_HONDA3BAR", "MT_DODGE_NEON_2003", "MT_SUBY_DENSO", "MT_GM_3_BAR", "MT_MPX4100", "MT_TOYOTA_89420_02010", "MT_MPX4250A", "MT_BOSCH_2_5", "MT_MAZDA_1_BAR" #define air_pressure_sensor_type_e_auto_enum "MT_CUSTOM", "MT_DENSO183", "MT_MPX4250", "MT_HONDA3BAR", "MT_DODGE_NEON_2003", "MT_SUBY_DENSO", "MT_GM_3_BAR", "MT_MPX4100", "MT_TOYOTA_89420_02010", "MT_MPX4250A", "MT_BOSCH_2_5", "MT_MAZDA_1_BAR"
#define alignEngineSnifferAtTDC_offset 744 #define alignEngineSnifferAtTDC_offset 744
#define alignmentFill_at_2227_offset 2227 #define alignmentFill_at_2227_offset 2227
#define alignmentFill_at_4523_offset 4523 #define alignmentFill_at_4539_offset 4539
#define alternator_antiwindupFreq_offset 1764 #define alternator_antiwindupFreq_offset 1764
#define alternator_derivativeFilterLoss_offset 1760 #define alternator_derivativeFilterLoss_offset 1760
#define alternatorControl_dFactor_offset 1724 #define alternatorControl_dFactor_offset 1724
@ -240,6 +240,8 @@
#define clutchDownPinMode_offset 667 #define clutchDownPinMode_offset 667
#define clutchUpPin_offset 969 #define clutchUpPin_offset 969
#define clutchUpPinMode_offset 971 #define clutchUpPinMode_offset 971
#define CMD_ALTERNATOR_PIN "set_alternator_pin"
#define CMD_BOOST_PIN "set_boost_pin"
#define CMD_CALIBRATE_PEDAL_DOWN "calibrate_pedal_down" #define CMD_CALIBRATE_PEDAL_DOWN "calibrate_pedal_down"
#define CMD_CALIBRATE_PEDAL_UP "calibrate_pedal_up" #define CMD_CALIBRATE_PEDAL_UP "calibrate_pedal_up"
#define CMD_DATE "date" #define CMD_DATE "date"
@ -251,8 +253,12 @@
#define CMD_FUEL_BENCH "fuelbench" #define CMD_FUEL_BENCH "fuelbench"
#define CMD_FUNCTIONAL_TEST_MODE "test_mode" #define CMD_FUNCTIONAL_TEST_MODE "test_mode"
#define CMD_HPFP_BENCH "hpfpbench" #define CMD_HPFP_BENCH "hpfpbench"
#define CMD_IDLE_PIN "set_idle_pin"
#define CMD_IGNITION "ignition" #define CMD_IGNITION "ignition"
#define CMD_IGNITION_PIN "set_ignition_pin"
#define CMD_INJECTION "injection" #define CMD_INJECTION "injection"
#define CMD_INJECTION_PIN "set_injection_pin"
#define CMD_LOGIC_PIN "set_logic_input_pin"
#define CMD_MIL_BENCH "milbench" #define CMD_MIL_BENCH "milbench"
#define CMD_PINS "pins" #define CMD_PINS "pins"
#define CMD_PWM "pwm" #define CMD_PWM "pwm"
@ -264,6 +270,7 @@
#define CMD_STARTER_BENCH "starterbench" #define CMD_STARTER_BENCH "starterbench"
#define CMD_TRIGGER_HW_INPUT "trigger_hw_input" #define CMD_TRIGGER_HW_INPUT "trigger_hw_input"
#define CMD_TRIGGER_PIN "set_trigger_input_pin" #define CMD_TRIGGER_PIN "set_trigger_input_pin"
#define CMD_TRIGGER_SIMULATOR_PIN "set_trigger_simulator_pin"
#define CMD_TRIGGERINFO "triggerinfo" #define CMD_TRIGGERINFO "triggerinfo"
#define CMD_TS_BENCH_AC_COMPRESSOR_RELAY 6 #define CMD_TS_BENCH_AC_COMPRESSOR_RELAY 6
#define CMD_TS_BENCH_AC_FAN_RELAY 5 #define CMD_TS_BENCH_AC_FAN_RELAY 5
@ -373,7 +380,7 @@
#define ENGINE_MAKE_VAG "VAG" #define ENGINE_MAKE_VAG "VAG"
#define ENGINE_NOISE_CURVE_SIZE 8 #define ENGINE_NOISE_CURVE_SIZE 8
#define ENGINE_SNIFFER_UNIT_US 10 #define ENGINE_SNIFFER_UNIT_US 10
#define engine_type_e_auto_enum "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "CHEVY_C20_1973", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE" #define engine_type_e_auto_enum "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "MRE_SUBARU_EJ18", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE"
#define engineChartSize_offset 1480 #define engineChartSize_offset 1480
#define engineCode_offset 1128 #define engineCode_offset 1128
#define engineConfiguration_offset 0 #define engineConfiguration_offset 0
@ -411,6 +418,7 @@
#define ET_MRE_MIATA_NB2_MAP 11 #define ET_MRE_MIATA_NB2_MAP 11
#define ET_MRE_NEW_TEST_BOARD 31 #define ET_MRE_NEW_TEST_BOARD 31
#define ET_MRE_OLD_TEST_BOARD 30 #define ET_MRE_OLD_TEST_BOARD 30
#define ET_MRE_SUBARU_EJ18 37
#define ET_ROVER_V8 10 #define ET_ROVER_V8 10
#define ET_SACHS 29 #define ET_SACHS 29
#define ET_VW_ABA 32 #define ET_VW_ABA 32
@ -973,6 +981,7 @@
#define knockBankCyl7_offset 976 #define knockBankCyl7_offset 976
#define knockBankCyl8_offset 976 #define knockBankCyl8_offset 976
#define knockBankCyl9_offset 976 #define knockBankCyl9_offset 976
#define knockBaseNoise_offset 4523
#define knockDetectionWindowEnd_offset 1504 #define knockDetectionWindowEnd_offset 1504
#define knockDetectionWindowStart_offset 1500 #define knockDetectionWindowStart_offset 1500
#define knockNoise_offset 1820 #define knockNoise_offset 1820
@ -1038,7 +1047,7 @@
#define mafSensorType_offset 948 #define mafSensorType_offset 948
#define mainRelayPin_offset 706 #define mainRelayPin_offset 706
#define mainRelayPinMode_offset 752 #define mainRelayPinMode_offset 752
#define mainUnusedEnd_offset 4524 #define mainUnusedEnd_offset 4540
#define malfunctionIndicatorPin_offset 660 #define malfunctionIndicatorPin_offset 660
#define malfunctionIndicatorPinMode_offset 661 #define malfunctionIndicatorPinMode_offset 661
#define manIdlePosition_offset 608 #define manIdlePosition_offset 608
@ -1212,8 +1221,8 @@
#define showHumanReadableWarning_offset 976 #define showHumanReadableWarning_offset 976
#define showSdCardWarning_offset 76 #define showSdCardWarning_offset 76
#define SIGNATURE_BOARD hellen_cypress #define SIGNATURE_BOARD hellen_cypress
#define SIGNATURE_DATE 2020.12.04 #define SIGNATURE_DATE 2020.12.09
#define SIGNATURE_HASH 3827438289 #define SIGNATURE_HASH 2671528274
#define silentTriggerError_offset 1464 #define silentTriggerError_offset 1464
#define slowAdcAlpha_offset 2088 #define slowAdcAlpha_offset 2088
#define sparkDwellRpmBins_offset 332 #define sparkDwellRpmBins_offset 332
@ -1543,7 +1552,7 @@
#define ts_show_spi true #define ts_show_spi true
#define ts_show_trigger_comparator false #define ts_show_trigger_comparator false
#define ts_show_tunerstudio_port true #define ts_show_tunerstudio_port true
#define TS_SIGNATURE "rusEFI 2020.12.04.hellen_cypress.3827438289" #define TS_SIGNATURE "rusEFI 2020.12.09.hellen_cypress.2671528274"
#define TS_SINGLE_WRITE_COMMAND 'W' #define TS_SINGLE_WRITE_COMMAND 'W'
#define TS_SINGLE_WRITE_COMMAND_char W #define TS_SINGLE_WRITE_COMMAND_char W
#define TS_TEST_COMMAND 't' // 0x74 #define TS_TEST_COMMAND 't' // 0x74
@ -1552,6 +1561,7 @@
#define TT_TT_2JZ_3_34 25 #define TT_TT_2JZ_3_34 25
#define TT_TT_36_2_2_2 23 #define TT_TT_36_2_2_2 23
#define TT_TT_3_1_CAM 31 #define TT_TT_3_1_CAM 31
#define TT_TT_51 51
#define TT_TT_60_2_VW 20 #define TT_TT_60_2_VW 20
#define TT_TT_CHRYSLER_NGC_36_2_2 30 #define TT_TT_CHRYSLER_NGC_36_2_2 30
#define TT_TT_DAIHATSU 6 #define TT_TT_DAIHATSU 6

View File

@ -285,10 +285,7 @@ typedef enum __attribute__ ((__packed__)) {
EFI_ADC_29 = 30, EFI_ADC_29 = 30,
EFI_ADC_30 = 31, EFI_ADC_30 = 31,
EFI_ADC_31 = 32, EFI_ADC_31 = 32,
EFI_ADC_LAST_CHANNEL = 33, // Please keep this in sync with the last valid channel index!
// todo: bad choice of value since now we have ADC_CHANNEL_SENSOR and could end up with 17 and 18 also EFI_ADC_ERROR = 50,
EFI_ADC_ERROR = 33,
} adc_channel_e; } adc_channel_e;
/* Plase keep updating this define */
#define EFI_ADC_LAST EFI_ADC_31

View File

@ -1,7 +1,7 @@
#include "global.h" #include "global.h"
#include "rusefi_enums.h" #include "rusefi_enums.h"
#include "rusefi_hw_enums.h" #include "rusefi_hw_enums.h"
// was generated automatically by rusEfi tool from rusefi_hw_enums.h // was generated automatically by rusEfi tool from rusefi_enums.h // by enum2string.jar tool on Fri Dec 04 00:17:47 EST 2020 // was generated automatically by rusEfi tool from rusefi_hw_enums.h // was generated automatically by rusEfi tool from rusefi_enums.h // by enum2string.jar tool on Sun Dec 06 09:01:41 EST 2020
// see also gen_config_and_enums.bat // see also gen_config_and_enums.bat
@ -72,6 +72,8 @@ case EFI_ADC_9:
return "EFI_ADC_9"; return "EFI_ADC_9";
case EFI_ADC_ERROR: case EFI_ADC_ERROR:
return "EFI_ADC_ERROR"; return "EFI_ADC_ERROR";
case EFI_ADC_LAST_CHANNEL:
return "EFI_ADC_LAST_CHANNEL";
case EFI_ADC_NONE: case EFI_ADC_NONE:
return "EFI_ADC_NONE"; return "EFI_ADC_NONE";
} }
@ -629,8 +631,6 @@ case BMW_M73_PROTEUS:
return "BMW_M73_PROTEUS"; return "BMW_M73_PROTEUS";
case CAMARO_4: case CAMARO_4:
return "CAMARO_4"; return "CAMARO_4";
case CHEVY_C20_1973:
return "CHEVY_C20_1973";
case CITROEN_TU3JP: case CITROEN_TU3JP:
return "CITROEN_TU3JP"; return "CITROEN_TU3JP";
case DEFAULT_FRANKENSO: case DEFAULT_FRANKENSO:
@ -717,6 +717,8 @@ case MRE_MIATA_NB2_MAF:
return "MRE_MIATA_NB2_MAF"; return "MRE_MIATA_NB2_MAF";
case MRE_MIATA_NB2_MAP: case MRE_MIATA_NB2_MAP:
return "MRE_MIATA_NB2_MAP"; return "MRE_MIATA_NB2_MAP";
case MRE_SUBARU_EJ18:
return "MRE_SUBARU_EJ18";
case NISSAN_PRIMERA: case NISSAN_PRIMERA:
return "NISSAN_PRIMERA"; return "NISSAN_PRIMERA";
case PROMETHEUS_DEFAULTS: case PROMETHEUS_DEFAULTS:

View File

@ -1,4 +1,4 @@
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Fri Dec 04 16:38:41 UTC 2020 // this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Wed Dec 09 02:10:29 UTC 2020
// by class com.rusefi.output.CHeaderConsumer // by class com.rusefi.output.CHeaderConsumer
// begin // begin
#pragma once #pragma once
@ -689,7 +689,7 @@ struct engine_configuration_s {
offset 76 bit 12 */ offset 76 bit 12 */
bool etb_use_two_wires : 1; bool etb_use_two_wires : 1;
/** /**
* Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position. * Subaru/BMW style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position.
offset 76 bit 13 */ offset 76 bit 13 */
bool isDoubleSolenoidIdle : 1; bool isDoubleSolenoidIdle : 1;
/** /**
@ -3473,14 +3473,18 @@ struct engine_configuration_s {
*/ */
pin_output_mode_e tcu_solenoid_mode[TCU_SOLENOID_COUNT]; pin_output_mode_e tcu_solenoid_mode[TCU_SOLENOID_COUNT];
/** /**
* need 4 byte alignment
* offset 4523 * offset 4523
*/ */
uint8_t alignmentFill_at_4523; int8_t knockBaseNoise[IGN_RPM_COUNT];
/** /**
* offset 4524 * need 4 byte alignment
* offset 4539
*/ */
int mainUnusedEnd[369]; uint8_t alignmentFill_at_4539;
/**
* offset 4540
*/
int mainUnusedEnd[365];
/** total size 6000*/ /** total size 6000*/
}; };
@ -3778,4 +3782,4 @@ struct persistent_config_s {
typedef struct persistent_config_s persistent_config_s; typedef struct persistent_config_s persistent_config_s;
// end // end
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Fri Dec 04 16:38:41 UTC 2020 // this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Wed Dec 09 02:10:29 UTC 2020

View File

@ -47,7 +47,7 @@
#define air_pressure_sensor_type_e_auto_enum "MT_CUSTOM", "MT_DENSO183", "MT_MPX4250", "MT_HONDA3BAR", "MT_DODGE_NEON_2003", "MT_SUBY_DENSO", "MT_GM_3_BAR", "MT_MPX4100", "MT_TOYOTA_89420_02010", "MT_MPX4250A", "MT_BOSCH_2_5", "MT_MAZDA_1_BAR" #define air_pressure_sensor_type_e_auto_enum "MT_CUSTOM", "MT_DENSO183", "MT_MPX4250", "MT_HONDA3BAR", "MT_DODGE_NEON_2003", "MT_SUBY_DENSO", "MT_GM_3_BAR", "MT_MPX4100", "MT_TOYOTA_89420_02010", "MT_MPX4250A", "MT_BOSCH_2_5", "MT_MAZDA_1_BAR"
#define alignEngineSnifferAtTDC_offset 744 #define alignEngineSnifferAtTDC_offset 744
#define alignmentFill_at_2227_offset 2227 #define alignmentFill_at_2227_offset 2227
#define alignmentFill_at_4523_offset 4523 #define alignmentFill_at_4539_offset 4539
#define alternator_antiwindupFreq_offset 1764 #define alternator_antiwindupFreq_offset 1764
#define alternator_derivativeFilterLoss_offset 1760 #define alternator_derivativeFilterLoss_offset 1760
#define alternatorControl_dFactor_offset 1724 #define alternatorControl_dFactor_offset 1724
@ -240,6 +240,8 @@
#define clutchDownPinMode_offset 667 #define clutchDownPinMode_offset 667
#define clutchUpPin_offset 969 #define clutchUpPin_offset 969
#define clutchUpPinMode_offset 971 #define clutchUpPinMode_offset 971
#define CMD_ALTERNATOR_PIN "set_alternator_pin"
#define CMD_BOOST_PIN "set_boost_pin"
#define CMD_CALIBRATE_PEDAL_DOWN "calibrate_pedal_down" #define CMD_CALIBRATE_PEDAL_DOWN "calibrate_pedal_down"
#define CMD_CALIBRATE_PEDAL_UP "calibrate_pedal_up" #define CMD_CALIBRATE_PEDAL_UP "calibrate_pedal_up"
#define CMD_DATE "date" #define CMD_DATE "date"
@ -251,8 +253,12 @@
#define CMD_FUEL_BENCH "fuelbench" #define CMD_FUEL_BENCH "fuelbench"
#define CMD_FUNCTIONAL_TEST_MODE "test_mode" #define CMD_FUNCTIONAL_TEST_MODE "test_mode"
#define CMD_HPFP_BENCH "hpfpbench" #define CMD_HPFP_BENCH "hpfpbench"
#define CMD_IDLE_PIN "set_idle_pin"
#define CMD_IGNITION "ignition" #define CMD_IGNITION "ignition"
#define CMD_IGNITION_PIN "set_ignition_pin"
#define CMD_INJECTION "injection" #define CMD_INJECTION "injection"
#define CMD_INJECTION_PIN "set_injection_pin"
#define CMD_LOGIC_PIN "set_logic_input_pin"
#define CMD_MIL_BENCH "milbench" #define CMD_MIL_BENCH "milbench"
#define CMD_PINS "pins" #define CMD_PINS "pins"
#define CMD_PWM "pwm" #define CMD_PWM "pwm"
@ -264,6 +270,7 @@
#define CMD_STARTER_BENCH "starterbench" #define CMD_STARTER_BENCH "starterbench"
#define CMD_TRIGGER_HW_INPUT "trigger_hw_input" #define CMD_TRIGGER_HW_INPUT "trigger_hw_input"
#define CMD_TRIGGER_PIN "set_trigger_input_pin" #define CMD_TRIGGER_PIN "set_trigger_input_pin"
#define CMD_TRIGGER_SIMULATOR_PIN "set_trigger_simulator_pin"
#define CMD_TRIGGERINFO "triggerinfo" #define CMD_TRIGGERINFO "triggerinfo"
#define CMD_TS_BENCH_AC_COMPRESSOR_RELAY 6 #define CMD_TS_BENCH_AC_COMPRESSOR_RELAY 6
#define CMD_TS_BENCH_AC_FAN_RELAY 5 #define CMD_TS_BENCH_AC_FAN_RELAY 5
@ -373,7 +380,7 @@
#define ENGINE_MAKE_VAG "VAG" #define ENGINE_MAKE_VAG "VAG"
#define ENGINE_NOISE_CURVE_SIZE 8 #define ENGINE_NOISE_CURVE_SIZE 8
#define ENGINE_SNIFFER_UNIT_US 10 #define ENGINE_SNIFFER_UNIT_US 10
#define engine_type_e_auto_enum "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "CHEVY_C20_1973", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE" #define engine_type_e_auto_enum "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "MRE_SUBARU_EJ18", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE"
#define engineChartSize_offset 1480 #define engineChartSize_offset 1480
#define engineCode_offset 1128 #define engineCode_offset 1128
#define engineConfiguration_offset 0 #define engineConfiguration_offset 0
@ -411,6 +418,7 @@
#define ET_MRE_MIATA_NB2_MAP 11 #define ET_MRE_MIATA_NB2_MAP 11
#define ET_MRE_NEW_TEST_BOARD 31 #define ET_MRE_NEW_TEST_BOARD 31
#define ET_MRE_OLD_TEST_BOARD 30 #define ET_MRE_OLD_TEST_BOARD 30
#define ET_MRE_SUBARU_EJ18 37
#define ET_ROVER_V8 10 #define ET_ROVER_V8 10
#define ET_SACHS 29 #define ET_SACHS 29
#define ET_VW_ABA 32 #define ET_VW_ABA 32
@ -973,6 +981,7 @@
#define knockBankCyl7_offset 976 #define knockBankCyl7_offset 976
#define knockBankCyl8_offset 976 #define knockBankCyl8_offset 976
#define knockBankCyl9_offset 976 #define knockBankCyl9_offset 976
#define knockBaseNoise_offset 4523
#define knockDetectionWindowEnd_offset 1504 #define knockDetectionWindowEnd_offset 1504
#define knockDetectionWindowStart_offset 1500 #define knockDetectionWindowStart_offset 1500
#define knockNoise_offset 1820 #define knockNoise_offset 1820
@ -1038,7 +1047,7 @@
#define mafSensorType_offset 948 #define mafSensorType_offset 948
#define mainRelayPin_offset 706 #define mainRelayPin_offset 706
#define mainRelayPinMode_offset 752 #define mainRelayPinMode_offset 752
#define mainUnusedEnd_offset 4524 #define mainUnusedEnd_offset 4540
#define malfunctionIndicatorPin_offset 660 #define malfunctionIndicatorPin_offset 660
#define malfunctionIndicatorPinMode_offset 661 #define malfunctionIndicatorPinMode_offset 661
#define manIdlePosition_offset 608 #define manIdlePosition_offset 608
@ -1212,8 +1221,8 @@
#define showHumanReadableWarning_offset 976 #define showHumanReadableWarning_offset 976
#define showSdCardWarning_offset 76 #define showSdCardWarning_offset 76
#define SIGNATURE_BOARD kin #define SIGNATURE_BOARD kin
#define SIGNATURE_DATE 2020.12.04 #define SIGNATURE_DATE 2020.12.09
#define SIGNATURE_HASH 3040749611 #define SIGNATURE_HASH 3458233256
#define silentTriggerError_offset 1464 #define silentTriggerError_offset 1464
#define slowAdcAlpha_offset 2088 #define slowAdcAlpha_offset 2088
#define sparkDwellRpmBins_offset 332 #define sparkDwellRpmBins_offset 332
@ -1543,7 +1552,7 @@
#define ts_show_spi true #define ts_show_spi true
#define ts_show_trigger_comparator true #define ts_show_trigger_comparator true
#define ts_show_tunerstudio_port true #define ts_show_tunerstudio_port true
#define TS_SIGNATURE "rusEFI 2020.12.04.kin.3040749611" #define TS_SIGNATURE "rusEFI 2020.12.09.kin.3458233256"
#define TS_SINGLE_WRITE_COMMAND 'W' #define TS_SINGLE_WRITE_COMMAND 'W'
#define TS_SINGLE_WRITE_COMMAND_char W #define TS_SINGLE_WRITE_COMMAND_char W
#define TS_TEST_COMMAND 't' // 0x74 #define TS_TEST_COMMAND 't' // 0x74
@ -1552,6 +1561,7 @@
#define TT_TT_2JZ_3_34 25 #define TT_TT_2JZ_3_34 25
#define TT_TT_36_2_2_2 23 #define TT_TT_36_2_2_2 23
#define TT_TT_3_1_CAM 31 #define TT_TT_3_1_CAM 31
#define TT_TT_51 51
#define TT_TT_60_2_VW 20 #define TT_TT_60_2_VW 20
#define TT_TT_CHRYSLER_NGC_36_2_2 30 #define TT_TT_CHRYSLER_NGC_36_2_2 30
#define TT_TT_DAIHATSU 6 #define TT_TT_DAIHATSU 6

View File

@ -176,10 +176,7 @@ typedef enum __attribute__ ((__packed__)) {
EFI_ADC_13 = 14, EFI_ADC_13 = 14,
EFI_ADC_14 = 15, EFI_ADC_14 = 15,
EFI_ADC_15 = 16, EFI_ADC_15 = 16,
EFI_ADC_LAST_CHANNEL = 17, // Please keep this in sync with the last valid channel index!
// todo: bad choice of value since now we have ADC_CHANNEL_SENSOR and could end up with 17 and 18 also EFI_ADC_ERROR = 50,
EFI_ADC_ERROR = 17,
} adc_channel_e; } adc_channel_e;
/* Plase keep updating this define */
#define EFI_ADC_LAST EFI_ADC_15

View File

@ -42,3 +42,14 @@ void setSubaru2003Wrx(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
void setSubaruEJ20GDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) { void setSubaruEJ20GDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->trigger.type = TT_SUBARU_7_6; engineConfiguration->trigger.type = TT_SUBARU_7_6;
} }
/**
* MRE_SUBARU_EJ18
* set engine_type 37
*/
void setSubaruEJ18_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->trigger.type = TT_SUBARU_7_6;
CONFIG(isDoubleSolenoidIdle) = true;
}

View File

@ -9,3 +9,4 @@
void setSubaru2003Wrx(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setSubaru2003Wrx(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setSubaruEJ20GDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setSubaruEJ20GDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setSubaruEJ18_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE);

View File

@ -28,6 +28,7 @@
#define SIGNATURE_H QUOTE(SIGNATURE_NAME SHORT_BOARD_NAME SIGNATURE_EXT) #define SIGNATURE_H QUOTE(SIGNATURE_NAME SHORT_BOARD_NAME SIGNATURE_EXT)
#if !EFI_UNIT_TEST
#include SIGNATURE_H #include SIGNATURE_H
#pragma message ("TS_SIGNATURE: " TS_SIGNATURE) #pragma message ("TS_SIGNATURE: " TS_SIGNATURE)
@ -35,3 +36,4 @@
const char *getTsSignature() { const char *getTsSignature() {
return TS_SIGNATURE; return TS_SIGNATURE;
} }
#endif

View File

@ -63,7 +63,7 @@ int getCompositeRecordCount() {
#if EFI_UNIT_TEST #if EFI_UNIT_TEST
#include "logicdata.h" #include "logicdata.h"
int copyCompositeEvents(CompositeEvent *events) { int copyCompositeEvents(CompositeEvent *events) {
for (int i = 0;i < NextIdx;i++) { for (size_t i = 0; i < NextIdx; i++) {
CompositeEvent *event = &events[i]; CompositeEvent *event = &events[i];
event->timestamp = SWAP_UINT32(buffer[i].timestamp); event->timestamp = SWAP_UINT32(buffer[i].timestamp);
event->primaryTrigger = buffer[i].priLevel; event->primaryTrigger = buffer[i].priLevel;

View File

@ -64,6 +64,7 @@
#include "allsensors.h" #include "allsensors.h"
#include "tunerstudio.h" #include "tunerstudio.h"
#include "tunerstudio_impl.h"
#include "main_trigger_callback.h" #include "main_trigger_callback.h"
#include "flash_main.h" #include "flash_main.h"
@ -262,7 +263,7 @@ static const void * getStructAddr(int structId) {
return static_cast<trigger_state_s*>(&engine->triggerCentral.triggerState); return static_cast<trigger_state_s*>(&engine->triggerCentral.triggerState);
#if EFI_ELECTRONIC_THROTTLE_BODY #if EFI_ELECTRONIC_THROTTLE_BODY
case LDS_ETB_PID_STATE_INDEX: case LDS_ETB_PID_STATE_INDEX:
return static_cast<EtbController*>(engine->etbControllers[0])->getPidState(); return engine->etbControllers[0]->getPidState();
#endif /* EFI_ELECTRONIC_THROTTLE_BODY */ #endif /* EFI_ELECTRONIC_THROTTLE_BODY */
#ifndef EFI_IDLE_CONTROL #ifndef EFI_IDLE_CONTROL
@ -459,114 +460,118 @@ static bool isKnownCommand(char command) {
|| command == TS_GET_CONFIG_ERROR; || command == TS_GET_CONFIG_ERROR;
} }
// this function runs indefinitely TunerStudioBase tsInstance;
void runBinaryProtocolLoop(ts_channel_s *tsChannel) {
int wasReady = false;
while (true) { static void tsProcessOne(ts_channel_s* tsChannel) {
validateStack("communication", STACK_USAGE_COMMUNICATION, 128); validateStack("communication", STACK_USAGE_COMMUNICATION, 128);
int isReady = sr5IsReady(tsChannel); int isReady = sr5IsReady(tsChannel);
if (!isReady) { if (!isReady) {
chThdSleepMilliseconds(10); chThdSleepMilliseconds(10);
wasReady = false; tsChannel->wasReady = false;
continue; return;
} }
if (!wasReady) { if (!tsChannel->wasReady) {
wasReady = true; tsChannel->wasReady = true;
// scheduleSimpleMsg(&logger, "ts channel is now ready ", hTimeNow()); // scheduleSimpleMsg(&logger, "ts channel is now ready ", hTimeNow());
} }
tsState.totalCounter++; tsState.totalCounter++;
uint8_t firstByte; uint8_t firstByte;
int received = sr5ReadData(tsChannel, &firstByte, 1); int received = sr5ReadData(tsChannel, &firstByte, 1);
#if EFI_SIMULATOR #if EFI_SIMULATOR
logMsg("received %d\r\n", received); logMsg("received %d\r\n", received);
#endif #endif
if (received != 1) { if (received != 1) {
// tunerStudioError("ERROR: no command"); // tunerStudioError("ERROR: no command");
#if EFI_BLUETOOTH_SETUP #if EFI_BLUETOOTH_SETUP
// assume there's connection loss and notify the bluetooth init code // assume there's connection loss and notify the bluetooth init code
bluetoothSoftwareDisconnectNotify(); bluetoothSoftwareDisconnectNotify();
#endif /* EFI_BLUETOOTH_SETUP */ #endif /* EFI_BLUETOOTH_SETUP */
continue; return;
} }
onDataArrived(); onDataArrived();
// scheduleMsg(logger, "Got first=%x=[%c]", firstByte, firstByte); // scheduleMsg(logger, "Got first=%x=[%c]", firstByte, firstByte);
if (handlePlainCommand(tsChannel, firstByte)) if (handlePlainCommand(tsChannel, firstByte))
continue; return;
uint8_t secondByte; uint8_t secondByte;
received = sr5ReadData(tsChannel, &secondByte, 1); received = sr5ReadData(tsChannel, &secondByte, 1);
if (received != 1) { if (received != 1) {
tunerStudioError("TS: ERROR: no second byte"); tunerStudioError("TS: ERROR: no second byte");
continue; return;
} }
// scheduleMsg(logger, "Got secondByte=%x=[%c]", secondByte, secondByte); // scheduleMsg(logger, "Got secondByte=%x=[%c]", secondByte, secondByte);
uint16_t incomingPacketSize = firstByte << 8 | secondByte; uint16_t incomingPacketSize = firstByte << 8 | secondByte;
if (incomingPacketSize == 0 || incomingPacketSize > (sizeof(tsChannel->scratchBuffer) - CRC_WRAPPING_SIZE)) { if (incomingPacketSize == 0 || incomingPacketSize > (sizeof(tsChannel->scratchBuffer) - CRC_WRAPPING_SIZE)) {
scheduleMsg(&tsLogger, "TunerStudio: invalid size: %d", incomingPacketSize); scheduleMsg(&tsLogger, "TunerStudio: invalid size: %d", incomingPacketSize);
tunerStudioError("ERROR: CRC header size"); tunerStudioError("ERROR: CRC header size");
sendErrorCode(tsChannel, TS_RESPONSE_UNDERRUN); sendErrorCode(tsChannel, TS_RESPONSE_UNDERRUN);
continue; return;
} }
received = sr5ReadData(tsChannel, (uint8_t* )tsChannel->scratchBuffer, 1); received = sr5ReadData(tsChannel, (uint8_t* )tsChannel->scratchBuffer, 1);
if (received != 1) { if (received != 1) {
tunerStudioError("ERROR: did not receive command"); tunerStudioError("ERROR: did not receive command");
sendErrorCode(tsChannel, TS_RESPONSE_UNDERRUN); sendErrorCode(tsChannel, TS_RESPONSE_UNDERRUN);
continue; return;
} }
char command = tsChannel->scratchBuffer[0]; char command = tsChannel->scratchBuffer[0];
if (!isKnownCommand(command)) { if (!isKnownCommand(command)) {
scheduleMsg(&tsLogger, "unexpected command %x", command); scheduleMsg(&tsLogger, "unexpected command %x", command);
sendErrorCode(tsChannel, TS_RESPONSE_UNRECOGNIZED_COMMAND); sendErrorCode(tsChannel, TS_RESPONSE_UNRECOGNIZED_COMMAND);
continue; return;
} }
#if EFI_SIMULATOR #if EFI_SIMULATOR
logMsg("command %c\r\n", command); logMsg("command %c\r\n", command);
#endif #endif
received = sr5ReadData(tsChannel, (uint8_t * ) (tsChannel->scratchBuffer + 1), received = sr5ReadData(tsChannel, (uint8_t * ) (tsChannel->scratchBuffer + 1),
incomingPacketSize + CRC_VALUE_SIZE - 1); incomingPacketSize + CRC_VALUE_SIZE - 1);
int expectedSize = incomingPacketSize + CRC_VALUE_SIZE - 1; int expectedSize = incomingPacketSize + CRC_VALUE_SIZE - 1;
if (received != expectedSize) { if (received != expectedSize) {
scheduleMsg(&tsLogger, "Got only %d bytes while expecting %d for command %c", received, scheduleMsg(&tsLogger, "Got only %d bytes while expecting %d for command %c", received,
expectedSize, command); expectedSize, command);
tunerStudioError("ERROR: not enough bytes in stream"); tunerStudioError("ERROR: not enough bytes in stream");
sendErrorCode(tsChannel, TS_RESPONSE_UNDERRUN); sendErrorCode(tsChannel, TS_RESPONSE_UNDERRUN);
continue; return;
} }
uint32_t expectedCrc = *(uint32_t*) (tsChannel->scratchBuffer + incomingPacketSize); uint32_t expectedCrc = *(uint32_t*) (tsChannel->scratchBuffer + incomingPacketSize);
expectedCrc = SWAP_UINT32(expectedCrc); expectedCrc = SWAP_UINT32(expectedCrc);
uint32_t actualCrc = crc32(tsChannel->scratchBuffer, incomingPacketSize); uint32_t actualCrc = crc32(tsChannel->scratchBuffer, incomingPacketSize);
if (actualCrc != expectedCrc) { if (actualCrc != expectedCrc) {
scheduleMsg(&tsLogger, "TunerStudio: CRC %x %x %x %x", tsChannel->scratchBuffer[incomingPacketSize + 0], scheduleMsg(&tsLogger, "TunerStudio: CRC %x %x %x %x", tsChannel->scratchBuffer[incomingPacketSize + 0],
tsChannel->scratchBuffer[incomingPacketSize + 1], tsChannel->scratchBuffer[incomingPacketSize + 2], tsChannel->scratchBuffer[incomingPacketSize + 1], tsChannel->scratchBuffer[incomingPacketSize + 2],
tsChannel->scratchBuffer[incomingPacketSize + 3]); tsChannel->scratchBuffer[incomingPacketSize + 3]);
scheduleMsg(&tsLogger, "TunerStudio: command %c actual CRC %x/expected %x", tsChannel->scratchBuffer[0], scheduleMsg(&tsLogger, "TunerStudio: command %c actual CRC %x/expected %x", tsChannel->scratchBuffer[0],
actualCrc, expectedCrc); actualCrc, expectedCrc);
tunerStudioError("ERROR: CRC issue"); tunerStudioError("ERROR: CRC issue");
sendErrorCode(tsChannel, TS_RESPONSE_CRC_FAILURE); sendErrorCode(tsChannel, TS_RESPONSE_CRC_FAILURE);
continue; return;
} }
int success = tunerStudioHandleCrcCommand(tsChannel, tsChannel->scratchBuffer, incomingPacketSize); int success = tsInstance.handleCrcCommand(tsChannel, tsChannel->scratchBuffer, incomingPacketSize);
if (!success) if (!success)
print("got unexpected TunerStudio command %x:%c\r\n", command, command); print("got unexpected TunerStudio command %x:%c\r\n", command, command);
}
void runBinaryProtocolLoop(ts_channel_s *tsChannel)
{
// Until the end of time, process incoming messages.
while(true) {
tsProcessOne(tsChannel);
} }
} }
@ -724,8 +729,7 @@ bool handlePlainCommand(ts_channel_s *tsChannel, uint8_t command) {
static int transmitted = 0; static int transmitted = 0;
int TunerStudioBase::handleCrcCommand(ts_channel_s *tsChannel, char *data, int incomingPacketSize) {
int tunerStudioHandleCrcCommand(ts_channel_s *tsChannel, char *data, int incomingPacketSize) {
ScopePerf perf(PE::TunerStudioHandleCrcCommand); ScopePerf perf(PE::TunerStudioHandleCrcCommand);
char command = data[0]; char command = data[0];

View File

@ -36,7 +36,6 @@ extern tunerstudio_counters_s tsState;
* handle non CRC wrapped command * handle non CRC wrapped command
*/ */
bool handlePlainCommand(ts_channel_s *tsChannel, uint8_t command); bool handlePlainCommand(ts_channel_s *tsChannel, uint8_t command);
int tunerStudioHandleCrcCommand(ts_channel_s *tsChannel, char *data, int incomingPacketSize);
/** /**
* this command is part of protocol initialization * this command is part of protocol initialization
@ -67,28 +66,9 @@ void runBinaryProtocolLoop(ts_channel_s *tsChannel);
#endif #endif
typedef pre_packed struct typedef pre_packed struct
post_packed { post_packed {
short int offset; short int offset;
short int count; short int count;
} TunerStudioOchRequest; } TunerStudioWriteChunkRequest;
typedef pre_packed struct
post_packed {
short int offset;
short int count;
} TunerStudioWriteChunkRequest;
typedef pre_packed struct
post_packed {
short int offset;
short int count;
} TunerStudioReadRequest;
typedef pre_packed struct
post_packed {
short int offset;
unsigned char value;
} TunerStudioWriteValueRequest;
#endif /* EFI_TUNER_STUDIO */ #endif /* EFI_TUNER_STUDIO */

View File

@ -0,0 +1,8 @@
#pragma once
class ts_channel_s;
class TunerStudioBase {
public:
int handleCrcCommand(ts_channel_s *tsChannel, char *data, int incomingPacketSize);
};

View File

@ -34,6 +34,8 @@ struct ts_channel_s {
#if TS_UART_DMA_MODE || PRIMARY_UART_DMA_MODE || TS_UART_MODE #if TS_UART_DMA_MODE || PRIMARY_UART_DMA_MODE || TS_UART_MODE
UARTDriver *uartp = nullptr; UARTDriver *uartp = nullptr;
#endif // TS_UART_DMA_MODE #endif // TS_UART_DMA_MODE
bool wasReady = false;
}; };
#define CRC_VALUE_SIZE 4 #define CRC_VALUE_SIZE 4

View File

@ -78,6 +78,7 @@ typedef struct {
unsigned int isPedalError : 1; // bit 26 unsigned int isPedalError : 1; // bit 26
unsigned int isKnockChipOk : 1; // bit 27 unsigned int isKnockChipOk : 1; // bit 27
unsigned int launchTriggered : 1; // bit 28 unsigned int launchTriggered : 1; // bit 28
unsigned int isTps2Error : 1; // bit 29
// RPM, vss // RPM, vss
scaled_channel<uint16_t> rpm; // 4 scaled_channel<uint16_t> rpm; // 4

View File

@ -63,6 +63,10 @@ extern SERIAL_USB_DRIVER EFI_CONSOLE_USB_DEVICE;
static bool isSerialConsoleStarted = false; static bool isSerialConsoleStarted = false;
#if (defined(EFI_CONSOLE_SERIAL_DEVICE) && ! EFI_SIMULATOR)
static event_listener_t consoleEventListener;
#endif
bool consoleByteArrived = false; bool consoleByteArrived = false;
void onDataArrived(void) { void onDataArrived(void) {

View File

@ -491,6 +491,8 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
SensorResult tps2 = Sensor::get(SensorType::Tps2); SensorResult tps2 = Sensor::get(SensorType::Tps2);
tsOutputChannels->throttle2Position = tps2.Value; tsOutputChannels->throttle2Position = tps2.Value;
// If we don't have a TPS2 at all, don't turn on the failure light
tsOutputChannels->isTps2Error = !tps2.Valid && Sensor::hasSensor(SensorType::Tps2);
SensorResult pedal = Sensor::get(SensorType::AcceleratorPedal); SensorResult pedal = Sensor::get(SensorType::AcceleratorPedal);
tsOutputChannels->pedalPosition = pedal.Value; tsOutputChannels->pedalPosition = pedal.Value;

View File

@ -171,4 +171,14 @@ void initAlternatorCtrl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
instance.Start(); instance.Start();
} }
// todo: start invoking this method like 'startAuxPins'
void startAlternatorPin(void) {
}
void stopAlternatorPin(void) {
// todo: implementation!
}
#endif /* EFI_ALTERNATOR_CONTROL */ #endif /* EFI_ALTERNATOR_CONTROL */

View File

@ -12,6 +12,8 @@
#include "engine.h" #include "engine.h"
void initAlternatorCtrl(Logging *sharedLogger); void initAlternatorCtrl(Logging *sharedLogger);
void startAlternatorPin(void);
void stopAlternatorPin(void);
void setAltPFactor(float p); void setAltPFactor(float p);
void setAltIFactor(float p); void setAltIFactor(float p);
void setAltDFactor(float p); void setAltDFactor(float p);

View File

@ -125,13 +125,13 @@ static void turnAuxPidOn(int index) {
engineConfiguration->auxPidFrequency[index], 0.1); engineConfiguration->auxPidFrequency[index], 0.1);
} }
void startAuxPins(void) { void startAuxPins() {
for (int i = 0;i <AUX_PID_COUNT;i++) { for (int i = 0;i <AUX_PID_COUNT;i++) {
turnAuxPidOn(i); turnAuxPidOn(i);
} }
} }
void stopAuxPins(void) { void stopAuxPins() {
#if EFI_PROD_CODE #if EFI_PROD_CODE
for (int i = 0;i < AUX_PID_COUNT;i++) { for (int i = 0;i < AUX_PID_COUNT;i++) {
efiSetPadUnused(activeConfiguration.auxPidPins[i]); efiSetPadUnused(activeConfiguration.auxPidPins[i]);

View File

@ -10,6 +10,6 @@
#include "global.h" #include "global.h"
void initAuxPid(Logging *sharedLogger); void initAuxPid(Logging *sharedLogger);
void startAuxPins(void); void startAuxPins();
void stopAuxPins(void); void stopAuxPins();

View File

@ -221,6 +221,8 @@ void onConfigurationChangeBoostCallback(engine_configuration_s *previousConfigur
} }
void initBoostCtrl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { void initBoostCtrl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
// todo: why do we have 'isBoostControlEnabled' setting exactly?
// 'initAuxPid' is an example of a subsystem without explicit enable
if (!CONFIG(isBoostControlEnabled)) { if (!CONFIG(isBoostControlEnabled)) {
return; return;
} }

View File

@ -75,7 +75,8 @@
#if EFI_ELECTRONIC_THROTTLE_BODY #if EFI_ELECTRONIC_THROTTLE_BODY
#include "electronic_throttle.h" #include "electronic_throttle_impl.h"
#include "engine.h"
#include "tps.h" #include "tps.h"
#include "sensor.h" #include "sensor.h"
#include "dc_motor.h" #include "dc_motor.h"
@ -160,7 +161,7 @@ static percent_t currentEtbDuty;
// this macro clamps both positive and negative percentages from about -100% to 100% // this macro clamps both positive and negative percentages from about -100% to 100%
#define ETB_PERCENT_TO_DUTY(x) (clampF(-ETB_DUTY_LIMIT, 0.01f * (x), ETB_DUTY_LIMIT)) #define ETB_PERCENT_TO_DUTY(x) (clampF(-ETB_DUTY_LIMIT, 0.01f * (x), ETB_DUTY_LIMIT))
bool EtbController::init(etb_function_e function, DcMotor *motor, pid_s *pidParameters, const ValueProvider3D* pedalMap) { bool EtbController::init(etb_function_e function, DcMotor *motor, pid_s *pidParameters, const ValueProvider3D* pedalMap, bool initializeThrottles) {
if (function == ETB_None) { if (function == ETB_None) {
// if not configured, don't init. // if not configured, don't init.
return false; return false;
@ -168,6 +169,25 @@ bool EtbController::init(etb_function_e function, DcMotor *motor, pid_s *pidPara
m_function = function; m_function = function;
m_positionSensor = functionToPositionSensor(function); m_positionSensor = functionToPositionSensor(function);
// If we are a throttle, require redundant TPS sensor
if (function == ETB_Throttle1 || function == ETB_Throttle2) {
// We don't need to init throttles, so nothing to do here.
if (!initializeThrottles) {
return false;
}
if (!Sensor::isRedundant(m_positionSensor)) {
firmwareError(
OBD_Throttle_Position_Sensor_Circuit_Malfunction,
"Use of electronic throttle requires %s to be redundant.",
Sensor::getSensorName(m_positionSensor)
);
return false;
}
}
m_motor = motor; m_motor = motor;
m_pid.initPidClass(pidParameters); m_pid.initPidClass(pidParameters);
m_pedalMap = pedalMap; m_pedalMap = pedalMap;
@ -845,7 +865,7 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
pedal2tpsMap.init(config->pedalToTpsTable, config->pedalToTpsPedalBins, config->pedalToTpsRpmBins); pedal2tpsMap.init(config->pedalToTpsTable, config->pedalToTpsPedalBins, config->pedalToTpsRpmBins);
bool mustHaveEtbConfigured = Sensor::hasSensor(SensorType::AcceleratorPedalPrimary); bool shouldInitThrottles = Sensor::hasSensor(SensorType::AcceleratorPedalPrimary);
bool anyEtbConfigured = false; bool anyEtbConfigured = false;
for (int i = 0 ; i < ETB_COUNT; i++) { for (int i = 0 ; i < ETB_COUNT; i++) {
@ -862,14 +882,14 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
auto func = CONFIG(etbFunctions[i]); auto func = CONFIG(etbFunctions[i]);
auto pid = getEtbPidForFunction(func PASS_ENGINE_PARAMETER_SUFFIX); auto pid = getEtbPidForFunction(func PASS_ENGINE_PARAMETER_SUFFIX);
anyEtbConfigured |= controller->init(func, motor, pid, &pedal2tpsMap); anyEtbConfigured |= controller->init(func, motor, pid, &pedal2tpsMap, shouldInitThrottles);
INJECT_ENGINE_REFERENCE(engine->etbControllers[i]); INJECT_ENGINE_REFERENCE(engine->etbControllers[i]);
} }
} }
if (!anyEtbConfigured) { if (!anyEtbConfigured) {
// It's not valid to have a PPS without any ETBs - check that at least one ETB was enabled along with the pedal // It's not valid to have a PPS without any ETBs - check that at least one ETB was enabled along with the pedal
if (mustHaveEtbConfigured) { if (shouldInitThrottles) {
firmwareError(OBD_PCM_Processor_Fault, "A pedal position sensor was configured, but no electronic throttles are configured."); firmwareError(OBD_PCM_Processor_Fault, "A pedal position sensor was configured, but no electronic throttles are configured.");
} }

View File

@ -7,108 +7,9 @@
#pragma once #pragma once
/** #include "engine_ptr.h"
* Hard code ETB update speed.
* Since this is a safety critical system with no real reason for a user to ever need to change the update rate,
* it's locked to 500hz, along with the ADC.
* https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem
*/
#define ETB_LOOP_FREQUENCY 500
#define DEFAULT_ETB_PWM_FREQUENCY 800
#include "engine.h"
#include "closed_loop_controller.h" #include "closed_loop_controller.h"
#include "expected.h" #include "rusefi_types.h"
#include "sensor.h"
class DcMotor;
class Logging;
class IEtbController : public ClosedLoopController<percent_t, percent_t> {
public:
DECLARE_ENGINE_PTR;
// Initialize the throttle.
// returns true if the throttle was initialized, false otherwise.
virtual bool init(etb_function_e function, DcMotor *motor, pid_s *pidParameters, const ValueProvider3D* pedalMap) = 0;
virtual void reset() = 0;
virtual void setIdlePosition(percent_t pos) = 0;
virtual void setWastegatePosition(percent_t pos) = 0;
virtual void update() = 0;
virtual void autoCalibrateTps() = 0;
};
class EtbController : public IEtbController {
public:
bool init(etb_function_e function, DcMotor *motor, pid_s *pidParameters, const ValueProvider3D* pedalMap) override;
void setIdlePosition(percent_t pos) override;
void setWastegatePosition(percent_t pos) override;
void reset() override;
// Update the controller's state: read sensors, send output, etc
void update();
// Called when the configuration may have changed. Controller will
// reset if necessary.
void onConfigurationChange(pid_s* previousConfiguration);
// Print this throttle's status.
void showStatus(Logging* logger);
// Helpers for individual parts of throttle control
expected<percent_t> observePlant() const override;
expected<percent_t> getSetpoint() const override;
expected<percent_t> getSetpointEtb() const;
expected<percent_t> getSetpointWastegate() const;
expected<percent_t> getSetpointIdleValve() const;
expected<percent_t> getOpenLoop(percent_t target) const override;
expected<percent_t> getClosedLoop(percent_t setpoint, percent_t observation) override;
expected<percent_t> getClosedLoopAutotune(percent_t actualThrottlePosition);
void setOutput(expected<percent_t> outputValue) override;
// Used to inspect the internal PID controller's state
const pid_state_s* getPidState() const { return &m_pid; };
// Use the throttle to automatically calibrate the relevant throttle position sensor(s).
void autoCalibrateTps() override;
protected:
// This is set if an automatic TPS calibration should be run
bool m_isAutocal = false;
etb_function_e getFunction() const { return m_function; }
DcMotor* getMotor() { return m_motor; }
private:
etb_function_e m_function = ETB_None;
SensorType m_positionSensor = SensorType::Invalid;
DcMotor *m_motor = nullptr;
Pid m_pid;
bool m_shouldResetPid = false;
// Pedal -> target map
const ValueProvider3D* m_pedalMap = nullptr;
float m_idlePosition = 0;
float m_wastegatePosition = 0;
// Autotune helpers
bool m_lastIsPositive = false;
efitick_t m_cycleStartTime = 0;
float m_minCycleTps = 0;
float m_maxCycleTps = 0;
// Autotune measured parameters: gain and ultimate period
// These are set to correct order of magnitude starting points
// so we converge more quickly on the correct values
float m_a = 8;
float m_tu = 0.1f;
uint8_t m_autotuneCounter = 0;
uint8_t m_autotuneCurrentParam = 0;
};
void initElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE); void initElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE);
void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE); void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE);
@ -128,3 +29,24 @@ void onConfigurationChangeElectronicThrottleCallback(engine_configuration_s *pre
void unregisterEtbPins(); void unregisterEtbPins();
void etbAutocal(size_t throttleIndex); void etbAutocal(size_t throttleIndex);
class DcMotor;
struct pid_s;
class ValueProvider3D;
struct pid_state_s;
class IEtbController : public ClosedLoopController<percent_t, percent_t> {
public:
DECLARE_ENGINE_PTR;
// Initialize the throttle.
// returns true if the throttle was initialized, false otherwise.
virtual bool init(etb_function_e function, DcMotor *motor, pid_s *pidParameters, const ValueProvider3D* pedalMap, bool initializeThrottles = true) = 0;
virtual void reset() = 0;
virtual void setIdlePosition(percent_t pos) = 0;
virtual void setWastegatePosition(percent_t pos) = 0;
virtual void update() = 0;
virtual void autoCalibrateTps() = 0;
virtual const pid_state_s* getPidState() const = 0;
};

View File

@ -0,0 +1,97 @@
/**
* @file electronic_throttle_impl.h
*
* @date Dec 7, 2013
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#pragma once
// include the "public" ETB interface
#include "electronic_throttle.h"
#include "sensor.h"
#include "pid.h"
/**
* Hard code ETB update speed.
* Since this is a safety critical system with no real reason for a user to ever need to change the update rate,
* it's locked to 500hz, along with the ADC.
* https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem
*/
#define ETB_LOOP_FREQUENCY 500
#define DEFAULT_ETB_PWM_FREQUENCY 800
class Logging;
class EtbController : public IEtbController {
public:
bool init(etb_function_e function, DcMotor *motor, pid_s *pidParameters, const ValueProvider3D* pedalMap, bool initializeThrottles) override;
void setIdlePosition(percent_t pos) override;
void setWastegatePosition(percent_t pos) override;
void reset() override;
// Update the controller's state: read sensors, send output, etc
void update();
// Called when the configuration may have changed. Controller will
// reset if necessary.
void onConfigurationChange(pid_s* previousConfiguration);
// Print this throttle's status.
void showStatus(Logging* logger);
// Helpers for individual parts of throttle control
expected<percent_t> observePlant() const override;
expected<percent_t> getSetpoint() const override;
expected<percent_t> getSetpointEtb() const;
expected<percent_t> getSetpointWastegate() const;
expected<percent_t> getSetpointIdleValve() const;
expected<percent_t> getOpenLoop(percent_t target) const override;
expected<percent_t> getClosedLoop(percent_t setpoint, percent_t observation) override;
expected<percent_t> getClosedLoopAutotune(percent_t actualThrottlePosition);
void setOutput(expected<percent_t> outputValue) override;
// Used to inspect the internal PID controller's state
const pid_state_s* getPidState() const override { return &m_pid; };
// Use the throttle to automatically calibrate the relevant throttle position sensor(s).
void autoCalibrateTps() override;
protected:
// This is set if an automatic TPS calibration should be run
bool m_isAutocal = false;
etb_function_e getFunction() const { return m_function; }
DcMotor* getMotor() { return m_motor; }
private:
etb_function_e m_function = ETB_None;
SensorType m_positionSensor = SensorType::Invalid;
DcMotor *m_motor = nullptr;
Pid m_pid;
bool m_shouldResetPid = false;
// Pedal -> target map
const ValueProvider3D* m_pedalMap = nullptr;
float m_idlePosition = 0;
float m_wastegatePosition = 0;
// Autotune helpers
bool m_lastIsPositive = false;
efitick_t m_cycleStartTime = 0;
float m_minCycleTps = 0;
float m_maxCycleTps = 0;
// Autotune measured parameters: gain and ultimate period
// These are set to correct order of magnitude starting points
// so we converge more quickly on the correct values
float m_a = 8;
float m_tu = 0.1f;
uint8_t m_autotuneCounter = 0;
uint8_t m_autotuneCurrentParam = 0;
};

View File

@ -9,7 +9,8 @@ struct AirmassResult {
float EngineLoadPercent = 100; float EngineLoadPercent = 100;
}; };
struct AirmassModelBase { class AirmassModelBase {
public:
DECLARE_ENGINE_PTR; DECLARE_ENGINE_PTR;
explicit AirmassModelBase(const ValueProvider3D& veTable); explicit AirmassModelBase(const ValueProvider3D& veTable);

View File

@ -1,7 +1,7 @@
#include "global.h" #include "global.h"
#include "rusefi_enums.h" #include "rusefi_enums.h"
#include "rusefi_hw_enums.h" #include "rusefi_hw_enums.h"
// was generated automatically by rusEfi tool from rusefi_hw_enums.h // was generated automatically by rusEfi tool from rusefi_enums.h // by enum2string.jar tool on Fri Dec 04 00:17:47 EST 2020 // was generated automatically by rusEfi tool from rusefi_hw_enums.h // was generated automatically by rusEfi tool from rusefi_enums.h // by enum2string.jar tool on Sun Dec 06 09:01:41 EST 2020
// see also gen_config_and_enums.bat // see also gen_config_and_enums.bat
@ -72,6 +72,8 @@ case EFI_ADC_9:
return "EFI_ADC_9"; return "EFI_ADC_9";
case EFI_ADC_ERROR: case EFI_ADC_ERROR:
return "EFI_ADC_ERROR"; return "EFI_ADC_ERROR";
case EFI_ADC_LAST_CHANNEL:
return "EFI_ADC_LAST_CHANNEL";
case EFI_ADC_NONE: case EFI_ADC_NONE:
return "EFI_ADC_NONE"; return "EFI_ADC_NONE";
case EFI_ADC_TEMP_SENSOR: case EFI_ADC_TEMP_SENSOR:
@ -775,8 +777,6 @@ case BMW_M73_PROTEUS:
return "BMW_M73_PROTEUS"; return "BMW_M73_PROTEUS";
case CAMARO_4: case CAMARO_4:
return "CAMARO_4"; return "CAMARO_4";
case CHEVY_C20_1973:
return "CHEVY_C20_1973";
case CITROEN_TU3JP: case CITROEN_TU3JP:
return "CITROEN_TU3JP"; return "CITROEN_TU3JP";
case DEFAULT_FRANKENSO: case DEFAULT_FRANKENSO:
@ -863,6 +863,8 @@ case MRE_MIATA_NB2_MAF:
return "MRE_MIATA_NB2_MAF"; return "MRE_MIATA_NB2_MAF";
case MRE_MIATA_NB2_MAP: case MRE_MIATA_NB2_MAP:
return "MRE_MIATA_NB2_MAP"; return "MRE_MIATA_NB2_MAP";
case MRE_SUBARU_EJ18:
return "MRE_SUBARU_EJ18";
case NISSAN_PRIMERA: case NISSAN_PRIMERA:
return "NISSAN_PRIMERA"; return "NISSAN_PRIMERA";
case PROMETHEUS_DEFAULTS: case PROMETHEUS_DEFAULTS:

View File

@ -247,7 +247,8 @@ void StartupFuelPumping::update(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
#endif #endif
void printCurrentState(Logging *logging, int seconds, const char *engineTypeName, const char *firmwareBuildId) { void printCurrentState(Logging *logging, int seconds, const char *engineTypeName, const char *firmwareBuildId) {
logging->appendPrintf("%s%s%d@%s%s %s %d%s", PROTOCOL_VERSION_TAG, DELIMETER, // VersionChecker in rusEFI console is parsing these version string, please follow the expected format
logging->appendPrintf("%s%s%d@%s %s %s %d%s", PROTOCOL_VERSION_TAG, DELIMETER,
getRusEfiVersion(), VCS_VERSION, getRusEfiVersion(), VCS_VERSION,
firmwareBuildId, firmwareBuildId,
engineTypeName, engineTypeName,

View File

@ -884,7 +884,7 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->idleRpmPid.pFactor = 0.05; engineConfiguration->idleRpmPid.pFactor = 0.05;
engineConfiguration->idleRpmPid.iFactor = 0.002; engineConfiguration->idleRpmPid.iFactor = 0.002;
engineConfiguration->idleRpmPid.minValue = 0.1; engineConfiguration->idleRpmPid.minValue = 0;
engineConfiguration->idleRpmPid.maxValue = 99; engineConfiguration->idleRpmPid.maxValue = 99;
engineConfiguration->idlePidDeactivationTpsThreshold = 2; engineConfiguration->idlePidDeactivationTpsThreshold = 2;
@ -1166,7 +1166,6 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb
// todo: is it time to replace MICRO_RUS_EFI, PROTEUS, PROMETHEUS_DEFAULTS with MINIMAL_PINS? maybe rename MINIMAL_PINS to DEFAULT? // todo: is it time to replace MICRO_RUS_EFI, PROTEUS, PROMETHEUS_DEFAULTS with MINIMAL_PINS? maybe rename MINIMAL_PINS to DEFAULT?
case PROTEUS: case PROTEUS:
case PROMETHEUS_DEFAULTS: case PROMETHEUS_DEFAULTS:
case CHEVY_C20_1973:
case ZIL_130: case ZIL_130:
case MINIMAL_PINS: case MINIMAL_PINS:
// all basic settings are already set in prepareVoidConfiguration(), no need to set anything here // all basic settings are already set in prepareVoidConfiguration(), no need to set anything here
@ -1184,6 +1183,9 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb
case TEST_ENGINE: case TEST_ENGINE:
setTestEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); setTestEngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
break; break;
case MRE_SUBARU_EJ18:
setSubaruEJ18_MRE(PASS_CONFIG_PARAMETER_SIGNATURE);
break;
#if EFI_UNIT_TEST #if EFI_UNIT_TEST
case TEST_ISSUE_366_BOTH: case TEST_ISSUE_366_BOTH:
setTestEngineIssue366both(PASS_CONFIG_PARAMETER_SIGNATURE); setTestEngineIssue366both(PASS_CONFIG_PARAMETER_SIGNATURE);

View File

@ -122,7 +122,7 @@ typedef enum {
UNUSED_36 = 36, UNUSED_36 = 36,
CHEVY_C20_1973 = 37, MRE_SUBARU_EJ18 = ET_MRE_SUBARU_EJ18,
TOYOTA_JZS147 = 38, // 2JZ-GTE NON VVTi TOYOTA_JZS147 = 38, // 2JZ-GTE NON VVTi

View File

@ -270,8 +270,7 @@ typedef enum __attribute__ ((__packed__)) {
EFI_ADC_TEMP_SENSOR = 17, // Internal temp sensor EFI_ADC_TEMP_SENSOR = 17, // Internal temp sensor
EFI_ADC_LAST_CHANNEL = 18, // Please keep this in sync with the last valid channel index!
EFI_ADC_ERROR = 50, EFI_ADC_ERROR = 50,
} adc_channel_e; } adc_channel_e;
/* Plase keep updating this define */
#define EFI_ADC_LAST EFI_ADC_TEMP_SENSOR

View File

@ -20,12 +20,12 @@ ButtonShiftController::ButtonShiftController() :
} }
void ButtonShiftController::init (DECLARE_ENGINE_PARAMETER_SIGNATURE) { void ButtonShiftController::init(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// 500 millisecond is maybe a little long? // 500 millisecond is maybe a little long?
debounceUp.init(500, CONFIG(tcuUpshiftButtonPin), CONFIG(tcuUpshiftButtonPinMode)); debounceUp.init(500, CONFIG(tcuUpshiftButtonPin), CONFIG(tcuUpshiftButtonPinMode));
debounceDown.init(500, CONFIG(tcuDownshiftButtonPin), CONFIG(tcuDownshiftButtonPinMode)); debounceDown.init(500, CONFIG(tcuDownshiftButtonPin), CONFIG(tcuDownshiftButtonPinMode));
INJECT_ENGINE_REFERENCE(&transmissionController);
transmissionController.init(); GearControllerBase::init(PASS_ENGINE_PARAMETER_SIGNATURE);
} }
void ButtonShiftController::update() { void ButtonShiftController::update() {
@ -77,11 +77,8 @@ void ButtonShiftController::update() {
break; break;
} }
} }
// We are responsible for telling the transmission controller
// what gear we want. GearControllerBase::update();
transmissionController.update(getDesiredGear());
// Post state to TS
postState();
} }

View File

@ -14,9 +14,9 @@
class ButtonShiftController: public GearControllerBase { class ButtonShiftController: public GearControllerBase {
public: public:
ButtonShiftController(); ButtonShiftController();
DECLARE_ENGINE_PTR;
void update(); void update() override;
void init(DECLARE_ENGINE_PARAMETER_SIGNATURE); void init(DECLARE_ENGINE_PARAMETER_SIGNATURE) override;
private: private:
ButtonDebounce debounceUp; ButtonDebounce debounceUp;
ButtonDebounce debounceDown; ButtonDebounce debounceDown;

View File

@ -141,7 +141,7 @@ FsioValue getEngineValue(le_action_e action DECLARE_ENGINE_PARAMETER_SUFFIX) {
return engine->triggerCentral.getVVTPosition(); return engine->triggerCentral.getVVTPosition();
#endif #endif
case LE_METHOD_TIME_SINCE_TRIGGER_EVENT: case LE_METHOD_TIME_SINCE_TRIGGER_EVENT:
return engine->triggerCentral.getTimeSinceTriggerEvent(); return engine->triggerCentral.getTimeSinceTriggerEvent(getTimeNowNt());
case LE_METHOD_TIME_SINCE_BOOT: case LE_METHOD_TIME_SINCE_BOOT:
#if EFI_MAIN_RELAY_CONTROL #if EFI_MAIN_RELAY_CONTROL
// in main relay control mode, we return the number of seconds since the ignition is turned on // in main relay control mode, we return the number of seconds since the ignition is turned on

View File

@ -1,2 +1,2 @@
#pragma once #pragma once
#define VCS_DATE 20201205 #define VCS_DATE 20201209

View File

@ -37,7 +37,7 @@ static void plainPinTurnOff(RegisteredNamedOutputPin *output) {
void hpfpPlainPinTurnOn(HpfpActor *current); void hpfpPlainPinTurnOn(HpfpActor *current);
static void handle(HpfpActor *actor) { static void scheduleNextCycle(HpfpActor *actor) {
#if EFI_UNIT_TEST #if EFI_UNIT_TEST
Engine *engine = actor->engine; Engine *engine = actor->engine;
EXPAND_Engine; EXPAND_Engine;
@ -64,7 +64,7 @@ void hpfpPlainPinTurnOn(HpfpActor *current) {
if (highPressureKpa < BAR2KPA(50)) { if (highPressureKpa < BAR2KPA(50)) {
output->setHigh(); output->setHigh();
} }
handle(current); scheduleNextCycle(current);
} }
void initHPFP(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void initHPFP(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
@ -77,7 +77,7 @@ void initHPFP(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
INJECT_ENGINE_REFERENCE(actor); INJECT_ENGINE_REFERENCE(actor);
actor->extra = 720 / LOBE_COUNT * i; actor->extra = 720 / LOBE_COUNT * i;
handle(actor); scheduleNextCycle(actor);
} }
} }

View File

@ -132,8 +132,10 @@ bool RpmCalculator::checkIfSpinning(efitick_t nowNt) const {
void RpmCalculator::assignRpmValue(float floatRpmValue) { void RpmCalculator::assignRpmValue(float floatRpmValue) {
previousRpmValue = rpmValue; previousRpmValue = rpmValue;
// we still persist integer RPM! todo: figure out the next steps
rpmValue = floatRpmValue; // Round to the nearest integer RPM - some other parts of the ECU expect integer, so that's what we hand out.
// TODO: RPM should eventually switch to floating point across the ECU
rpmValue = efiRound(floatRpmValue, 1);
if (rpmValue <= 0) { if (rpmValue <= 0) {
oneDegreeUs = NAN; oneDegreeUs = NAN;
@ -286,10 +288,10 @@ void rpmShaftPositionCallback(trigger_event_e ckpSignalType,
// Replace 'normal' RPM with instant RPM for the initial spin-up period // Replace 'normal' RPM with instant RPM for the initial spin-up period
engine->triggerCentral.triggerState.movePreSynchTimestamps(PASS_ENGINE_PARAMETER_SIGNATURE); engine->triggerCentral.triggerState.movePreSynchTimestamps(PASS_ENGINE_PARAMETER_SIGNATURE);
int prevIndex; int prevIndex;
int instantRpm = engine->triggerCentral.triggerState.calculateInstantRpm(&engine->triggerCentral.triggerFormDetails, float instantRpm = engine->triggerCentral.triggerState.calculateInstantRpm(&engine->triggerCentral.triggerFormDetails,
&prevIndex, nowNt PASS_ENGINE_PARAMETER_SUFFIX); &prevIndex, nowNt PASS_ENGINE_PARAMETER_SUFFIX);
// validate instant RPM - we shouldn't skip the cranking state // validate instant RPM - we shouldn't skip the cranking state
instantRpm = minI(instantRpm, CONFIG(cranking.rpm) - 1); instantRpm = minF(instantRpm, CONFIG(cranking.rpm) - 1);
rpmState->assignRpmValue(instantRpm); rpmState->assignRpmValue(instantRpm);
#if 0 #if 0
scheduleMsg(logger, "** RPM: idx=%d sig=%d iRPM=%d", index, ckpSignalType, instantRpm); scheduleMsg(logger, "** RPM: idx=%d sig=%d iRPM=%d", index, ckpSignalType, instantRpm);

View File

@ -38,7 +38,7 @@ void tachSignalCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// How many tach pulse periods do we have? // How many tach pulse periods do we have?
int periods = CONFIG(tachPulsePerRev); int periods = CONFIG(tachPulsePerRev);
if (periods == 0 || periods > 10){ if (periods == 0 || periods > 10) {
firmwareError(CUSTOM_ERR_6709, "Invalid tachometer pulse per rev: %d", periods); firmwareError(CUSTOM_ERR_6709, "Invalid tachometer pulse per rev: %d", periods);
return; return;
} }

View File

@ -1,13 +1,16 @@
#include "gear_controller.h" #include "gear_controller.h"
#include "tunerstudio_outputs.h" #include "tunerstudio_outputs.h"
void GearControllerBase::init() { void GearControllerBase::init(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
INJECT_ENGINE_REFERENCE(&transmissionController); INJECT_ENGINE_REFERENCE(&transmissionController);
transmissionController.init(); transmissionController.init();
} }
void GearControllerBase::update() { void GearControllerBase::update() {
// We are responsible for telling the transmission controller
// what gear we want.
transmissionController.update(getDesiredGear()); transmissionController.update(getDesiredGear());
// Post state to TS
postState(); postState();
} }

View File

@ -13,11 +13,13 @@ public:
virtual void update(); virtual void update();
gear_e getDesiredGear() const; gear_e getDesiredGear() const;
virtual void init(); virtual void init(DECLARE_ENGINE_PARAMETER_SIGNATURE);
private: private:
gear_e desiredGear = NEUTRAL; gear_e desiredGear = NEUTRAL;
protected: protected:
gear_e setDesiredGear(gear_e); gear_e setDesiredGear(gear_e);
private:
void postState(); void postState();
SimpleTransmissionController transmissionController; SimpleTransmissionController transmissionController;
}; };

View File

@ -1,4 +1,4 @@
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Dec 04 16:38:29 UTC 2020 // this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Dec 09 02:10:15 UTC 2020
// by class com.rusefi.output.CHeaderConsumer // by class com.rusefi.output.CHeaderConsumer
// begin // begin
#pragma once #pragma once
@ -689,7 +689,7 @@ struct engine_configuration_s {
offset 76 bit 12 */ offset 76 bit 12 */
bool etb_use_two_wires : 1; bool etb_use_two_wires : 1;
/** /**
* Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position. * Subaru/BMW style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position.
offset 76 bit 13 */ offset 76 bit 13 */
bool isDoubleSolenoidIdle : 1; bool isDoubleSolenoidIdle : 1;
/** /**
@ -3473,14 +3473,18 @@ struct engine_configuration_s {
*/ */
pin_output_mode_e tcu_solenoid_mode[TCU_SOLENOID_COUNT]; pin_output_mode_e tcu_solenoid_mode[TCU_SOLENOID_COUNT];
/** /**
* need 4 byte alignment
* offset 4523 * offset 4523
*/ */
uint8_t alignmentFill_at_4523; int8_t knockBaseNoise[IGN_RPM_COUNT];
/** /**
* offset 4524 * need 4 byte alignment
* offset 4539
*/ */
int mainUnusedEnd[369]; uint8_t alignmentFill_at_4539;
/**
* offset 4540
*/
int mainUnusedEnd[365];
/** total size 6000*/ /** total size 6000*/
}; };
@ -3778,4 +3782,4 @@ struct persistent_config_s {
typedef struct persistent_config_s persistent_config_s; typedef struct persistent_config_s persistent_config_s;
// end // end
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Dec 04 16:38:29 UTC 2020 // this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Dec 09 02:10:15 UTC 2020

View File

@ -1,4 +1,4 @@
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Dec 04 16:38:29 UTC 2020 // this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Dec 09 02:10:15 UTC 2020
// by class com.rusefi.output.FileFsioSettingsConsumer // by class com.rusefi.output.FileFsioSettingsConsumer
FSIO_SETTING_FANONTEMPERATURE = 1000, FSIO_SETTING_FANONTEMPERATURE = 1000,

View File

@ -1,4 +1,4 @@
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Dec 04 16:38:29 UTC 2020 // this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Dec 09 02:10:15 UTC 2020
// by class com.rusefi.output.FileFsioSettingsConsumer // by class com.rusefi.output.FileFsioSettingsConsumer
case FSIO_SETTING_FANONTEMPERATURE: case FSIO_SETTING_FANONTEMPERATURE:

View File

@ -1,4 +1,4 @@
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Dec 04 16:38:29 UTC 2020 // this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Dec 09 02:10:15 UTC 2020
// by class com.rusefi.output.FileFsioSettingsConsumer // by class com.rusefi.output.FileFsioSettingsConsumer
static LENameOrdinalPair lefanOnTemperature(FSIO_SETTING_FANONTEMPERATURE, "cfg_fanOnTemperature"); static LENameOrdinalPair lefanOnTemperature(FSIO_SETTING_FANONTEMPERATURE, "cfg_fanOnTemperature");

View File

@ -1,4 +1,4 @@
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Dec 04 16:38:29 UTC 2020 // this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Dec 09 02:10:15 UTC 2020
// by class com.rusefi.output.FileFsioSettingsConsumer // by class com.rusefi.output.FileFsioSettingsConsumer
case FSIO_SETTING_FANONTEMPERATURE: case FSIO_SETTING_FANONTEMPERATURE:

View File

@ -47,7 +47,7 @@
#define air_pressure_sensor_type_e_auto_enum "MT_CUSTOM", "MT_DENSO183", "MT_MPX4250", "MT_HONDA3BAR", "MT_DODGE_NEON_2003", "MT_SUBY_DENSO", "MT_GM_3_BAR", "MT_MPX4100", "MT_TOYOTA_89420_02010", "MT_MPX4250A", "MT_BOSCH_2_5", "MT_MAZDA_1_BAR" #define air_pressure_sensor_type_e_auto_enum "MT_CUSTOM", "MT_DENSO183", "MT_MPX4250", "MT_HONDA3BAR", "MT_DODGE_NEON_2003", "MT_SUBY_DENSO", "MT_GM_3_BAR", "MT_MPX4100", "MT_TOYOTA_89420_02010", "MT_MPX4250A", "MT_BOSCH_2_5", "MT_MAZDA_1_BAR"
#define alignEngineSnifferAtTDC_offset 744 #define alignEngineSnifferAtTDC_offset 744
#define alignmentFill_at_2227_offset 2227 #define alignmentFill_at_2227_offset 2227
#define alignmentFill_at_4523_offset 4523 #define alignmentFill_at_4539_offset 4539
#define alternator_antiwindupFreq_offset 1764 #define alternator_antiwindupFreq_offset 1764
#define alternator_derivativeFilterLoss_offset 1760 #define alternator_derivativeFilterLoss_offset 1760
#define alternatorControl_dFactor_offset 1724 #define alternatorControl_dFactor_offset 1724
@ -240,6 +240,8 @@
#define clutchDownPinMode_offset 667 #define clutchDownPinMode_offset 667
#define clutchUpPin_offset 969 #define clutchUpPin_offset 969
#define clutchUpPinMode_offset 971 #define clutchUpPinMode_offset 971
#define CMD_ALTERNATOR_PIN "set_alternator_pin"
#define CMD_BOOST_PIN "set_boost_pin"
#define CMD_CALIBRATE_PEDAL_DOWN "calibrate_pedal_down" #define CMD_CALIBRATE_PEDAL_DOWN "calibrate_pedal_down"
#define CMD_CALIBRATE_PEDAL_UP "calibrate_pedal_up" #define CMD_CALIBRATE_PEDAL_UP "calibrate_pedal_up"
#define CMD_DATE "date" #define CMD_DATE "date"
@ -251,8 +253,12 @@
#define CMD_FUEL_BENCH "fuelbench" #define CMD_FUEL_BENCH "fuelbench"
#define CMD_FUNCTIONAL_TEST_MODE "test_mode" #define CMD_FUNCTIONAL_TEST_MODE "test_mode"
#define CMD_HPFP_BENCH "hpfpbench" #define CMD_HPFP_BENCH "hpfpbench"
#define CMD_IDLE_PIN "set_idle_pin"
#define CMD_IGNITION "ignition" #define CMD_IGNITION "ignition"
#define CMD_IGNITION_PIN "set_ignition_pin"
#define CMD_INJECTION "injection" #define CMD_INJECTION "injection"
#define CMD_INJECTION_PIN "set_injection_pin"
#define CMD_LOGIC_PIN "set_logic_input_pin"
#define CMD_MIL_BENCH "milbench" #define CMD_MIL_BENCH "milbench"
#define CMD_PINS "pins" #define CMD_PINS "pins"
#define CMD_PWM "pwm" #define CMD_PWM "pwm"
@ -264,6 +270,7 @@
#define CMD_STARTER_BENCH "starterbench" #define CMD_STARTER_BENCH "starterbench"
#define CMD_TRIGGER_HW_INPUT "trigger_hw_input" #define CMD_TRIGGER_HW_INPUT "trigger_hw_input"
#define CMD_TRIGGER_PIN "set_trigger_input_pin" #define CMD_TRIGGER_PIN "set_trigger_input_pin"
#define CMD_TRIGGER_SIMULATOR_PIN "set_trigger_simulator_pin"
#define CMD_TRIGGERINFO "triggerinfo" #define CMD_TRIGGERINFO "triggerinfo"
#define CMD_TS_BENCH_AC_COMPRESSOR_RELAY 6 #define CMD_TS_BENCH_AC_COMPRESSOR_RELAY 6
#define CMD_TS_BENCH_AC_FAN_RELAY 5 #define CMD_TS_BENCH_AC_FAN_RELAY 5
@ -373,7 +380,7 @@
#define ENGINE_MAKE_VAG "VAG" #define ENGINE_MAKE_VAG "VAG"
#define ENGINE_NOISE_CURVE_SIZE 8 #define ENGINE_NOISE_CURVE_SIZE 8
#define ENGINE_SNIFFER_UNIT_US 10 #define ENGINE_SNIFFER_UNIT_US 10
#define engine_type_e_auto_enum "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "CHEVY_C20_1973", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE" #define engine_type_e_auto_enum "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "MRE_SUBARU_EJ18", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE"
#define engineChartSize_offset 1480 #define engineChartSize_offset 1480
#define engineCode_offset 1128 #define engineCode_offset 1128
#define engineConfiguration_offset 0 #define engineConfiguration_offset 0
@ -411,6 +418,7 @@
#define ET_MRE_MIATA_NB2_MAP 11 #define ET_MRE_MIATA_NB2_MAP 11
#define ET_MRE_NEW_TEST_BOARD 31 #define ET_MRE_NEW_TEST_BOARD 31
#define ET_MRE_OLD_TEST_BOARD 30 #define ET_MRE_OLD_TEST_BOARD 30
#define ET_MRE_SUBARU_EJ18 37
#define ET_ROVER_V8 10 #define ET_ROVER_V8 10
#define ET_SACHS 29 #define ET_SACHS 29
#define ET_VW_ABA 32 #define ET_VW_ABA 32
@ -973,6 +981,7 @@
#define knockBankCyl7_offset 976 #define knockBankCyl7_offset 976
#define knockBankCyl8_offset 976 #define knockBankCyl8_offset 976
#define knockBankCyl9_offset 976 #define knockBankCyl9_offset 976
#define knockBaseNoise_offset 4523
#define knockDetectionWindowEnd_offset 1504 #define knockDetectionWindowEnd_offset 1504
#define knockDetectionWindowStart_offset 1500 #define knockDetectionWindowStart_offset 1500
#define knockNoise_offset 1820 #define knockNoise_offset 1820
@ -1038,7 +1047,7 @@
#define mafSensorType_offset 948 #define mafSensorType_offset 948
#define mainRelayPin_offset 706 #define mainRelayPin_offset 706
#define mainRelayPinMode_offset 752 #define mainRelayPinMode_offset 752
#define mainUnusedEnd_offset 4524 #define mainUnusedEnd_offset 4540
#define malfunctionIndicatorPin_offset 660 #define malfunctionIndicatorPin_offset 660
#define malfunctionIndicatorPinMode_offset 661 #define malfunctionIndicatorPinMode_offset 661
#define manIdlePosition_offset 608 #define manIdlePosition_offset 608
@ -1212,8 +1221,8 @@
#define showHumanReadableWarning_offset 976 #define showHumanReadableWarning_offset 976
#define showSdCardWarning_offset 76 #define showSdCardWarning_offset 76
#define SIGNATURE_BOARD all #define SIGNATURE_BOARD all
#define SIGNATURE_DATE 2020.12.04 #define SIGNATURE_DATE 2020.12.09
#define SIGNATURE_HASH 768848914 #define SIGNATURE_HASH 1456336785
#define silentTriggerError_offset 1464 #define silentTriggerError_offset 1464
#define slowAdcAlpha_offset 2088 #define slowAdcAlpha_offset 2088
#define sparkDwellRpmBins_offset 332 #define sparkDwellRpmBins_offset 332
@ -1543,7 +1552,7 @@
#define ts_show_spi true #define ts_show_spi true
#define ts_show_trigger_comparator false #define ts_show_trigger_comparator false
#define ts_show_tunerstudio_port true #define ts_show_tunerstudio_port true
#define TS_SIGNATURE "rusEFI 2020.12.04.all.768848914" #define TS_SIGNATURE "rusEFI 2020.12.09.all.1456336785"
#define TS_SINGLE_WRITE_COMMAND 'W' #define TS_SINGLE_WRITE_COMMAND 'W'
#define TS_SINGLE_WRITE_COMMAND_char W #define TS_SINGLE_WRITE_COMMAND_char W
#define TS_TEST_COMMAND 't' // 0x74 #define TS_TEST_COMMAND 't' // 0x74
@ -1552,6 +1561,7 @@
#define TT_TT_2JZ_3_34 25 #define TT_TT_2JZ_3_34 25
#define TT_TT_36_2_2_2 23 #define TT_TT_36_2_2_2 23
#define TT_TT_3_1_CAM 31 #define TT_TT_3_1_CAM 31
#define TT_TT_51 51
#define TT_TT_60_2_VW 20 #define TT_TT_60_2_VW 20
#define TT_TT_CHRYSLER_NGC_36_2_2 30 #define TT_TT_CHRYSLER_NGC_36_2_2 30
#define TT_TT_DAIHATSU 6 #define TT_TT_DAIHATSU 6

View File

@ -3,6 +3,6 @@
// //
#define SIGNATURE_BOARD all #define SIGNATURE_BOARD all
#define SIGNATURE_DATE 2020.12.04 #define SIGNATURE_DATE 2020.12.09
#define SIGNATURE_HASH 768848914 #define SIGNATURE_HASH 1456336785
#define TS_SIGNATURE "rusEFI 2020.12.04.all.768848914" #define TS_SIGNATURE "rusEFI 2020.12.09.all.1456336785"

View File

@ -3,6 +3,6 @@
// //
#define SIGNATURE_BOARD frankenso_na6 #define SIGNATURE_BOARD frankenso_na6
#define SIGNATURE_DATE 2020.12.04 #define SIGNATURE_DATE 2020.12.09
#define SIGNATURE_HASH 3148023273 #define SIGNATURE_HASH 3233635946
#define TS_SIGNATURE "rusEFI 2020.12.04.frankenso_na6.3148023273" #define TS_SIGNATURE "rusEFI 2020.12.09.frankenso_na6.3233635946"

View File

@ -3,6 +3,6 @@
// //
#define SIGNATURE_BOARD hellen_cypress #define SIGNATURE_BOARD hellen_cypress
#define SIGNATURE_DATE 2020.12.04 #define SIGNATURE_DATE 2020.12.09
#define SIGNATURE_HASH 3827438289 #define SIGNATURE_HASH 2671528274
#define TS_SIGNATURE "rusEFI 2020.12.04.hellen_cypress.3827438289" #define TS_SIGNATURE "rusEFI 2020.12.09.hellen_cypress.2671528274"

View File

@ -3,6 +3,6 @@
// //
#define SIGNATURE_BOARD kin #define SIGNATURE_BOARD kin
#define SIGNATURE_DATE 2020.12.04 #define SIGNATURE_DATE 2020.12.09
#define SIGNATURE_HASH 3040749611 #define SIGNATURE_HASH 3458233256
#define TS_SIGNATURE "rusEFI 2020.12.04.kin.3040749611" #define TS_SIGNATURE "rusEFI 2020.12.09.kin.3458233256"

View File

@ -3,6 +3,6 @@
// //
#define SIGNATURE_BOARD mre_f4 #define SIGNATURE_BOARD mre_f4
#define SIGNATURE_DATE 2020.12.04 #define SIGNATURE_DATE 2020.12.09
#define SIGNATURE_HASH 973302379 #define SIGNATURE_HASH 1092432360
#define TS_SIGNATURE "rusEFI 2020.12.04.mre_f4.973302379" #define TS_SIGNATURE "rusEFI 2020.12.09.mre_f4.1092432360"

View File

@ -3,6 +3,6 @@
// //
#define SIGNATURE_BOARD mre_f7 #define SIGNATURE_BOARD mre_f7
#define SIGNATURE_DATE 2020.12.04 #define SIGNATURE_DATE 2020.12.09
#define SIGNATURE_HASH 973302379 #define SIGNATURE_HASH 1092432360
#define TS_SIGNATURE "rusEFI 2020.12.04.mre_f7.973302379" #define TS_SIGNATURE "rusEFI 2020.12.09.mre_f7.1092432360"

View File

@ -3,6 +3,6 @@
// //
#define SIGNATURE_BOARD prometheus_405 #define SIGNATURE_BOARD prometheus_405
#define SIGNATURE_DATE 2020.12.04 #define SIGNATURE_DATE 2020.12.09
#define SIGNATURE_HASH 1863037507 #define SIGNATURE_HASH 336980416
#define TS_SIGNATURE "rusEFI 2020.12.04.prometheus_405.1863037507" #define TS_SIGNATURE "rusEFI 2020.12.09.prometheus_405.336980416"

View File

@ -3,6 +3,6 @@
// //
#define SIGNATURE_BOARD prometheus_469 #define SIGNATURE_BOARD prometheus_469
#define SIGNATURE_DATE 2020.12.04 #define SIGNATURE_DATE 2020.12.09
#define SIGNATURE_HASH 1863037507 #define SIGNATURE_HASH 336980416
#define TS_SIGNATURE "rusEFI 2020.12.04.prometheus_469.1863037507" #define TS_SIGNATURE "rusEFI 2020.12.09.prometheus_469.336980416"

View File

@ -3,6 +3,6 @@
// //
#define SIGNATURE_BOARD proteus_f4 #define SIGNATURE_BOARD proteus_f4
#define SIGNATURE_DATE 2020.12.04 #define SIGNATURE_DATE 2020.12.09
#define SIGNATURE_HASH 3833200332 #define SIGNATURE_HASH 2674369871
#define TS_SIGNATURE "rusEFI 2020.12.04.proteus_f4.3833200332" #define TS_SIGNATURE "rusEFI 2020.12.09.proteus_f4.2674369871"

View File

@ -3,6 +3,6 @@
// //
#define SIGNATURE_BOARD proteus_f7 #define SIGNATURE_BOARD proteus_f7
#define SIGNATURE_DATE 2020.12.04 #define SIGNATURE_DATE 2020.12.09
#define SIGNATURE_HASH 3833200332 #define SIGNATURE_HASH 2674369871
#define TS_SIGNATURE "rusEFI 2020.12.04.proteus_f7.3833200332" #define TS_SIGNATURE "rusEFI 2020.12.09.proteus_f7.2674369871"

View File

@ -12,6 +12,10 @@ public:
void showInfo(Logging* logger, float testRawValue) const override; void showInfo(Logging* logger, float testRawValue) const override;
float getDivideInput() const {
return m_divideInput;
}
private: private:
// Linear equation parameters for equation of form // Linear equation parameters for equation of form
// y = ax + b // y = ax + b

View File

@ -15,6 +15,11 @@ public:
SensorResult get() const override; SensorResult get() const override;
bool isRedundant() const override {
// This sensor is redundant when not ignoring the second channel
return !m_ignoreSecond;
}
void showInfo(Logging* logger, const char* sensorName) const override; void showInfo(Logging* logger, const char* sensorName) const override;
private: private:

View File

@ -3,51 +3,6 @@
#include "efilib.h" #include "efilib.h"
#include "loggingcentral.h" #include "loggingcentral.h"
// This struct represents one sensor in the registry.
// It stores whether the sensor should use a mock value,
// the value to use, and if not a pointer to the sensor that
// can provide a real value.
class SensorRegistryEntry {
public:
Sensor *getSensor() {
return sensor;
}
void setSensor(Sensor * sensor) {
this->sensor = sensor;
}
bool isMock() {
return useMock;
}
void setMockValue(float value) {
mockValue = value;
useMock = true;
}
float getMockValue() {
return mockValue;
}
void resetMock() {
useMock = false;
mockValue = 0.0f;
}
void reset() {
sensor = nullptr;
resetMock();
}
private:
bool useMock = false;
float mockValue;
Sensor *sensor = nullptr;
};
static SensorRegistryEntry s_sensorRegistry[static_cast<size_t>(SensorType::PlaceholderLast)] = {};
static const char* s_sensorNames[] = { static const char* s_sensorNames[] = {
"Invalid", "Invalid",
"CLT", "CLT",
@ -85,24 +40,118 @@ static const char* s_sensorNames[] = {
"Idle Valve Position", "Idle Valve Position",
}; };
// This struct represents one sensor in the registry.
// It stores whether the sensor should use a mock value,
// the value to use, and if not a pointer to the sensor that
// can provide a real value.
class SensorRegistryEntry {
public:
const Sensor* getSensor() {
return m_sensor;
}
void setMockValue(float value, bool mockRedundant) {
m_mockValue = value;
m_useMock = true;
m_mockRedundant = mockRedundant;
}
void resetMock() {
m_useMock = false;
m_mockValue = 0.0f;
}
void reset() {
m_sensor = nullptr;
resetMock();
}
bool Register(Sensor* sensor) {
// If there's somebody already here - a consumer tried to double-register a sensor
if (m_sensor) {
// This sensor has already been registered. Don't re-register it.
firmwareError(CUSTOM_OBD_26, "Duplicate registration for sensor \"%s\"", sensor->getSensorName());
return false;
} else {
// Put the sensor in the registry
m_sensor = sensor;
return true;
}
}
SensorResult get() const {
// Check if mock
if (m_useMock) {
return m_mockValue;
}
// Get the sensor out of the entry
const Sensor *s = m_sensor;
if (s) {
// If we found the sensor, ask it for a result.
return s->get();
}
// We've exhausted all valid ways to return something - sensor not found.
return unexpected;
}
void showInfo(Logging* logger, const char* sensorName) const {
if (m_useMock) {
scheduleMsg(logger, "Sensor \"%s\" mocked with value %.2f", sensorName, m_mockValue);
} else {
const auto sensor = m_sensor;
if (sensor) {
sensor->showInfo(logger, sensorName);
} else {
scheduleMsg(logger, "Sensor \"%s\" is not configured.", sensorName);
}
}
}
bool hasSensor() const {
return m_useMock || m_sensor;
}
float getRaw() const {
const auto sensor = m_sensor;
if (sensor) {
return sensor->getRaw();
}
// We've exhausted all valid ways to return something - sensor not found.
return 0;
}
bool isRedundant() const {
const auto sensor = m_sensor;
if (sensor) {
return sensor->isRedundant();
}
if (m_useMock) {
return m_mockRedundant;
}
return false;
}
private:
bool m_useMock = false;
bool m_mockRedundant = false;
float m_mockValue;
Sensor* m_sensor = nullptr;
};
static SensorRegistryEntry s_sensorRegistry[static_cast<size_t>(SensorType::PlaceholderLast)] = {};
static_assert(efi::size(s_sensorNames) == efi::size(s_sensorRegistry)); static_assert(efi::size(s_sensorNames) == efi::size(s_sensorRegistry));
bool Sensor::Register() { bool Sensor::Register() {
// Get a ref to where we should be return s_sensorRegistry[getIndex()].Register(this);
auto &entry = s_sensorRegistry[getIndex()];
// If there's somebody already here - a consumer tried to double-register a sensor
if (entry.getSensor()) {
// This sensor has already been registered. Don't re-register it.
#if ! EFI_UNIT_TEST
firmwareError(CUSTOM_OBD_26, "Duplicate registration for %s sensor", s_sensorNames[getIndex()]);
#endif
return false;
} else {
// put ourselves in the registry
entry.setSensor(this);
return true;
}
} }
/*static*/ void Sensor::resetRegistry() { /*static*/ void Sensor::resetRegistry() {
@ -137,54 +186,32 @@ bool Sensor::Register() {
return unexpected; return unexpected;
} }
// Next check for mock return entry->get();
if (entry->isMock()) {
return entry->getMockValue();
}
// Get the sensor out of the entry
const Sensor *s = entry->getSensor();
if (s) {
// If we found the sensor, ask it for a result.
return s->get();
}
// We've exhausted all valid ways to return something - sensor not found.
return unexpected;
} }
/*static*/ float Sensor::getRaw(SensorType type) { /*static*/ float Sensor::getRaw(SensorType type) {
const auto entry = getEntryForType(type); const auto entry = getEntryForType(type);
// Check if this is a valid sensor entry return entry ? entry->getRaw() : 0;
if (!entry) { }
return 0;
}
const auto s = entry->getSensor(); /*static*/ bool Sensor::isRedundant(SensorType type) {
if (s) { const auto entry = getEntryForType(type);
return s->getRaw();
}
// We've exhausted all valid ways to return something - sensor not found. return entry ? entry->isRedundant() : false;
return 0;
} }
/*static*/ bool Sensor::hasSensor(SensorType type) { /*static*/ bool Sensor::hasSensor(SensorType type) {
const auto entry = getEntryForType(type); const auto entry = getEntryForType(type);
if (!entry) { return entry ? entry->hasSensor() : false;
return false;
}
return entry->isMock() || entry->getSensor();
} }
/*static*/ void Sensor::setMockValue(SensorType type, float value) { /*static*/ void Sensor::setMockValue(SensorType type, float value, bool mockRedundant) {
auto entry = getEntryForType(type); auto entry = getEntryForType(type);
if (entry) { if (entry) {
entry->setMockValue(value); entry->setMockValue(value, mockRedundant);
} }
} }
@ -208,9 +235,7 @@ bool Sensor::Register() {
/*static*/ void Sensor::resetAllMocks() { /*static*/ void Sensor::resetAllMocks() {
// Reset all mocks // Reset all mocks
for (size_t i = 0; i < efi::size(s_sensorRegistry); i++) { for (size_t i = 0; i < efi::size(s_sensorRegistry); i++) {
auto &entry = s_sensorRegistry[i]; s_sensorRegistry[i].resetMock();
entry.resetMock();
} }
} }
@ -224,16 +249,15 @@ bool Sensor::Register() {
auto& entry = s_sensorRegistry[i]; auto& entry = s_sensorRegistry[i];
const char* name = s_sensorNames[i]; const char* name = s_sensorNames[i];
if (entry.isMock()) { entry.showInfo(logger, name);
scheduleMsg(logger, "Sensor \"%s\" mocked with value %.2f", name, entry.getMockValue()); }
} else { }
const auto sensor = entry.getSensor();
// Print information about a particular sensor
if (sensor) { /*static*/ void Sensor::showInfo(Logging* logger, SensorType type) {
sensor->showInfo(logger, name); auto entry = getEntryForType(type);
} else {
scheduleMsg(logger, "Sensor \"%s\" is not configured.", name); if (entry) {
} entry->showInfo(logger, getSensorName(type));
}
} }
} }

View File

@ -71,6 +71,9 @@ public:
// Print information about all sensors // Print information about all sensors
static void showAllSensorInfo(Logging* logger); static void showAllSensorInfo(Logging* logger);
// Print information about a particular sensor
static void showInfo(Logging* logger, SensorType type);
// Remove all sensors from the sensor registry - tread carefully if you use this outside of a unit test // Remove all sensors from the sensor registry - tread carefully if you use this outside of a unit test
static void resetRegistry(); static void resetRegistry();
@ -89,6 +92,11 @@ public:
*/ */
static float getRaw(SensorType type); static float getRaw(SensorType type);
/*
* Get whether a sensor is redundant (a composite of multiple other sensors that can check consistency between them)
*/
static bool isRedundant(SensorType type);
/* /*
* Query whether there is a sensor of a particular type currently registered. * Query whether there is a sensor of a particular type currently registered.
*/ */
@ -97,7 +105,7 @@ public:
/* /*
* Mock a value for a particular sensor. * Mock a value for a particular sensor.
*/ */
static void setMockValue(SensorType type, float value); static void setMockValue(SensorType type, float value, bool mockRedundant = false);
/* /*
* Mock a value for a particular sensor. * Mock a value for a particular sensor.
@ -119,6 +127,7 @@ public:
* For example, CLT, IAT, Throttle Position 2, etc. * For example, CLT, IAT, Throttle Position 2, etc.
*/ */
const char* getSensorName() { return getSensorName(m_type); } const char* getSensorName() { return getSensorName(m_type); }
static const char* getSensorName(SensorType type);
// Retrieve the current reading from the sensor. // Retrieve the current reading from the sensor.
// //
@ -127,15 +136,6 @@ public:
// this should be field lookup and simple math. // this should be field lookup and simple math.
virtual SensorResult get() const = 0; virtual SensorResult get() const = 0;
protected:
// Protected constructor - only subclasses call this
explicit Sensor(SensorType type)
: m_type(type) {}
static const char* getSensorName(SensorType type);
private:
/* /*
* Get an unconverted value from the sensor, if available. * Get an unconverted value from the sensor, if available.
*/ */
@ -143,6 +143,20 @@ private:
return 0; return 0;
} }
/*
* Get whether this sensor is redundant (backed by multiple other sensors)
*/
virtual bool isRedundant() const {
// By default sensors are not redundant
return false;
}
protected:
// Protected constructor - only subclasses call this
explicit Sensor(SensorType type)
: m_type(type) {}
private:
const SensorType m_type; const SensorType m_type;
// Get this sensor's index in the list // Get this sensor's index in the list

View File

@ -676,7 +676,7 @@ static void setTriggerInputPin(const char *indexStr, const char *pinName) {
static void setTriggerSimulatorMode(const char *indexStr, const char *modeCode) { static void setTriggerSimulatorMode(const char *indexStr, const char *modeCode) {
int index = atoi(indexStr); int index = atoi(indexStr);
if (index < 0 || index >= TRIGGER_SIMULATOR_PIN_COUNT || absI(index) == ERROR_CODE) { if (index < 0 || index >= TRIGGER_SIMULATOR_PIN_COUNT) {
return; return;
} }
int mode = atoi(modeCode); int mode = atoi(modeCode);
@ -688,7 +688,7 @@ static void setTriggerSimulatorMode(const char *indexStr, const char *modeCode)
static void setEgtCSPin(const char *indexStr, const char *pinName) { static void setEgtCSPin(const char *indexStr, const char *pinName) {
int index = atoi(indexStr); int index = atoi(indexStr);
if (index < 0 || index >= EGT_CHANNEL_COUNT || absI(index) == ERROR_CODE) if (index < 0 || index >= EGT_CHANNEL_COUNT)
return; return;
brain_pin_e pin = parseBrainPin(pinName); brain_pin_e pin = parseBrainPin(pinName);
if (pin == GPIO_INVALID) { if (pin == GPIO_INVALID) {
@ -702,7 +702,7 @@ static void setEgtCSPin(const char *indexStr, const char *pinName) {
static void setTriggerSimulatorPin(const char *indexStr, const char *pinName) { static void setTriggerSimulatorPin(const char *indexStr, const char *pinName) {
int index = atoi(indexStr); int index = atoi(indexStr);
if (index < 0 || index >= TRIGGER_SIMULATOR_PIN_COUNT || absI(index) == ERROR_CODE) if (index < 0 || index >= TRIGGER_SIMULATOR_PIN_COUNT)
return; return;
brain_pin_e pin = parseBrainPin(pinName); brain_pin_e pin = parseBrainPin(pinName);
if (pin == GPIO_INVALID) { if (pin == GPIO_INVALID) {
@ -766,6 +766,7 @@ static void setLogicInputPin(const char *indexStr, const char *pinName) {
} }
scheduleMsg(&logger, "setting logic input pin[%d] to %s please save&restart", index, hwPortname(pin)); scheduleMsg(&logger, "setting logic input pin[%d] to %s please save&restart", index, hwPortname(pin));
engineConfiguration->logicAnalyzerPins[index] = pin; engineConfiguration->logicAnalyzerPins[index] = pin;
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
} }
static void showPinFunction(const char *pinName) { static void showPinFunction(const char *pinName) {
@ -1358,10 +1359,10 @@ void initSettings(void) {
#if EFI_PROD_CODE #if EFI_PROD_CODE
addConsoleActionS("showpin", showPinFunction); addConsoleActionS("showpin", showPinFunction);
addConsoleActionSS("set_injection_pin", setInjectionPin); addConsoleActionSS(CMD_INJECTION_PIN, setInjectionPin);
addConsoleActionSS("set_ignition_pin", setIgnitionPin); addConsoleActionSS(CMD_IGNITION_PIN, setIgnitionPin);
addConsoleActionSS(CMD_TRIGGER_PIN, setTriggerInputPin); addConsoleActionSS(CMD_TRIGGER_PIN, setTriggerInputPin);
addConsoleActionSS("set_trigger_simulator_pin", setTriggerSimulatorPin); addConsoleActionSS(CMD_TRIGGER_SIMULATOR_PIN, setTriggerSimulatorPin);
addConsoleActionSS("set_egt_cs_pin", (VoidCharPtrCharPtr) setEgtCSPin); addConsoleActionSS("set_egt_cs_pin", (VoidCharPtrCharPtr) setEgtCSPin);
addConsoleActionI("set_egt_spi", setEgtSpi); addConsoleActionI("set_egt_spi", setEgtSpi);
@ -1369,8 +1370,8 @@ void initSettings(void) {
addConsoleActionSS("set_trigger_simulator_mode", setTriggerSimulatorMode); addConsoleActionSS("set_trigger_simulator_mode", setTriggerSimulatorMode);
addConsoleActionS("set_fuel_pump_pin", setFuelPumpPin); addConsoleActionS("set_fuel_pump_pin", setFuelPumpPin);
addConsoleActionS("set_acrelay_pin", setACRelayPin); addConsoleActionS("set_acrelay_pin", setACRelayPin);
addConsoleActionS("set_alternator_pin", setAlternatorPin); addConsoleActionS(CMD_ALTERNATOR_PIN, setAlternatorPin);
addConsoleActionS("set_idle_pin", setIdlePin); addConsoleActionS(CMD_IDLE_PIN, setIdlePin);
addConsoleActionS("set_main_relay_pin", setMainRelayPin); addConsoleActionS("set_main_relay_pin", setMainRelayPin);
addConsoleActionS("set_starter_relay_pin", setStarterRelayPin); addConsoleActionS("set_starter_relay_pin", setStarterRelayPin);
addConsoleActionS("set_cj125_cs_pin", setCj125CsPin); addConsoleActionS("set_cj125_cs_pin", setCj125CsPin);
@ -1387,7 +1388,7 @@ void initSettings(void) {
#if HAL_USE_ADC #if HAL_USE_ADC
addConsoleActionSS("set_analog_input_pin", setAnalogInputPin); addConsoleActionSS("set_analog_input_pin", setAnalogInputPin);
#endif #endif
addConsoleActionSS("set_logic_input_pin", setLogicInputPin); addConsoleActionSS(CMD_LOGIC_PIN, setLogicInputPin);
addConsoleActionI("set_pot_spi", setPotSpi); addConsoleActionI("set_pot_spi", setPotSpi);
#endif /* EFI_PROD_CODE */ #endif /* EFI_PROD_CODE */
} }

View File

@ -44,8 +44,8 @@ public:
void resetCounters(); void resetCounters();
void validateCamVvtCounters(); void validateCamVvtCounters();
float getTimeSinceTriggerEvent() const { float getTimeSinceTriggerEvent(efitick_t nowNt) const {
return m_lastEventTimer.getElapsedSeconds(); return m_lastEventTimer.getElapsedSeconds(nowNt);
} }
TriggerNoiseFilter noiseFilter; TriggerNoiseFilter noiseFilter;

View File

@ -575,7 +575,7 @@ void TriggerState::decodeTriggerEvent(
float gap = 1.0 * toothDurations[0] / toothDurations[1]; float gap = 1.0 * toothDurations[0] / toothDurations[1];
for (int i = 0;i<triggerShape.gapTrackingLength;i++) { for (int i = 0;i<triggerShape.gapTrackingLength;i++) {
float gap = 1.0 * toothDurations[i] / toothDurations[i + 1]; float gap = 1.0 * toothDurations[i] / toothDurations[i + 1];
print("index=%d: gap=%.2f expected from %.2f to %.2f error=%s\r\n", printf("index=%d: gap=%.2f expected from %.2f to %.2f error=%s\r\n",
i, i,
gap, gap,
triggerShape.syncronizationRatioFrom[i], triggerShape.syncronizationRatioFrom[i],

View File

@ -194,10 +194,14 @@ void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousCo
} }
void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
print("Emulating %s\r\n", getConfigurationName(engineConfiguration->engineType)); scheduleMsg(sharedLogger, "Emulating %s", getConfigurationName(engineConfiguration->engineType));
for (size_t i = 0; i < efi::size(emulatorOutputs); i++) initTriggerEmulatorLogic(sharedLogger);
{ }
void startTriggerEmulatorPins() {
hasStimPins = false;
for (size_t i = 0; i < efi::size(emulatorOutputs); i++) {
triggerSignal.outputPins[i] = &emulatorOutputs[i]; triggerSignal.outputPins[i] = &emulatorOutputs[i];
brain_pin_e pin = CONFIG(triggerSimulatorPins)[i]; brain_pin_e pin = CONFIG(triggerSimulatorPins)[i];
@ -210,10 +214,19 @@ void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX)
#if EFI_PROD_CODE #if EFI_PROD_CODE
triggerSignal.outputPins[i]->initPin("Trigger emulator", pin, triggerSignal.outputPins[i]->initPin("Trigger emulator", pin,
&CONFIG(triggerSimulatorPinModes)[i]); &CONFIG(triggerSimulatorPinModes)[i]);
#endif #endif // EFI_PROD_CODE
} }
}
initTriggerEmulatorLogic(sharedLogger); void stopTriggerEmulatorPins() {
for (size_t i = 0; i < efi::size(emulatorOutputs); i++) {
brain_pin_e brainPin = activeConfiguration.triggerSimulatorPins[i];
if (brainPin != GPIO_UNASSIGNED) {
#if EFI_PROD_CODE
efiSetPadUnused(brainPin);
#endif // EFI_PROD_CODE
}
}
} }
#endif /* EFI_EMULATE_POSITION_SENSORS */ #endif /* EFI_EMULATE_POSITION_SENSORS */

View File

@ -14,6 +14,8 @@ class PwmConfig;
class MultiChannelStateSequence; class MultiChannelStateSequence;
void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
void startTriggerEmulatorPins();
void stopTriggerEmulatorPins();
void setTriggerEmulatorRPM(int value DECLARE_ENGINE_PARAMETER_SUFFIX); void setTriggerEmulatorRPM(int value DECLARE_ENGINE_PARAMETER_SUFFIX);
void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousConfiguration); void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousConfiguration);

View File

@ -120,7 +120,7 @@ static void initWave(const char *name, int index) {
reader->hw->setPeriodCallback((VoidInt)(void*) waIcuPeriodCallback, (void*) reader); reader->hw->setPeriodCallback((VoidInt)(void*) waIcuPeriodCallback, (void*) reader);
} }
print("wave%d input on %s\r\n", index, hwPortname(brainPin)); scheduleMsg(logger, "wave%d input on %s", index, hwPortname(brainPin));
} }
WaveReader::WaveReader() { WaveReader::WaveReader() {
@ -221,13 +221,24 @@ void initWaveAnalyzer(Logging *sharedLogger) {
return; return;
} }
addConsoleAction("waveinfo", showWaveInfo);
}
void startLogicAnalyzerPins() {
initWave(PROTOCOL_WA_CHANNEL_1, 0); initWave(PROTOCOL_WA_CHANNEL_1, 0);
initWave(PROTOCOL_WA_CHANNEL_2, 1); initWave(PROTOCOL_WA_CHANNEL_2, 1);
initWave(PROTOCOL_WA_CHANNEL_3, 2); initWave(PROTOCOL_WA_CHANNEL_3, 2);
initWave(PROTOCOL_WA_CHANNEL_4, 3); initWave(PROTOCOL_WA_CHANNEL_4, 3);
}
addConsoleAction("waveinfo", showWaveInfo); void stopLogicAnalyzerPins() {
for (int index = 0; index < LOGIC_ANALYZER_CHANNEL_COUNT; index++) {
brain_pin_e brainPin = activeConfiguration.logicAnalyzerPins[index];
if (brainPin != GPIO_UNASSIGNED) {
stopDigitalCapture("wave input", brainPin);
}
}
} }
#endif /* EFI_LOGIC_ANALYZER */ #endif /* EFI_LOGIC_ANALYZER */

View File

@ -51,6 +51,8 @@ public:
}; };
void initWaveAnalyzer(Logging *sharedLogger); void initWaveAnalyzer(Logging *sharedLogger);
void startLogicAnalyzerPins();
void stopLogicAnalyzerPins();
void printWave(Logging *logging); void printWave(Logging *logging);
void showWaveInfo(void); void showWaveInfo(void);

View File

@ -20,7 +20,7 @@ typedef struct {
class AdcDevice { class AdcDevice {
public: public:
explicit AdcDevice(ADCConversionGroup* hwConfig, adcsample_t *buf); explicit AdcDevice(ADCConversionGroup* hwConfig, adcsample_t *buf, size_t buf_len);
void enableChannel(adc_channel_e hwChannelIndex); void enableChannel(adc_channel_e hwChannelIndex);
void enableChannelAndPin(const char *msg, adc_channel_e hwChannelIndex); void enableChannelAndPin(const char *msg, adc_channel_e hwChannelIndex);
adc_channel_e getAdcHardwareIndexByInternalIndex(int index) const; adc_channel_e getAdcHardwareIndexByInternalIndex(int index) const;
@ -34,6 +34,7 @@ public:
void invalidateSamplesCache(); void invalidateSamplesCache();
adcsample_t *samples; adcsample_t *samples;
size_t buf_len;
int getAdcValueByHwChannel(adc_channel_e hwChannel) const; int getAdcValueByHwChannel(adc_channel_e hwChannel) const;

View File

@ -61,9 +61,10 @@ float getVoltage(const char *msg, adc_channel_e hwChannel DECLARE_ENGINE_PARAMET
return adcToVolts(getAdcValue(msg, hwChannel)); return adcToVolts(getAdcValue(msg, hwChannel));
} }
AdcDevice::AdcDevice(ADCConversionGroup* hwConfig, adcsample_t *buf) { AdcDevice::AdcDevice(ADCConversionGroup* hwConfig, adcsample_t *buf, size_t buf_len) {
this->hwConfig = hwConfig; this->hwConfig = hwConfig;
this->samples = buf; this->samples = buf;
this->buf_len = buf_len;
hwConfig->sqr1 = 0; hwConfig->sqr1 = 0;
hwConfig->sqr2 = 0; hwConfig->sqr2 = 0;
@ -143,7 +144,10 @@ static ADCConversionGroup adcgrpcfgSlow = {
ADC_SMPR1_SMP_AN13(ADC_SAMPLING_SLOW) | ADC_SMPR1_SMP_AN13(ADC_SAMPLING_SLOW) |
ADC_SMPR1_SMP_AN14(ADC_SAMPLING_SLOW) | ADC_SMPR1_SMP_AN14(ADC_SAMPLING_SLOW) |
ADC_SMPR1_SMP_AN15(ADC_SAMPLING_SLOW) | ADC_SMPR1_SMP_AN15(ADC_SAMPLING_SLOW) |
ADC_SMPR1_SMP_SENSOR(ADC_SAMPLE_144), #if defined(STM32F7XX)
ADC_SMPR1_SMP_VBAT(ADC_SAMPLE_144) | /* input18 - temperature and vbat input on some STM32F7xx */
#endif
ADC_SMPR1_SMP_SENSOR(ADC_SAMPLE_144), /* input16 - temperature sensor input on STM32F4xx */
// In this field must be specified the sample times for channels 0...9 // In this field must be specified the sample times for channels 0...9
.smpr2 = .smpr2 =
ADC_SMPR2_SMP_AN0(ADC_SAMPLING_SLOW) | ADC_SMPR2_SMP_AN0(ADC_SAMPLING_SLOW) |
@ -167,7 +171,7 @@ static ADCConversionGroup adcgrpcfgSlow = {
#endif /* ADC_MAX_CHANNELS_COUNT */ #endif /* ADC_MAX_CHANNELS_COUNT */
}; };
AdcDevice slowAdc(&adcgrpcfgSlow, slowAdcSampleBuf); AdcDevice slowAdc(&adcgrpcfgSlow, slowAdcSampleBuf, ARRAY_SIZE(slowAdcSampleBuf));
void adc_callback_fast(ADCDriver *adcp, adcsample_t *buffer, size_t n); void adc_callback_fast(ADCDriver *adcp, adcsample_t *buffer, size_t n);
@ -215,7 +219,7 @@ static ADCConversionGroup adcgrpcfgFast = {
#endif /* ADC_MAX_CHANNELS_COUNT */ #endif /* ADC_MAX_CHANNELS_COUNT */
}; };
AdcDevice fastAdc(&adcgrpcfgFast, fastAdcSampleBuf); AdcDevice fastAdc(&adcgrpcfgFast, fastAdcSampleBuf, ARRAY_SIZE(fastAdcSampleBuf));
#if HAL_USE_GPT #if HAL_USE_GPT
static void fast_adc_callback(GPTDriver*) { static void fast_adc_callback(GPTDriver*) {
@ -254,7 +258,7 @@ float getMCUInternalTemperature() {
TemperatureValue += 25.0; // Add the 25 deg C TemperatureValue += 25.0; // Add the 25 deg C
if (TemperatureValue > 150.0f || TemperatureValue < -50.0f) { if (TemperatureValue > 150.0f || TemperatureValue < -50.0f) {
firmwareError(OBD_PCM_Processor_Fault, "Invalid CPU temperature measured!"); firmwareError(OBD_PCM_Processor_Fault, "Invalid CPU temperature measured %f", TemperatureValue);
} }
return TemperatureValue; return TemperatureValue;
@ -328,7 +332,7 @@ void AdcDevice::invalidateSamplesCache() {
// anything like a CCI that maintains coherency across multiple bus masters. // anything like a CCI that maintains coherency across multiple bus masters.
// As a result, we have to manually invalidate the D-cache any time we (the CPU) // As a result, we have to manually invalidate the D-cache any time we (the CPU)
// would like to read something that somebody else wrote (ADC via DMA, in this case) // would like to read something that somebody else wrote (ADC via DMA, in this case)
SCB_InvalidateDCache_by_Addr(reinterpret_cast<uint32_t*>(samples), sizeof(samples)); SCB_InvalidateDCache_by_Addr(reinterpret_cast<uint32_t*>(samples), sizeof(*samples) * buf_len);
#endif /* STM32F7XX */ #endif /* STM32F7XX */
} }
@ -356,6 +360,11 @@ void AdcDevice::enableChannel(adc_channel_e hwChannel) {
int logicChannel = channelCount++; int logicChannel = channelCount++;
size_t channelAdcIndex = hwChannel - 1; size_t channelAdcIndex = hwChannel - 1;
#if defined(STM32F7XX)
/* the temperature sensor is internally connected to ADC1_IN18 */
if (hwChannel == EFI_ADC_TEMP_SENSOR)
channelAdcIndex = 18;
#endif
internalAdcIndexByHardwareIndex[hwChannel] = logicChannel; internalAdcIndexByHardwareIndex[hwChannel] = logicChannel;
hardwareIndexByIndernalAdcIndex[logicChannel] = hwChannel; hardwareIndexByIndernalAdcIndex[logicChannel] = hwChannel;
@ -605,6 +614,12 @@ void initAdcInputs() {
adcStart(&ADC_SLOW_DEVICE, NULL); adcStart(&ADC_SLOW_DEVICE, NULL);
adcStart(&ADC_FAST_DEVICE, NULL); adcStart(&ADC_FAST_DEVICE, NULL);
adcSTM32EnableTSVREFE(); // Internal temperature sensor adcSTM32EnableTSVREFE(); // Internal temperature sensor
#if defined(STM32F7XX)
/* the temperature sensor is internally
* connected to the same input channel as VBAT. Only one conversion,
* temperature sensor or VBAT, must be selected at a time. */
adcSTM32DisableVBATE();
#endif
/* Enable this code only when you absolutly sure /* Enable this code only when you absolutly sure
* that there is no possible errors from ADC */ * that there is no possible errors from ADC */

View File

@ -198,7 +198,7 @@ ICUDriver * getInputCaptureDriver(const char *msg, brain_pin_e hwPin) {
return nullptr; return nullptr;
} }
void turnOnCapturePin(const char *msg, brain_pin_e brainPin) { static void turnOnCapturePin(const char *msg, brain_pin_e brainPin) {
ICUDriver *driver = getInputCaptureDriver(msg, brainPin); ICUDriver *driver = getInputCaptureDriver(msg, brainPin);
if (driver != NULL) { if (driver != NULL) {
iomode_t mode = (iomode_t) PAL_MODE_ALTERNATE(getAlternateFunctions(driver)); iomode_t mode = (iomode_t) PAL_MODE_ALTERNATE(getAlternateFunctions(driver));
@ -206,10 +206,6 @@ void turnOnCapturePin(const char *msg, brain_pin_e brainPin) {
} }
} }
void turnOffCapturePin(brain_pin_e brainPin) {
efiSetPadUnused(brainPin);
}
/** /**
* turns pin off and returns digital_input_s back into registeredIcus pool * turns pin off and returns digital_input_s back into registeredIcus pool
*/ */
@ -223,6 +219,7 @@ void stopDigitalCapture(const char *msg, brain_pin_e brainPin) {
if (driver == NULL) { if (driver == NULL) {
return; return;
} }
int regSize = registeredIcus.size; int regSize = registeredIcus.size;
for (int i = 0; i < regSize; i++) { for (int i = 0; i < regSize; i++) {
if (registeredIcus.elements[i].driver == driver) { if (registeredIcus.elements[i].driver == driver) {

View File

@ -13,9 +13,6 @@
digital_input_s* startDigitalCapture(const char *msg, brain_pin_e brainPin); digital_input_s* startDigitalCapture(const char *msg, brain_pin_e brainPin);
void turnOnCapturePin(const char *msg, brain_pin_e brainPin);
void turnOffCapturePin(brain_pin_e brainPin);
void stopDigitalCapture(const char *msg, brain_pin_e brainPin); void stopDigitalCapture(const char *msg, brain_pin_e brainPin);
//Nullable //Nullable

View File

@ -151,6 +151,7 @@ void enableFrankensoCan(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->canReadEnabled = false; engineConfiguration->canReadEnabled = false;
} }
// todo: we usually use 'activeConfiguration' for 'stopPin' why this unusual code here?
// this is related to #1375 // this is related to #1375
static brain_pin_e currentTxPin = GPIO_UNASSIGNED; static brain_pin_e currentTxPin = GPIO_UNASSIGNED;
static brain_pin_e currentRxPin = GPIO_UNASSIGNED; static brain_pin_e currentRxPin = GPIO_UNASSIGNED;

View File

@ -38,19 +38,19 @@ typedef enum {
MC33810_FAILED MC33810_FAILED
} mc33810_drv_state; } mc33810_drv_state;
#define CMD_READ_REG(reg) (0x0a00 | (((reg) & 0x0f) << 4)) #define MC_CMD_READ_REG(reg) (0x0a00 | (((reg) & 0x0f) << 4))
#define CMD_SPI_CHECK (0x0f00) #define MC_CMD_SPI_CHECK (0x0f00)
#define CMD_MODE_SELECT(mode) (0x1000 | ((mode) & 0x0fff)) #define MC_CMD_MODE_SELECT(mode) (0x1000 | ((mode) & 0x0fff))
#define CMD_LSD_FAULT(en) (0x2000 | ((en) & 0x0fff)) #define MC_CMD_LSD_FAULT(en) (0x2000 | ((en) & 0x0fff))
#define CMD_DRIVER_EN(en) (0x3000 | ((en) & 0x00ff)) #define MC_CMD_DRIVER_EN(en) (0x3000 | ((en) & 0x00ff))
#define CMD_SPARK(spark) (0x4000 | ((spark) & 0x0fff)) #define MC_CMD_SPARK(spark) (0x4000 | ((spark) & 0x0fff))
#define CMD_END_SPARK_FILTER(filt) (0x5000 | ((filt) & 0x0003)) #define MC_CMD_END_SPARK_FILTER(filt) (0x5000 | ((filt) & 0x0003))
#define CMD_DAC(dac) (0x6000 | ((dac) & 0x0fff)) #define MC_CMD_DAC(dac) (0x6000 | ((dac) & 0x0fff))
#define CMD_GPGD_SHORT_THRES(sh) (0x7000 | ((sh) & 0x0fff)) #define MC_CMD_GPGD_SHORT_THRES(sh) (0x7000 | ((sh) & 0x0fff))
#define CMD_GPGD_SHORT_DUR(dur) (0x8000 | ((dur) & 0x0fff)) #define MC_CMD_GPGD_SHORT_DUR(dur) (0x8000 | ((dur) & 0x0fff))
#define CMD_GPGD_FAULT_OP(op) (0x9000 | ((op) & 0x0f0f)) #define MC_CMD_GPGD_FAULT_OP(op) (0x9000 | ((op) & 0x0f0f))
#define CMD_PWM(pwm) (0xa000 | ((pwm) & 0x0fff)) #define MC_CMD_PWM(pwm) (0xa000 | ((pwm) & 0x0fff))
#define CMD_CLK_CALIB (0xe000) #define MC_CMD_CLK_CALIB (0xe000)
/* get command code from TX value */ /* get command code from TX value */
#define TX_GET_CMD(v) (((v) >> 12) & 0x000f) #define TX_GET_CMD(v) (((v) >> 12) & 0x000f)
@ -168,7 +168,7 @@ static int mc33810_spi_rw(struct mc33810_priv *chip, uint16_t tx, uint16_t *rx)
/* if next reply will be ALL STATUS RESPONSE */ /* if next reply will be ALL STATUS RESPONSE */
chip->all_status_requested = chip->all_status_requested =
(((TX_GET_CMD(tx) >= 0x1) && (TX_GET_CMD(tx) <= 0xa)) || (((TX_GET_CMD(tx) >= 0x1) && (TX_GET_CMD(tx) <= 0xa)) ||
(tx == CMD_READ_REG(REG_ALL_STAT))); (tx == MC_CMD_READ_REG(REG_ALL_STAT)));
/* no errors for now */ /* no errors for now */
return 0; return 0;
@ -193,7 +193,7 @@ static int mc33810_update_output_and_diag(struct mc33810_priv *chip)
uint16_t out_data; uint16_t out_data;
out_data = chip->o_state & (~chip->o_direct_mask); out_data = chip->o_state & (~chip->o_direct_mask);
ret = mc33810_spi_rw(chip, CMD_DRIVER_EN(out_data), NULL); ret = mc33810_spi_rw(chip, MC_CMD_DRIVER_EN(out_data), NULL);
if (ret) if (ret)
return ret; return ret;
chip->o_state_cached = chip->o_state; chip->o_state_cached = chip->o_state;
@ -201,13 +201,13 @@ static int mc33810_update_output_and_diag(struct mc33810_priv *chip)
/* this comlicated logic to save few spi transfers in case we will receive status as reply on other command */ /* this comlicated logic to save few spi transfers in case we will receive status as reply on other command */
if (!chip->all_status_requested) { if (!chip->all_status_requested) {
ret = mc33810_spi_rw(chip, CMD_READ_REG(REG_ALL_STAT), NULL); ret = mc33810_spi_rw(chip, MC_CMD_READ_REG(REG_ALL_STAT), NULL);
if (ret) if (ret)
return ret; return ret;
} }
/* get reply */ /* get reply */
if (!chip->all_status_updated) { if (!chip->all_status_updated) {
ret = mc33810_spi_rw(chip, CMD_READ_REG(REG_ALL_STAT), NULL); ret = mc33810_spi_rw(chip, MC_CMD_READ_REG(REG_ALL_STAT), NULL);
if (ret) if (ret)
return ret; return ret;
} }
@ -216,37 +216,37 @@ static int mc33810_update_output_and_diag(struct mc33810_priv *chip)
/* check OUT (injectors) first */ /* check OUT (injectors) first */
if (chip->all_status_value & 0x000f) { if (chip->all_status_value & 0x000f) {
/* request diagnostic of OUT0 and OUT1 */ /* request diagnostic of OUT0 and OUT1 */
ret = mc33810_spi_rw(chip, CMD_READ_REG(REG_OUT10_FAULT), NULL); ret = mc33810_spi_rw(chip, MC_CMD_READ_REG(REG_OUT10_FAULT), NULL);
if (ret) if (ret)
return ret; return ret;
/* get diagnostic for OUT0 and OUT1 and request diagnostic for OUT2 and OUT3 */ /* get diagnostic for OUT0 and OUT1 and request diagnostic for OUT2 and OUT3 */
ret = mc33810_spi_rw(chip, CMD_READ_REG(REG_OUT32_FAULT), &chip->out_fault[0]); ret = mc33810_spi_rw(chip, MC_CMD_READ_REG(REG_OUT32_FAULT), &chip->out_fault[0]);
if (ret) if (ret)
return ret; return ret;
/* get diagnostic for OUT2 and OUT2 and requset ALL STATUS */ /* get diagnostic for OUT2 and OUT2 and requset ALL STATUS */
ret = mc33810_spi_rw(chip, CMD_READ_REG(REG_ALL_STAT), &chip->out_fault[1]); ret = mc33810_spi_rw(chip, MC_CMD_READ_REG(REG_ALL_STAT), &chip->out_fault[1]);
if (ret) if (ret)
return ret; return ret;
} }
/* check GPGD - mode not supported yet */ /* check GPGD - mode not supported yet */
if (chip->all_status_value & 0x00f0) { if (chip->all_status_value & 0x00f0) {
/* request diagnostic of GPGD */ /* request diagnostic of GPGD */
ret = mc33810_spi_rw(chip, CMD_READ_REG(REG_GPGD_FAULT), NULL); ret = mc33810_spi_rw(chip, MC_CMD_READ_REG(REG_GPGD_FAULT), NULL);
if (ret) if (ret)
return ret; return ret;
/* get diagnostic for GPGD and requset ALL STATUS */ /* get diagnostic for GPGD and requset ALL STATUS */
ret = mc33810_spi_rw(chip, CMD_READ_REG(REG_ALL_STAT), &chip->gpgd_fault); ret = mc33810_spi_rw(chip, MC_CMD_READ_REG(REG_ALL_STAT), &chip->gpgd_fault);
if (ret) if (ret)
return ret; return ret;
} }
/* check IGN */ /* check IGN */
if (chip->all_status_value & 0x0f00) { if (chip->all_status_value & 0x0f00) {
/* request diagnostic of IGN */ /* request diagnostic of IGN */
ret = mc33810_spi_rw(chip, CMD_READ_REG(REG_IGN_FAULT), NULL); ret = mc33810_spi_rw(chip, MC_CMD_READ_REG(REG_IGN_FAULT), NULL);
if (ret) if (ret)
return ret; return ret;
/* get diagnostic for IGN and requset ALL STATUS */ /* get diagnostic for IGN and requset ALL STATUS */
ret = mc33810_spi_rw(chip, CMD_READ_REG(REG_ALL_STAT), &chip->ign_fault); ret = mc33810_spi_rw(chip, MC_CMD_READ_REG(REG_ALL_STAT), &chip->ign_fault);
if (ret) if (ret)
return ret; return ret;
} }
@ -284,9 +284,9 @@ static int mc33810_chip_init(struct mc33810_priv *chip)
/* check SPI communication */ /* check SPI communication */
/* 0. set echo mode, chip number - don't care */ /* 0. set echo mode, chip number - don't care */
ret = mc33810_spi_rw(chip, CMD_SPI_CHECK, NULL); ret = mc33810_spi_rw(chip, MC_CMD_SPI_CHECK, NULL);
/* 1. check loopback */ /* 1. check loopback */
ret |= mc33810_spi_rw(chip, CMD_READ_REG(REG_REV), &rx); ret |= mc33810_spi_rw(chip, MC_CMD_READ_REG(REG_REV), &rx);
if (ret) { if (ret) {
ret = -1; ret = -1;
goto err_gpios; goto err_gpios;
@ -298,7 +298,7 @@ static int mc33810_chip_init(struct mc33810_priv *chip)
} }
/* 2. read revision */ /* 2. read revision */
ret = mc33810_spi_rw(chip, CMD_READ_REG(REG_ALL_STAT), &rx); ret = mc33810_spi_rw(chip, MC_CMD_READ_REG(REG_ALL_STAT), &rx);
if (ret) { if (ret) {
ret = -1; ret = -1;
goto err_gpios; goto err_gpios;

View File

@ -23,6 +23,7 @@
#include "yaw_rate_sensor.h" #include "yaw_rate_sensor.h"
#include "pin_repository.h" #include "pin_repository.h"
#include "max31855.h" #include "max31855.h"
#include "logic_analyzer.h"
#include "smart_gpio.h" #include "smart_gpio.h"
#include "accelerometer.h" #include "accelerometer.h"
#include "eficonsole.h" #include "eficonsole.h"
@ -49,6 +50,7 @@
#include "engine_configuration.h" #include "engine_configuration.h"
#include "aux_pid.h" #include "aux_pid.h"
#include "perf_trace.h" #include "perf_trace.h"
#include "trigger_emulator_algo.h"
#include "boost_control.h" #include "boost_control.h"
#include "software_knock.h" #include "software_knock.h"
#if EFI_MC33816 #if EFI_MC33816
@ -303,8 +305,14 @@ void stopSpi(spi_device_e device) {
*/ */
void applyNewHardwareSettings(void) { void applyNewHardwareSettings(void) {
// all 'stop' methods need to go before we begin starting pins /**
* All 'stop' methods need to go before we begin starting pins.
*
* We take settings from 'activeConfiguration' not 'engineConfiguration' while stopping hardware.
* Some hardware is restart unconditionally on change of parameters while for some systems we make extra effort and restart only
* relevant settings were changes.
*
*/
ButtonDebounce::stopConfigurationList(); ButtonDebounce::stopConfigurationList();
#if EFI_SHAFT_POSITION_INPUT #if EFI_SHAFT_POSITION_INPUT
@ -343,6 +351,14 @@ void applyNewHardwareSettings(void) {
stopVSSPins(); stopVSSPins();
#endif /* EFI_VEHICLE_SPEED */ #endif /* EFI_VEHICLE_SPEED */
#if EFI_LOGIC_ANALYZER
stopLogicAnalyzerPins();
#endif /* EFI_LOGIC_ANALYZER */
#if EFI_EMULATE_POSITION_SENSORS
stopTriggerEmulatorPins();
#endif /* EFI_EMULATE_POSITION_SENSORS */
#if EFI_AUX_PID #if EFI_AUX_PID
stopAuxPins(); stopAuxPins();
#endif /* EFI_AUX_PID */ #endif /* EFI_AUX_PID */
@ -420,6 +436,12 @@ void applyNewHardwareSettings(void) {
#if EFI_BOOST_CONTROL #if EFI_BOOST_CONTROL
startBoostPin(); startBoostPin();
#endif #endif
#if EFI_EMULATE_POSITION_SENSORS
startTriggerEmulatorPins();
#endif /* EFI_EMULATE_POSITION_SENSORS */
#if EFI_LOGIC_ANALYZER
startLogicAnalyzerPins();
#endif /* EFI_LOGIC_ANALYZER */
#if EFI_AUX_PID #if EFI_AUX_PID
startAuxPins(); startAuxPins();
#endif /* EFI_AUX_PID */ #endif /* EFI_AUX_PID */

View File

@ -48,9 +48,7 @@ static void initFluidPressure(LinearFunc& func, FunctionalSensor& sensor, const
AdcSubscription::SubscribeSensor(sensor, channel, bandwidth); AdcSubscription::SubscribeSensor(sensor, channel, bandwidth);
if (!sensor.Register()) { sensor.Register();
firmwareError(CUSTOM_INVALID_TPS_SETTING, "Duplicate registration for sensor \"%s\"", sensor.getSensorName());
}
} }
void initOilPressure(DECLARE_CONFIG_PARAMETER_SIGNATURE) { void initOilPressure(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
@ -64,9 +62,7 @@ void initOilPressure(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
: SensorType::FuelPressureLow : SensorType::FuelPressureLow
); );
if (!injectorPressure.Register()) { injectorPressure.Register();
firmwareError(OBD_PCM_Processor_Fault, "Duplicate sensor registration");
}
} }
void reconfigureOilPressure(DECLARE_CONFIG_PARAMETER_SIGNATURE) { void reconfigureOilPressure(DECLARE_CONFIG_PARAMETER_SIGNATURE) {

View File

@ -39,7 +39,5 @@ void initLambda(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
} }
#endif #endif
if (!lambdaSensor.Register()) { lambdaSensor.Register();
warning(OBD_PCM_Processor_Fault, "Duplicate lambda sensor registration, ignoring");
}
} }

View File

@ -39,8 +39,6 @@ static void initSensorCli(Logging* logger) {
addConsoleAction("show_sensors", []() { Sensor::showAllSensorInfo(s_logger); }); addConsoleAction("show_sensors", []() { Sensor::showAllSensorInfo(s_logger); });
addConsoleActionI("show_sensor", addConsoleActionI("show_sensor",
[](int idx) { [](int idx) {
if (auto s = Sensor::getSensorOfType(static_cast<SensorType>(idx))) { Sensor::showInfo(s_logger, static_cast<SensorType>(idx));
s->showAllSensorInfo(s_logger);
}
}); });
} }

View File

@ -60,12 +60,9 @@ static void configureTempSensor(FunctionalSensor &sensor,
configTherm(sensor, p, config, isLinear); configTherm(sensor, p, config, isLinear);
AdcSubscription::SubscribeSensor(sensor, channel, 2);
// Register & subscribe // Register & subscribe
if (!sensor.Register()) { AdcSubscription::SubscribeSensor(sensor, channel, 2);
// uhh? sensor.Register();
}
} }
void initThermistors(DECLARE_CONFIG_PARAMETER_SIGNATURE) { void initThermistors(DECLARE_CONFIG_PARAMETER_SIGNATURE) {

View File

@ -39,32 +39,45 @@ LinearFunc idlePosFunc(PACK_MULT_VOLTAGE);
FunctionalSensor wastegateSens(SensorType::WastegatePosition, MS2NT(10)); FunctionalSensor wastegateSens(SensorType::WastegatePosition, MS2NT(10));
FunctionalSensor idlePosSens(SensorType::IdlePosition, MS2NT(10)); FunctionalSensor idlePosSens(SensorType::IdlePosition, MS2NT(10));
static void configureTps(LinearFunc& func, float closed, float open, float min, float max) { static bool configureTps(LinearFunc& func, adc_channel_e channel, float closed, float open, float min, float max, const char* msg) {
// Only configure if we have a channel
if (channel == EFI_ADC_NONE || channel >= EFI_ADC_LAST_CHANNEL) {
return false;
}
float scaledClosed = closed / func.getDivideInput();
float scaledOpen = open / func.getDivideInput();
float split = absF(scaledOpen - scaledClosed);
// If the voltage for closed vs. open is very near, something is wrong with your calibration
if (split < 0.5f) {
firmwareError(OBD_Throttle_Position_Sensor_Circuit_Malfunction, "Sensor \"%s\" problem: open %f/closed %f calibration values are too close together. Please check your wiring!", msg,
open,
closed);
return false;
}
func.configure( func.configure(
closed, 0, closed, 0,
open, 100, open, 100,
min, max min, max
); );
return true;
} }
static bool initTpsFunc(LinearFunc& func, FunctionalSensor& sensor, adc_channel_e channel, float closed, float open, float min, float max) { static bool initTpsFunc(LinearFunc& func, FunctionalSensor& sensor, adc_channel_e channel, float closed, float open, float min, float max) {
// Only register if we have a sensor // If the configuration was invalid, don't continue to configure the sensor
if (channel == EFI_ADC_NONE) { if (!configureTps(func, channel, closed, open, min, max, sensor.getSensorName())) {
return false; return false;
} }
configureTps(func, closed, open, min, max);
sensor.setFunction(func); sensor.setFunction(func);
AdcSubscription::SubscribeSensor(sensor, channel, 200); AdcSubscription::SubscribeSensor(sensor, channel, 200);
if (!sensor.Register()) { return sensor.Register();
firmwareError(CUSTOM_INVALID_TPS_SETTING, "Duplicate registration for sensor \"%s\"", sensor.getSensorName());
return false;
}
return true;
} }
static void initTpsFuncAndRedund(RedundantSensor& redund, LinearFunc& func, FunctionalSensor& sensor, adc_channel_e channel, float closed, float open, float min, float max) { static void initTpsFuncAndRedund(RedundantSensor& redund, LinearFunc& func, FunctionalSensor& sensor, adc_channel_e channel, float closed, float open, float min, float max) {
@ -72,9 +85,7 @@ static void initTpsFuncAndRedund(RedundantSensor& redund, LinearFunc& func, Func
redund.configure(5.0f, !hasSecond); redund.configure(5.0f, !hasSecond);
if (!redund.Register()) { redund.Register();
firmwareError(CUSTOM_INVALID_TPS_SETTING, "Duplicate registration for sensor \"%s\"", redund.getSensorName());
}
} }
void initTps(DECLARE_CONFIG_PARAMETER_SIGNATURE) { void initTps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
@ -101,23 +112,21 @@ void initTps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
driverIntent.setProxiedSensor(SensorType::Tps1); driverIntent.setProxiedSensor(SensorType::Tps1);
} }
if (!driverIntent.Register()) { driverIntent.Register();
firmwareError(CUSTOM_INVALID_TPS_SETTING, "Duplicate registration for driver acc intent sensor");
}
} }
void reconfigureTps(DECLARE_CONFIG_PARAMETER_SIGNATURE) { void reconfigureTps(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
float min = CONFIG(tpsErrorDetectionTooLow); float min = CONFIG(tpsErrorDetectionTooLow);
float max = CONFIG(tpsErrorDetectionTooHigh); float max = CONFIG(tpsErrorDetectionTooHigh);
configureTps(tpsFunc1p, CONFIG(tpsMin), CONFIG(tpsMax), min, max); configureTps(tpsFunc1p, CONFIG(tps1_1AdcChannel), CONFIG(tpsMin), CONFIG(tpsMax), min, max, tpsSens1p.getSensorName());
configureTps(tpsFunc1s, CONFIG(tps1SecondaryMin), CONFIG(tps1SecondaryMax), min, max); configureTps(tpsFunc1s, CONFIG(tps1_2AdcChannel), CONFIG(tps1SecondaryMin), CONFIG(tps1SecondaryMax), min, max, tpsSens1s.getSensorName());
configureTps(tpsFunc2p, CONFIG(tps2Min), CONFIG(tps2Max), min, max); configureTps(tpsFunc2p, CONFIG(tps2_1AdcChannel), CONFIG(tps2Min), CONFIG(tps2Max), min, max, tpsSens2p.getSensorName());
configureTps(tpsFunc2s, CONFIG(tps2SecondaryMin), CONFIG(tps2SecondaryMax), min, max); configureTps(tpsFunc2s, CONFIG(tps2_2AdcChannel), CONFIG(tps2SecondaryMin), CONFIG(tps2SecondaryMax), min, max, tpsSens2s.getSensorName());
configureTps(pedalFuncPrimary, CONFIG(throttlePedalUpVoltage), CONFIG(throttlePedalWOTVoltage), min, max); configureTps(pedalFuncPrimary, CONFIG(throttlePedalPositionAdcChannel), CONFIG(throttlePedalUpVoltage), CONFIG(throttlePedalWOTVoltage), min, max, pedalSensorPrimary.getSensorName());
configureTps(pedalFuncSecondary, CONFIG(throttlePedalSecondaryUpVoltage), CONFIG(throttlePedalSecondaryWOTVoltage), min, max); configureTps(pedalFuncSecondary, CONFIG(throttlePedalPositionSecondAdcChannel), CONFIG(throttlePedalSecondaryUpVoltage), CONFIG(throttlePedalSecondaryWOTVoltage), min, max, pedalSensorSecondary.getSensorName());
configureTps(wastegateFunc, CONFIG(wastegatePositionMin), CONFIG(wastegatePositionMax), min, max); configureTps(wastegateFunc, CONFIG(wastegatePositionSensor), CONFIG(wastegatePositionMin), CONFIG(wastegatePositionMax), min, max, wastegateSens.getSensorName());
configureTps(idlePosFunc, CONFIG(idlePositionMin), CONFIG(idlePositionMax), min, max); configureTps(idlePosFunc, CONFIG(idlePositionSensor), CONFIG(idlePositionMin), CONFIG(idlePositionMax), min, max, idlePosSens.getSensorName());
} }

View File

@ -421,6 +421,8 @@ end_struct
#define TT_TT_TOOTHED_WHEEL_36_2 48 #define TT_TT_TOOTHED_WHEEL_36_2 48
#define TT_TT_SUBARU_SVX 49 #define TT_TT_SUBARU_SVX 49
#define TT_TT_1_16 50 #define TT_TT_1_16 50
#define TT_TT_51 51
#define ET_DODGE_NEON_1995 2 #define ET_DODGE_NEON_1995 2
#define ET_FORD_ASPIRE 3 #define ET_FORD_ASPIRE 3
@ -432,6 +434,7 @@ end_struct
#define ET_SACHS 29 #define ET_SACHS 29
#define ET_VW_ABA 32 #define ET_VW_ABA 32
#define ET_CAMARO 35 #define ET_CAMARO 35
#define ET_MRE_SUBARU_EJ18 37
#define ET_BMW_M73_F 40 #define ET_BMW_M73_F 40
#define ET_DODGE_NEON_2003_CRANK 46 #define ET_DODGE_NEON_2003_CRANK 46
@ -483,7 +486,7 @@ bit isCJ125Verbose;enable cj125verbose/disable cj125verbose
bit cj125isUaDivided;+Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt bit cj125isUaDivided;+Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt
bit cj125isLsu49; bit cj125isLsu49;
bit etb_use_two_wires;+TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode. bit etb_use_two_wires;+TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode.
bit isDoubleSolenoidIdle;+Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position. bit isDoubleSolenoidIdle;+Subaru/BMW style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position.
bit showSdCardWarning; bit showSdCardWarning;
bit cj125isUrDivided;+Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed. bit cj125isUrDivided;+Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed.
bit useCicPidForIdle;+Switch between Industrial and Cic PID implementation bit useCicPidForIdle;+Switch between Industrial and Cic PID implementation
@ -1452,8 +1455,10 @@ uint8_t[4] unusedsw;;"units", 1, 0, -20, 100, 0
pin_output_mode_e[TCU_SOLENOID_COUNT iterate] tcu_solenoid_mode; pin_output_mode_e[TCU_SOLENOID_COUNT iterate] tcu_solenoid_mode;
int8_t[IGN_RPM_COUNT] knockBaseNoise;;"dB", 1.0, 0, -30.0, 0, 2
! just a reminder that 'int' and 'float' are 4 bytes each ! just a reminder that 'int' and 'float' are 4 bytes each
int[369] mainUnusedEnd;;"units", 1, 0, -20, 100, 0 int[365] mainUnusedEnd;;"units", 1, 0, -20, 100, 0
! end of engine_configuration_s ! end of engine_configuration_s
end_struct end_struct
@ -1710,6 +1715,13 @@ end_struct
#define CMD_RPM "rpm" #define CMD_RPM "rpm"
#define CMD_VSS_PIN "vss_pin" #define CMD_VSS_PIN "vss_pin"
#define CMD_TRIGGER_PIN "set_trigger_input_pin" #define CMD_TRIGGER_PIN "set_trigger_input_pin"
#define CMD_LOGIC_PIN "set_logic_input_pin"
#define CMD_ALTERNATOR_PIN "set_alternator_pin"
#define CMD_IDLE_PIN "set_idle_pin"
#define CMD_BOOST_PIN "set_boost_pin"
#define CMD_TRIGGER_SIMULATOR_PIN "set_trigger_simulator_pin"
#define CMD_IGNITION_PIN "set_ignition_pin"
#define CMD_INJECTION_PIN "set_injection_pin"
#define CMD_RESET_ENGINE_SNIFFER "reset_engine_chart" #define CMD_RESET_ENGINE_SNIFFER "reset_engine_chart"
#define CMD_FUNCTIONAL_TEST_MODE "test_mode" #define CMD_FUNCTIONAL_TEST_MODE "test_mode"

View File

@ -33,12 +33,12 @@ enable2ndByteCanID = false
[MegaTune] [MegaTune]
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
signature = "rusEFI 2020.12.04.all.768848914" signature = "rusEFI 2020.12.09.all.1456336785"
[TunerStudio] [TunerStudio]
queryCommand = "S" queryCommand = "S"
versionInfo = "V" ; firmwave version for title bar. versionInfo = "V" ; firmwave version for title bar.
signature = "rusEFI 2020.12.04.all.768848914" ; signature is expected to be 7 or more characters. signature = "rusEFI 2020.12.09.all.1456336785" ; signature is expected to be 7 or more characters.
[Constants] [Constants]
; new packet serial format with CRC ; new packet serial format with CRC
@ -74,11 +74,11 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code ; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START ; CONFIG_DEFINITION_START
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Dec 04 16:38:29 UTC 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Dec 09 02:10:15 UTC 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "CHEVY_C20_1973", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "MRE_SUBARU_EJ18", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0 engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0
injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2 injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2
injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2
@ -1174,8 +1174,9 @@ page = 1
tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted"
alignmentFill_at_4523 = scalar, U08, 4523, "units", 1.0, 0, -20, 100, 0 knockBaseNoise = array, S08, 4523, [16], "dB", 1.0, 0, -30.0, 0, 2
mainUnusedEnd = array, S32, 4524, [369], "units", 1.0, 0, -20, 100, 0 alignmentFill_at_4539 = scalar, U08, 4539, "units", 1.0, 0, -20, 100, 0
mainUnusedEnd = array, S32, 4540, [365], "units", 1.0, 0, -20, 100, 0
warning_message = string, ASCII, 6000, 120 warning_message = string, ASCII, 6000, 120
afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0 afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0
afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1
@ -1266,7 +1267,7 @@ page = 1
injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min"
cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt"
etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode."
isDoubleSolenoidIdle = "Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position." isDoubleSolenoidIdle = "Subaru/BMW style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position."
cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed."
useCicPidForIdle = "Switch between Industrial and Cic PID implementation" useCicPidForIdle = "Switch between Industrial and Cic PID implementation"
absoluteFuelPressure = "If your fuel regulator does not have vacuum line" absoluteFuelPressure = "If your fuel regulator does not have vacuum line"
@ -1588,6 +1589,7 @@ page = 1
ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false";
ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false";
ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ind_pedal_error =bits, U32, 0, [26:26], "true", "false";
isTps2Error = bits, U32, 0, [29:29], "true", "false";
; RPM, vss ; RPM, vss
RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 RPMValue = scalar, U16, 4, "RPM", 1, 0.00000
@ -1923,6 +1925,14 @@ page = 1
yAxis = 0, 8, 10 yAxis = 0, 8, 10
xBins = knockNoiseRpmBins, RPMValue xBins = knockNoiseRpmBins, RPMValue
yBins = knockNoise yBins = knockNoise
gauge = RPMGauge
curve = swKnockThresholdCurve, "Engine knock threshold RPM based"
columnLabel = "RPM", "Threshold dB"
xAxis = 0, 8000, 10
yAxis = -30, 0, 10
xBins = ignitionRpmBins, RPMValue
yBins = knockBaseNoise
gauge = RPMGauge gauge = RPMGauge
curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation"
@ -2527,6 +2537,7 @@ gaugeCategory = DynoView
; error codes ; error codes
indicator = { isTpsError}, "tps", "tps error", white, black, red, black indicator = { isTpsError}, "tps", "tps error", white, black, red, black
indicator = { isTps2Error}, "tps 2", "tps 2 error", white, black, red, black
indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black
indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black
@ -3944,7 +3955,7 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Pin mode", malfunctionIndicatorPinMode field = "Pin mode", malfunctionIndicatorPinMode
field = "Warning Period", warningPeriod field = "Warning Period", warningPeriod
dialog = softwareKnock, "Software Knock" dialog = softwareKnockCfg, "Configuration"
field = "Enable", enableSoftwareKnock field = "Enable", enableSoftwareKnock
field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock} field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock}
field = "" field = ""
@ -3962,6 +3973,10 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11} field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11}
field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12} field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12}
dialog = softwareKnock, "Software Knock", border
panel = softwareKnockCfg, West
panel = swKnockThresholdCurve, Center
; Engine->hip9011 Settings ; Engine->hip9011 Settings
dialog = hipFunction, "HIP9011 Settings (knock decoder)" dialog = hipFunction, "HIP9011 Settings (knock decoder)"
field = "Enabled", isHip9011Enabled field = "Enabled", isHip9011Enabled

View File

@ -33,12 +33,12 @@ enable2ndByteCanID = false
[MegaTune] [MegaTune]
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
signature = "rusEFI 2020.12.04.frankenso_na6.3148023273" signature = "rusEFI 2020.12.09.frankenso_na6.3233635946"
[TunerStudio] [TunerStudio]
queryCommand = "S" queryCommand = "S"
versionInfo = "V" ; firmwave version for title bar. versionInfo = "V" ; firmwave version for title bar.
signature = "rusEFI 2020.12.04.frankenso_na6.3148023273" ; signature is expected to be 7 or more characters. signature = "rusEFI 2020.12.09.frankenso_na6.3233635946" ; signature is expected to be 7 or more characters.
[Constants] [Constants]
; new packet serial format with CRC ; new packet serial format with CRC
@ -74,11 +74,11 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code ; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START ; CONFIG_DEFINITION_START
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Dec 04 16:38:34 UTC 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Dec 09 02:10:20 UTC 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "CHEVY_C20_1973", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "MRE_SUBARU_EJ18", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0 engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0
injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2 injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2
injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2
@ -1174,8 +1174,9 @@ page = 1
tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted"
alignmentFill_at_4523 = scalar, U08, 4523, "units", 1.0, 0, -20, 100, 0 knockBaseNoise = array, S08, 4523, [16], "dB", 1.0, 0, -30.0, 0, 2
mainUnusedEnd = array, S32, 4524, [369], "units", 1.0, 0, -20, 100, 0 alignmentFill_at_4539 = scalar, U08, 4539, "units", 1.0, 0, -20, 100, 0
mainUnusedEnd = array, S32, 4540, [365], "units", 1.0, 0, -20, 100, 0
warning_message = string, ASCII, 6000, 120 warning_message = string, ASCII, 6000, 120
afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0 afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0
afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1
@ -1266,7 +1267,7 @@ page = 1
injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min"
cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt"
etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode."
isDoubleSolenoidIdle = "Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position." isDoubleSolenoidIdle = "Subaru/BMW style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position."
cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed."
useCicPidForIdle = "Switch between Industrial and Cic PID implementation" useCicPidForIdle = "Switch between Industrial and Cic PID implementation"
absoluteFuelPressure = "If your fuel regulator does not have vacuum line" absoluteFuelPressure = "If your fuel regulator does not have vacuum line"
@ -1588,6 +1589,7 @@ page = 1
ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false";
ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false";
ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ind_pedal_error =bits, U32, 0, [26:26], "true", "false";
isTps2Error = bits, U32, 0, [29:29], "true", "false";
; RPM, vss ; RPM, vss
RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 RPMValue = scalar, U16, 4, "RPM", 1, 0.00000
@ -1923,6 +1925,14 @@ page = 1
yAxis = 0, 8, 10 yAxis = 0, 8, 10
xBins = knockNoiseRpmBins, RPMValue xBins = knockNoiseRpmBins, RPMValue
yBins = knockNoise yBins = knockNoise
gauge = RPMGauge
curve = swKnockThresholdCurve, "Engine knock threshold RPM based"
columnLabel = "RPM", "Threshold dB"
xAxis = 0, 8000, 10
yAxis = -30, 0, 10
xBins = ignitionRpmBins, RPMValue
yBins = knockBaseNoise
gauge = RPMGauge gauge = RPMGauge
curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation"
@ -2527,6 +2537,7 @@ gaugeCategory = DynoView
; error codes ; error codes
indicator = { isTpsError}, "tps", "tps error", white, black, red, black indicator = { isTpsError}, "tps", "tps error", white, black, red, black
indicator = { isTps2Error}, "tps 2", "tps 2 error", white, black, red, black
indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black
indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black
@ -3944,7 +3955,7 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Pin mode", malfunctionIndicatorPinMode field = "Pin mode", malfunctionIndicatorPinMode
field = "Warning Period", warningPeriod field = "Warning Period", warningPeriod
dialog = softwareKnock, "Software Knock" dialog = softwareKnockCfg, "Configuration"
field = "Enable", enableSoftwareKnock field = "Enable", enableSoftwareKnock
field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock} field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock}
field = "" field = ""
@ -3962,6 +3973,10 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11} field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11}
field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12} field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12}
dialog = softwareKnock, "Software Knock", border
panel = softwareKnockCfg, West
panel = swKnockThresholdCurve, Center
; Engine->hip9011 Settings ; Engine->hip9011 Settings
dialog = hipFunction, "HIP9011 Settings (knock decoder)" dialog = hipFunction, "HIP9011 Settings (knock decoder)"
field = "Enabled", isHip9011Enabled field = "Enabled", isHip9011Enabled

View File

@ -33,12 +33,12 @@ enable2ndByteCanID = false
[MegaTune] [MegaTune]
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
signature = "rusEFI 2020.12.04.hellen_cypress.3827438289" signature = "rusEFI 2020.12.09.hellen_cypress.2671528274"
[TunerStudio] [TunerStudio]
queryCommand = "S" queryCommand = "S"
versionInfo = "V" ; firmwave version for title bar. versionInfo = "V" ; firmwave version for title bar.
signature = "rusEFI 2020.12.04.hellen_cypress.3827438289" ; signature is expected to be 7 or more characters. signature = "rusEFI 2020.12.09.hellen_cypress.2671528274" ; signature is expected to be 7 or more characters.
[Constants] [Constants]
; new packet serial format with CRC ; new packet serial format with CRC
@ -74,11 +74,11 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code ; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START ; CONFIG_DEFINITION_START
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on hellen_cypress_gen_config.bat integration/rusefi_config.txt Fri Dec 04 16:38:43 UTC 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on hellen_cypress_gen_config.bat integration/rusefi_config.txt Wed Dec 09 02:10:31 UTC 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "CHEVY_C20_1973", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "MRE_SUBARU_EJ18", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0 engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0
injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2 injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2
injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2
@ -1174,8 +1174,9 @@ page = 1
tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted"
alignmentFill_at_4523 = scalar, U08, 4523, "units", 1.0, 0, -20, 100, 0 knockBaseNoise = array, S08, 4523, [16], "dB", 1.0, 0, -30.0, 0, 2
mainUnusedEnd = array, S32, 4524, [369], "units", 1.0, 0, -20, 100, 0 alignmentFill_at_4539 = scalar, U08, 4539, "units", 1.0, 0, -20, 100, 0
mainUnusedEnd = array, S32, 4540, [365], "units", 1.0, 0, -20, 100, 0
warning_message = string, ASCII, 6000, 120 warning_message = string, ASCII, 6000, 120
afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0 afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0
afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1
@ -1266,7 +1267,7 @@ page = 1
injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min"
cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt"
etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode."
isDoubleSolenoidIdle = "Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position." isDoubleSolenoidIdle = "Subaru/BMW style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position."
cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed."
useCicPidForIdle = "Switch between Industrial and Cic PID implementation" useCicPidForIdle = "Switch between Industrial and Cic PID implementation"
absoluteFuelPressure = "If your fuel regulator does not have vacuum line" absoluteFuelPressure = "If your fuel regulator does not have vacuum line"
@ -1588,6 +1589,7 @@ page = 1
ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false";
ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false";
ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ind_pedal_error =bits, U32, 0, [26:26], "true", "false";
isTps2Error = bits, U32, 0, [29:29], "true", "false";
; RPM, vss ; RPM, vss
RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 RPMValue = scalar, U16, 4, "RPM", 1, 0.00000
@ -1923,6 +1925,14 @@ page = 1
yAxis = 0, 8, 10 yAxis = 0, 8, 10
xBins = knockNoiseRpmBins, RPMValue xBins = knockNoiseRpmBins, RPMValue
yBins = knockNoise yBins = knockNoise
gauge = RPMGauge
curve = swKnockThresholdCurve, "Engine knock threshold RPM based"
columnLabel = "RPM", "Threshold dB"
xAxis = 0, 8000, 10
yAxis = -30, 0, 10
xBins = ignitionRpmBins, RPMValue
yBins = knockBaseNoise
gauge = RPMGauge gauge = RPMGauge
curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation"
@ -2527,6 +2537,7 @@ gaugeCategory = DynoView
; error codes ; error codes
indicator = { isTpsError}, "tps", "tps error", white, black, red, black indicator = { isTpsError}, "tps", "tps error", white, black, red, black
indicator = { isTps2Error}, "tps 2", "tps 2 error", white, black, red, black
indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black
indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black
@ -3944,7 +3955,7 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Pin mode", malfunctionIndicatorPinMode field = "Pin mode", malfunctionIndicatorPinMode
field = "Warning Period", warningPeriod field = "Warning Period", warningPeriod
dialog = softwareKnock, "Software Knock" dialog = softwareKnockCfg, "Configuration"
field = "Enable", enableSoftwareKnock field = "Enable", enableSoftwareKnock
field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock} field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock}
field = "" field = ""
@ -3962,6 +3973,10 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11} field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11}
field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12} field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12}
dialog = softwareKnock, "Software Knock", border
panel = softwareKnockCfg, West
panel = swKnockThresholdCurve, Center
; Engine->hip9011 Settings ; Engine->hip9011 Settings
dialog = hipFunction, "HIP9011 Settings (knock decoder)" dialog = hipFunction, "HIP9011 Settings (knock decoder)"
field = "Enabled", isHip9011Enabled field = "Enabled", isHip9011Enabled

View File

@ -33,12 +33,12 @@ enable2ndByteCanID = false
[MegaTune] [MegaTune]
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
signature = "rusEFI 2020.12.04.kin.3040749611" signature = "rusEFI 2020.12.09.kin.3458233256"
[TunerStudio] [TunerStudio]
queryCommand = "S" queryCommand = "S"
versionInfo = "V" ; firmwave version for title bar. versionInfo = "V" ; firmwave version for title bar.
signature = "rusEFI 2020.12.04.kin.3040749611" ; signature is expected to be 7 or more characters. signature = "rusEFI 2020.12.09.kin.3458233256" ; signature is expected to be 7 or more characters.
[Constants] [Constants]
; new packet serial format with CRC ; new packet serial format with CRC
@ -74,11 +74,11 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code ; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START ; CONFIG_DEFINITION_START
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Fri Dec 04 16:38:41 UTC 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Wed Dec 09 02:10:29 UTC 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "CHEVY_C20_1973", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "MRE_SUBARU_EJ18", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0 engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0
injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2 injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2
injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2
@ -1174,8 +1174,9 @@ page = 1
tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted"
alignmentFill_at_4523 = scalar, U08, 4523, "units", 1.0, 0, -20, 100, 0 knockBaseNoise = array, S08, 4523, [16], "dB", 1.0, 0, -30.0, 0, 2
mainUnusedEnd = array, S32, 4524, [369], "units", 1.0, 0, -20, 100, 0 alignmentFill_at_4539 = scalar, U08, 4539, "units", 1.0, 0, -20, 100, 0
mainUnusedEnd = array, S32, 4540, [365], "units", 1.0, 0, -20, 100, 0
warning_message = string, ASCII, 6000, 120 warning_message = string, ASCII, 6000, 120
afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0 afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0
afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1
@ -1266,7 +1267,7 @@ page = 1
injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min"
cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt"
etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode."
isDoubleSolenoidIdle = "Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position." isDoubleSolenoidIdle = "Subaru/BMW style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position."
cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed."
useCicPidForIdle = "Switch between Industrial and Cic PID implementation" useCicPidForIdle = "Switch between Industrial and Cic PID implementation"
absoluteFuelPressure = "If your fuel regulator does not have vacuum line" absoluteFuelPressure = "If your fuel regulator does not have vacuum line"
@ -1588,6 +1589,7 @@ page = 1
ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false";
ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false";
ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ind_pedal_error =bits, U32, 0, [26:26], "true", "false";
isTps2Error = bits, U32, 0, [29:29], "true", "false";
; RPM, vss ; RPM, vss
RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 RPMValue = scalar, U16, 4, "RPM", 1, 0.00000
@ -1923,6 +1925,14 @@ page = 1
yAxis = 0, 8, 10 yAxis = 0, 8, 10
xBins = knockNoiseRpmBins, RPMValue xBins = knockNoiseRpmBins, RPMValue
yBins = knockNoise yBins = knockNoise
gauge = RPMGauge
curve = swKnockThresholdCurve, "Engine knock threshold RPM based"
columnLabel = "RPM", "Threshold dB"
xAxis = 0, 8000, 10
yAxis = -30, 0, 10
xBins = ignitionRpmBins, RPMValue
yBins = knockBaseNoise
gauge = RPMGauge gauge = RPMGauge
curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation"
@ -2527,6 +2537,7 @@ gaugeCategory = DynoView
; error codes ; error codes
indicator = { isTpsError}, "tps", "tps error", white, black, red, black indicator = { isTpsError}, "tps", "tps error", white, black, red, black
indicator = { isTps2Error}, "tps 2", "tps 2 error", white, black, red, black
indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black
indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black
@ -3945,7 +3956,7 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Pin mode", malfunctionIndicatorPinMode field = "Pin mode", malfunctionIndicatorPinMode
field = "Warning Period", warningPeriod field = "Warning Period", warningPeriod
dialog = softwareKnock, "Software Knock" dialog = softwareKnockCfg, "Configuration"
field = "Enable", enableSoftwareKnock field = "Enable", enableSoftwareKnock
field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock} field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock}
field = "" field = ""
@ -3963,6 +3974,10 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11} field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11}
field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12} field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12}
dialog = softwareKnock, "Software Knock", border
panel = softwareKnockCfg, West
panel = swKnockThresholdCurve, Center
; Engine->hip9011 Settings ; Engine->hip9011 Settings
dialog = hipFunction, "HIP9011 Settings (knock decoder)" dialog = hipFunction, "HIP9011 Settings (knock decoder)"
field = "Enabled", isHip9011Enabled field = "Enabled", isHip9011Enabled

View File

@ -33,12 +33,12 @@ enable2ndByteCanID = false
[MegaTune] [MegaTune]
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
signature = "rusEFI 2020.12.04.mre_f4.973302379" signature = "rusEFI 2020.12.09.mre_f4.1092432360"
[TunerStudio] [TunerStudio]
queryCommand = "S" queryCommand = "S"
versionInfo = "V" ; firmwave version for title bar. versionInfo = "V" ; firmwave version for title bar.
signature = "rusEFI 2020.12.04.mre_f4.973302379" ; signature is expected to be 7 or more characters. signature = "rusEFI 2020.12.09.mre_f4.1092432360" ; signature is expected to be 7 or more characters.
[Constants] [Constants]
; new packet serial format with CRC ; new packet serial format with CRC
@ -74,11 +74,11 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code ; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START ; CONFIG_DEFINITION_START
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Dec 04 16:38:32 UTC 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Dec 09 02:10:19 UTC 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "CHEVY_C20_1973", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "MRE_SUBARU_EJ18", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0 engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0
injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2 injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2
injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2
@ -1174,8 +1174,9 @@ page = 1
tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted"
alignmentFill_at_4523 = scalar, U08, 4523, "units", 1.0, 0, -20, 100, 0 knockBaseNoise = array, S08, 4523, [16], "dB", 1.0, 0, -30.0, 0, 2
mainUnusedEnd = array, S32, 4524, [369], "units", 1.0, 0, -20, 100, 0 alignmentFill_at_4539 = scalar, U08, 4539, "units", 1.0, 0, -20, 100, 0
mainUnusedEnd = array, S32, 4540, [365], "units", 1.0, 0, -20, 100, 0
warning_message = string, ASCII, 6000, 120 warning_message = string, ASCII, 6000, 120
afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0 afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0
afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1
@ -1266,7 +1267,7 @@ page = 1
injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min"
cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt"
etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode."
isDoubleSolenoidIdle = "Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position." isDoubleSolenoidIdle = "Subaru/BMW style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position."
cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed."
useCicPidForIdle = "Switch between Industrial and Cic PID implementation" useCicPidForIdle = "Switch between Industrial and Cic PID implementation"
absoluteFuelPressure = "If your fuel regulator does not have vacuum line" absoluteFuelPressure = "If your fuel regulator does not have vacuum line"
@ -1588,6 +1589,7 @@ page = 1
ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false";
ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false";
ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ind_pedal_error =bits, U32, 0, [26:26], "true", "false";
isTps2Error = bits, U32, 0, [29:29], "true", "false";
; RPM, vss ; RPM, vss
RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 RPMValue = scalar, U16, 4, "RPM", 1, 0.00000
@ -1923,6 +1925,14 @@ page = 1
yAxis = 0, 8, 10 yAxis = 0, 8, 10
xBins = knockNoiseRpmBins, RPMValue xBins = knockNoiseRpmBins, RPMValue
yBins = knockNoise yBins = knockNoise
gauge = RPMGauge
curve = swKnockThresholdCurve, "Engine knock threshold RPM based"
columnLabel = "RPM", "Threshold dB"
xAxis = 0, 8000, 10
yAxis = -30, 0, 10
xBins = ignitionRpmBins, RPMValue
yBins = knockBaseNoise
gauge = RPMGauge gauge = RPMGauge
curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation"
@ -2527,6 +2537,7 @@ gaugeCategory = DynoView
; error codes ; error codes
indicator = { isTpsError}, "tps", "tps error", white, black, red, black indicator = { isTpsError}, "tps", "tps error", white, black, red, black
indicator = { isTps2Error}, "tps 2", "tps 2 error", white, black, red, black
indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black
indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black
@ -3927,7 +3938,7 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Pin mode", malfunctionIndicatorPinMode field = "Pin mode", malfunctionIndicatorPinMode
field = "Warning Period", warningPeriod field = "Warning Period", warningPeriod
dialog = softwareKnock, "Software Knock" dialog = softwareKnockCfg, "Configuration"
field = "Enable", enableSoftwareKnock field = "Enable", enableSoftwareKnock
field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock} field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock}
field = "" field = ""
@ -3945,6 +3956,10 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11} field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11}
field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12} field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12}
dialog = softwareKnock, "Software Knock", border
panel = softwareKnockCfg, West
panel = swKnockThresholdCurve, Center
; Engine->hip9011 Settings ; Engine->hip9011 Settings
dialog = hipFunction, "HIP9011 Settings (knock decoder)" dialog = hipFunction, "HIP9011 Settings (knock decoder)"
field = "Enabled", isHip9011Enabled field = "Enabled", isHip9011Enabled

View File

@ -33,12 +33,12 @@ enable2ndByteCanID = false
[MegaTune] [MegaTune]
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
signature = "rusEFI 2020.12.04.mre_f7.973302379" signature = "rusEFI 2020.12.09.mre_f7.1092432360"
[TunerStudio] [TunerStudio]
queryCommand = "S" queryCommand = "S"
versionInfo = "V" ; firmwave version for title bar. versionInfo = "V" ; firmwave version for title bar.
signature = "rusEFI 2020.12.04.mre_f7.973302379" ; signature is expected to be 7 or more characters. signature = "rusEFI 2020.12.09.mre_f7.1092432360" ; signature is expected to be 7 or more characters.
[Constants] [Constants]
; new packet serial format with CRC ; new packet serial format with CRC
@ -74,11 +74,11 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code ; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START ; CONFIG_DEFINITION_START
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Dec 04 16:38:31 UTC 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Dec 09 02:10:17 UTC 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "CHEVY_C20_1973", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "MRE_SUBARU_EJ18", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0 engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0
injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2 injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2
injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2
@ -1174,8 +1174,9 @@ page = 1
tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted"
alignmentFill_at_4523 = scalar, U08, 4523, "units", 1.0, 0, -20, 100, 0 knockBaseNoise = array, S08, 4523, [16], "dB", 1.0, 0, -30.0, 0, 2
mainUnusedEnd = array, S32, 4524, [369], "units", 1.0, 0, -20, 100, 0 alignmentFill_at_4539 = scalar, U08, 4539, "units", 1.0, 0, -20, 100, 0
mainUnusedEnd = array, S32, 4540, [365], "units", 1.0, 0, -20, 100, 0
warning_message = string, ASCII, 6000, 120 warning_message = string, ASCII, 6000, 120
afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0 afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0
afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1
@ -1266,7 +1267,7 @@ page = 1
injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min"
cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt"
etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode."
isDoubleSolenoidIdle = "Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position." isDoubleSolenoidIdle = "Subaru/BMW style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position."
cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed."
useCicPidForIdle = "Switch between Industrial and Cic PID implementation" useCicPidForIdle = "Switch between Industrial and Cic PID implementation"
absoluteFuelPressure = "If your fuel regulator does not have vacuum line" absoluteFuelPressure = "If your fuel regulator does not have vacuum line"
@ -1588,6 +1589,7 @@ page = 1
ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false";
ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false";
ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ind_pedal_error =bits, U32, 0, [26:26], "true", "false";
isTps2Error = bits, U32, 0, [29:29], "true", "false";
; RPM, vss ; RPM, vss
RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 RPMValue = scalar, U16, 4, "RPM", 1, 0.00000
@ -1923,6 +1925,14 @@ page = 1
yAxis = 0, 8, 10 yAxis = 0, 8, 10
xBins = knockNoiseRpmBins, RPMValue xBins = knockNoiseRpmBins, RPMValue
yBins = knockNoise yBins = knockNoise
gauge = RPMGauge
curve = swKnockThresholdCurve, "Engine knock threshold RPM based"
columnLabel = "RPM", "Threshold dB"
xAxis = 0, 8000, 10
yAxis = -30, 0, 10
xBins = ignitionRpmBins, RPMValue
yBins = knockBaseNoise
gauge = RPMGauge gauge = RPMGauge
curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation"
@ -2527,6 +2537,7 @@ gaugeCategory = DynoView
; error codes ; error codes
indicator = { isTpsError}, "tps", "tps error", white, black, red, black indicator = { isTpsError}, "tps", "tps error", white, black, red, black
indicator = { isTps2Error}, "tps 2", "tps 2 error", white, black, red, black
indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black
indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black
@ -3927,7 +3938,7 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Pin mode", malfunctionIndicatorPinMode field = "Pin mode", malfunctionIndicatorPinMode
field = "Warning Period", warningPeriod field = "Warning Period", warningPeriod
dialog = softwareKnock, "Software Knock" dialog = softwareKnockCfg, "Configuration"
field = "Enable", enableSoftwareKnock field = "Enable", enableSoftwareKnock
field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock} field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock}
field = "" field = ""
@ -3945,6 +3956,10 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11} field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11}
field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12} field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12}
dialog = softwareKnock, "Software Knock", border
panel = softwareKnockCfg, West
panel = swKnockThresholdCurve, Center
; Engine->hip9011 Settings ; Engine->hip9011 Settings
dialog = hipFunction, "HIP9011 Settings (knock decoder)" dialog = hipFunction, "HIP9011 Settings (knock decoder)"
field = "Enabled", isHip9011Enabled field = "Enabled", isHip9011Enabled

View File

@ -33,12 +33,12 @@ enable2ndByteCanID = false
[MegaTune] [MegaTune]
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
signature = "rusEFI 2020.12.04.prometheus_405.1863037507" signature = "rusEFI 2020.12.09.prometheus_405.336980416"
[TunerStudio] [TunerStudio]
queryCommand = "S" queryCommand = "S"
versionInfo = "V" ; firmwave version for title bar. versionInfo = "V" ; firmwave version for title bar.
signature = "rusEFI 2020.12.04.prometheus_405.1863037507" ; signature is expected to be 7 or more characters. signature = "rusEFI 2020.12.09.prometheus_405.336980416" ; signature is expected to be 7 or more characters.
[Constants] [Constants]
; new packet serial format with CRC ; new packet serial format with CRC
@ -74,11 +74,11 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code ; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START ; CONFIG_DEFINITION_START
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Dec 04 16:38:37 UTC 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Dec 09 02:10:24 UTC 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "CHEVY_C20_1973", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "MRE_SUBARU_EJ18", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0 engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0
injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2 injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2
injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2
@ -1174,8 +1174,9 @@ page = 1
tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted"
alignmentFill_at_4523 = scalar, U08, 4523, "units", 1.0, 0, -20, 100, 0 knockBaseNoise = array, S08, 4523, [16], "dB", 1.0, 0, -30.0, 0, 2
mainUnusedEnd = array, S32, 4524, [369], "units", 1.0, 0, -20, 100, 0 alignmentFill_at_4539 = scalar, U08, 4539, "units", 1.0, 0, -20, 100, 0
mainUnusedEnd = array, S32, 4540, [365], "units", 1.0, 0, -20, 100, 0
warning_message = string, ASCII, 6000, 120 warning_message = string, ASCII, 6000, 120
afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0 afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0
afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1
@ -1266,7 +1267,7 @@ page = 1
injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min"
cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt"
etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode."
isDoubleSolenoidIdle = "Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position." isDoubleSolenoidIdle = "Subaru/BMW style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position."
cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed."
useCicPidForIdle = "Switch between Industrial and Cic PID implementation" useCicPidForIdle = "Switch between Industrial and Cic PID implementation"
absoluteFuelPressure = "If your fuel regulator does not have vacuum line" absoluteFuelPressure = "If your fuel regulator does not have vacuum line"
@ -1588,6 +1589,7 @@ page = 1
ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false";
ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false";
ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ind_pedal_error =bits, U32, 0, [26:26], "true", "false";
isTps2Error = bits, U32, 0, [29:29], "true", "false";
; RPM, vss ; RPM, vss
RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 RPMValue = scalar, U16, 4, "RPM", 1, 0.00000
@ -1923,6 +1925,14 @@ page = 1
yAxis = 0, 8, 10 yAxis = 0, 8, 10
xBins = knockNoiseRpmBins, RPMValue xBins = knockNoiseRpmBins, RPMValue
yBins = knockNoise yBins = knockNoise
gauge = RPMGauge
curve = swKnockThresholdCurve, "Engine knock threshold RPM based"
columnLabel = "RPM", "Threshold dB"
xAxis = 0, 8000, 10
yAxis = -30, 0, 10
xBins = ignitionRpmBins, RPMValue
yBins = knockBaseNoise
gauge = RPMGauge gauge = RPMGauge
curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation"
@ -2527,6 +2537,7 @@ gaugeCategory = DynoView
; error codes ; error codes
indicator = { isTpsError}, "tps", "tps error", white, black, red, black indicator = { isTpsError}, "tps", "tps error", white, black, red, black
indicator = { isTps2Error}, "tps 2", "tps 2 error", white, black, red, black
indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black
indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black
@ -3940,7 +3951,7 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Pin mode", malfunctionIndicatorPinMode field = "Pin mode", malfunctionIndicatorPinMode
field = "Warning Period", warningPeriod field = "Warning Period", warningPeriod
dialog = softwareKnock, "Software Knock" dialog = softwareKnockCfg, "Configuration"
field = "Enable", enableSoftwareKnock field = "Enable", enableSoftwareKnock
field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock} field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock}
field = "" field = ""
@ -3958,6 +3969,10 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11} field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11}
field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12} field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12}
dialog = softwareKnock, "Software Knock", border
panel = softwareKnockCfg, West
panel = swKnockThresholdCurve, Center
; Engine->hip9011 Settings ; Engine->hip9011 Settings
dialog = hipFunction, "HIP9011 Settings (knock decoder)" dialog = hipFunction, "HIP9011 Settings (knock decoder)"
field = "Enabled", isHip9011Enabled field = "Enabled", isHip9011Enabled

View File

@ -33,12 +33,12 @@ enable2ndByteCanID = false
[MegaTune] [MegaTune]
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
signature = "rusEFI 2020.12.04.prometheus_469.1863037507" signature = "rusEFI 2020.12.09.prometheus_469.336980416"
[TunerStudio] [TunerStudio]
queryCommand = "S" queryCommand = "S"
versionInfo = "V" ; firmwave version for title bar. versionInfo = "V" ; firmwave version for title bar.
signature = "rusEFI 2020.12.04.prometheus_469.1863037507" ; signature is expected to be 7 or more characters. signature = "rusEFI 2020.12.09.prometheus_469.336980416" ; signature is expected to be 7 or more characters.
[Constants] [Constants]
; new packet serial format with CRC ; new packet serial format with CRC
@ -74,11 +74,11 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code ; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START ; CONFIG_DEFINITION_START
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Dec 04 16:38:35 UTC 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Dec 09 02:10:22 UTC 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "CHEVY_C20_1973", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "MRE_SUBARU_EJ18", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0 engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0
injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2 injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2
injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2
@ -1174,8 +1174,9 @@ page = 1
tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted"
alignmentFill_at_4523 = scalar, U08, 4523, "units", 1.0, 0, -20, 100, 0 knockBaseNoise = array, S08, 4523, [16], "dB", 1.0, 0, -30.0, 0, 2
mainUnusedEnd = array, S32, 4524, [369], "units", 1.0, 0, -20, 100, 0 alignmentFill_at_4539 = scalar, U08, 4539, "units", 1.0, 0, -20, 100, 0
mainUnusedEnd = array, S32, 4540, [365], "units", 1.0, 0, -20, 100, 0
warning_message = string, ASCII, 6000, 120 warning_message = string, ASCII, 6000, 120
afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0 afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0
afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1
@ -1266,7 +1267,7 @@ page = 1
injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min"
cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt"
etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode."
isDoubleSolenoidIdle = "Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position." isDoubleSolenoidIdle = "Subaru/BMW style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position."
cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed."
useCicPidForIdle = "Switch between Industrial and Cic PID implementation" useCicPidForIdle = "Switch between Industrial and Cic PID implementation"
absoluteFuelPressure = "If your fuel regulator does not have vacuum line" absoluteFuelPressure = "If your fuel regulator does not have vacuum line"
@ -1588,6 +1589,7 @@ page = 1
ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false";
ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false";
ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ind_pedal_error =bits, U32, 0, [26:26], "true", "false";
isTps2Error = bits, U32, 0, [29:29], "true", "false";
; RPM, vss ; RPM, vss
RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 RPMValue = scalar, U16, 4, "RPM", 1, 0.00000
@ -1923,6 +1925,14 @@ page = 1
yAxis = 0, 8, 10 yAxis = 0, 8, 10
xBins = knockNoiseRpmBins, RPMValue xBins = knockNoiseRpmBins, RPMValue
yBins = knockNoise yBins = knockNoise
gauge = RPMGauge
curve = swKnockThresholdCurve, "Engine knock threshold RPM based"
columnLabel = "RPM", "Threshold dB"
xAxis = 0, 8000, 10
yAxis = -30, 0, 10
xBins = ignitionRpmBins, RPMValue
yBins = knockBaseNoise
gauge = RPMGauge gauge = RPMGauge
curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation"
@ -2527,6 +2537,7 @@ gaugeCategory = DynoView
; error codes ; error codes
indicator = { isTpsError}, "tps", "tps error", white, black, red, black indicator = { isTpsError}, "tps", "tps error", white, black, red, black
indicator = { isTps2Error}, "tps 2", "tps 2 error", white, black, red, black
indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black
indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black
@ -3940,7 +3951,7 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Pin mode", malfunctionIndicatorPinMode field = "Pin mode", malfunctionIndicatorPinMode
field = "Warning Period", warningPeriod field = "Warning Period", warningPeriod
dialog = softwareKnock, "Software Knock" dialog = softwareKnockCfg, "Configuration"
field = "Enable", enableSoftwareKnock field = "Enable", enableSoftwareKnock
field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock} field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock}
field = "" field = ""
@ -3958,6 +3969,10 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11} field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11}
field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12} field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12}
dialog = softwareKnock, "Software Knock", border
panel = softwareKnockCfg, West
panel = swKnockThresholdCurve, Center
; Engine->hip9011 Settings ; Engine->hip9011 Settings
dialog = hipFunction, "HIP9011 Settings (knock decoder)" dialog = hipFunction, "HIP9011 Settings (knock decoder)"
field = "Enabled", isHip9011Enabled field = "Enabled", isHip9011Enabled

View File

@ -33,12 +33,12 @@ enable2ndByteCanID = false
[MegaTune] [MegaTune]
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
signature = "rusEFI 2020.12.04.proteus_f4.3833200332" signature = "rusEFI 2020.12.09.proteus_f4.2674369871"
[TunerStudio] [TunerStudio]
queryCommand = "S" queryCommand = "S"
versionInfo = "V" ; firmwave version for title bar. versionInfo = "V" ; firmwave version for title bar.
signature = "rusEFI 2020.12.04.proteus_f4.3833200332" ; signature is expected to be 7 or more characters. signature = "rusEFI 2020.12.09.proteus_f4.2674369871" ; signature is expected to be 7 or more characters.
[Constants] [Constants]
; new packet serial format with CRC ; new packet serial format with CRC
@ -74,11 +74,11 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code ; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START ; CONFIG_DEFINITION_START
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Dec 04 16:38:40 UTC 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Dec 09 02:10:27 UTC 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "CHEVY_C20_1973", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "MRE_SUBARU_EJ18", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0 engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0
injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2 injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2
injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2
@ -1174,8 +1174,9 @@ page = 1
tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted"
alignmentFill_at_4523 = scalar, U08, 4523, "units", 1.0, 0, -20, 100, 0 knockBaseNoise = array, S08, 4523, [16], "dB", 1.0, 0, -30.0, 0, 2
mainUnusedEnd = array, S32, 4524, [369], "units", 1.0, 0, -20, 100, 0 alignmentFill_at_4539 = scalar, U08, 4539, "units", 1.0, 0, -20, 100, 0
mainUnusedEnd = array, S32, 4540, [365], "units", 1.0, 0, -20, 100, 0
warning_message = string, ASCII, 6000, 120 warning_message = string, ASCII, 6000, 120
afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0 afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0
afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1
@ -1266,7 +1267,7 @@ page = 1
injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min"
cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt"
etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode."
isDoubleSolenoidIdle = "Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position." isDoubleSolenoidIdle = "Subaru/BMW style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position."
cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed."
useCicPidForIdle = "Switch between Industrial and Cic PID implementation" useCicPidForIdle = "Switch between Industrial and Cic PID implementation"
absoluteFuelPressure = "If your fuel regulator does not have vacuum line" absoluteFuelPressure = "If your fuel regulator does not have vacuum line"
@ -1588,6 +1589,7 @@ page = 1
ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false";
ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false";
ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ind_pedal_error =bits, U32, 0, [26:26], "true", "false";
isTps2Error = bits, U32, 0, [29:29], "true", "false";
; RPM, vss ; RPM, vss
RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 RPMValue = scalar, U16, 4, "RPM", 1, 0.00000
@ -1923,6 +1925,14 @@ page = 1
yAxis = 0, 8, 10 yAxis = 0, 8, 10
xBins = knockNoiseRpmBins, RPMValue xBins = knockNoiseRpmBins, RPMValue
yBins = knockNoise yBins = knockNoise
gauge = RPMGauge
curve = swKnockThresholdCurve, "Engine knock threshold RPM based"
columnLabel = "RPM", "Threshold dB"
xAxis = 0, 8000, 10
yAxis = -30, 0, 10
xBins = ignitionRpmBins, RPMValue
yBins = knockBaseNoise
gauge = RPMGauge gauge = RPMGauge
curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation"
@ -2527,6 +2537,7 @@ gaugeCategory = DynoView
; error codes ; error codes
indicator = { isTpsError}, "tps", "tps error", white, black, red, black indicator = { isTpsError}, "tps", "tps error", white, black, red, black
indicator = { isTps2Error}, "tps 2", "tps 2 error", white, black, red, black
indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black
indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black
@ -3921,7 +3932,7 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Pin mode", malfunctionIndicatorPinMode field = "Pin mode", malfunctionIndicatorPinMode
field = "Warning Period", warningPeriod field = "Warning Period", warningPeriod
dialog = softwareKnock, "Software Knock" dialog = softwareKnockCfg, "Configuration"
field = "Enable", enableSoftwareKnock field = "Enable", enableSoftwareKnock
field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock} field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock}
field = "" field = ""
@ -3939,6 +3950,10 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11} field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11}
field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12} field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12}
dialog = softwareKnock, "Software Knock", border
panel = softwareKnockCfg, West
panel = swKnockThresholdCurve, Center
; Engine->hip9011 Settings ; Engine->hip9011 Settings
dialog = hipFunction, "HIP9011 Settings (knock decoder)" dialog = hipFunction, "HIP9011 Settings (knock decoder)"
field = "Enabled", isHip9011Enabled field = "Enabled", isHip9011Enabled

View File

@ -33,12 +33,12 @@ enable2ndByteCanID = false
[MegaTune] [MegaTune]
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
signature = "rusEFI 2020.12.04.proteus_f7.3833200332" signature = "rusEFI 2020.12.09.proteus_f7.2674369871"
[TunerStudio] [TunerStudio]
queryCommand = "S" queryCommand = "S"
versionInfo = "V" ; firmwave version for title bar. versionInfo = "V" ; firmwave version for title bar.
signature = "rusEFI 2020.12.04.proteus_f7.3833200332" ; signature is expected to be 7 or more characters. signature = "rusEFI 2020.12.09.proteus_f7.2674369871" ; signature is expected to be 7 or more characters.
[Constants] [Constants]
; new packet serial format with CRC ; new packet serial format with CRC
@ -74,11 +74,11 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code ; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START ; CONFIG_DEFINITION_START
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Dec 04 16:38:38 UTC 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Dec 09 02:10:26 UTC 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "CHEVY_C20_1973", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" engineType = bits, S32, 0, [0:6], "DEFAULT_FRANKENSO", "MIATA_PROTEUS_TCU", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD_CD", "FORD_INLINE_6_1995", "GY6_139QMB", "MAZDA_MIATA_NB1", "ROVER_V8", "MRE_MIATA_NB2_MAP", "MRE_MIATA_NA6_VAF", "MRE_MIATA_NB2_ETB", "FORD_ESCORT_GT", "MRE_MIATA_NB2_MAF", "MITSU_4G93", "HONDA_ACCORD_CD_TWO_WIRES", "HONDA_ACCORD_CD_DIP", "MIATA_1990", "MRE_MIATA_94_MAP", "MIATA_1996", "SUBARU_2003_WRX", "MRE_BODY_CONTROL", "BMW_M73_M", "BMW_E34", "TEST_ENGINE", "ISSUE_898", "MAZDA_626", "SACHS", "MRE_BOARD_OLD_TEST", "MRE_BOARD_NEW_TEST", "VW_ABA", "UNUSED_33", "UNUSED_34", "CAMARO_4", "UNUSED_36", "MRE_SUBARU_EJ18", "TOYOTA_JZS147", "LADA_KALINA", "BMW_M73_F", "MIATA_NA6_MAP", "ZIL_130", "HONDA_600", "TOYOTA_2JZ_GTE_VVTi", "TEST_ENGINE_VVT", "DODGE_NEON_2003_CRANK", "MAZDA_MIATA_2003", "HONDA_ACCORD_1_24_SHIFTED", "FRANKENSO_QA_ENGINE", "TEST_CIVIC_4_0_BOTH", "TEST_CIVIC_4_0_RISE", "TEST_ISSUE_366_BOTH", "TEST_ISSUE_366_RISE", "MAZDA_MIATA_2003_NA_RAIL", "MAZDA_MIATA_2003_BOARD_TEST", "MAZDA_MIATA_NA8", "MIATA_NA6_VAF", "ETB_BENCH_ENGINE", "TLE8888_BENCH_ENGINE", "MICRO_RUS_EFI", "PROTEUS", "VW_B6", "BMW_M73_PROTEUS", "DODGE_RAM", "CITROEN_TU3JP", "MRE_MIATA_NA6_MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MINIMAL_PINS", "PROMETHEUS_DEFAULTS", "SUBARUEJ20G_DEFAULTS", "VAG_18_TURBO", "TEST_33816", "BMW_M73_MRE", "BMW_M73_MRE_SLAVE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0 engineSnifferRpmThreshold = scalar, S32, 4, "RPM", 1.0, 0, 0,30000, 0
injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2 injector_flow = scalar, F32, 8, "cm3/min", 1.0, 0, 0, 99999, 2
injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1.0, 0, 0.0, 20.0, 2
@ -1174,8 +1174,9 @@ page = 1
tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode4 = bits, U08, 4520, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode5 = bits, U08, 4521, [0:1], "default", "default inverted", "open collector", "open collector inverted"
tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted" tcu_solenoid_mode6 = bits, U08, 4522, [0:1], "default", "default inverted", "open collector", "open collector inverted"
alignmentFill_at_4523 = scalar, U08, 4523, "units", 1.0, 0, -20, 100, 0 knockBaseNoise = array, S08, 4523, [16], "dB", 1.0, 0, -30.0, 0, 2
mainUnusedEnd = array, S32, 4524, [369], "units", 1.0, 0, -20, 100, 0 alignmentFill_at_4539 = scalar, U08, 4539, "units", 1.0, 0, -20, 100, 0
mainUnusedEnd = array, S32, 4540, [365], "units", 1.0, 0, -20, 100, 0
warning_message = string, ASCII, 6000, 120 warning_message = string, ASCII, 6000, 120
afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0 afterstartCoolantBins = array, F32, 6120, [8], "C", 1.0, 0, -100.0, 250.0, 0
afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1 afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1.0, 0, 0, 100, 1
@ -1266,7 +1267,7 @@ page = 1
injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min"
cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider? Ua can go over 3.3v but only at lambda >3, i.e very lean AFR above 44.1\nWhen exposed to free air and 17x gain, Ua will be 4.17 volt"
etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode."
isDoubleSolenoidIdle = "Subaru style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position." isDoubleSolenoidIdle = "Subaru/BMW style where default valve position is somewhere in the middle. First solenoid opens it more while second can close it more than default position."
cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed."
useCicPidForIdle = "Switch between Industrial and Cic PID implementation" useCicPidForIdle = "Switch between Industrial and Cic PID implementation"
absoluteFuelPressure = "If your fuel regulator does not have vacuum line" absoluteFuelPressure = "If your fuel regulator does not have vacuum line"
@ -1588,6 +1589,7 @@ page = 1
ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false";
ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false";
ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ind_pedal_error =bits, U32, 0, [26:26], "true", "false";
isTps2Error = bits, U32, 0, [29:29], "true", "false";
; RPM, vss ; RPM, vss
RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 RPMValue = scalar, U16, 4, "RPM", 1, 0.00000
@ -1923,6 +1925,14 @@ page = 1
yAxis = 0, 8, 10 yAxis = 0, 8, 10
xBins = knockNoiseRpmBins, RPMValue xBins = knockNoiseRpmBins, RPMValue
yBins = knockNoise yBins = knockNoise
gauge = RPMGauge
curve = swKnockThresholdCurve, "Engine knock threshold RPM based"
columnLabel = "RPM", "Threshold dB"
xAxis = 0, 8000, 10
yAxis = -30, 0, 10
xBins = ignitionRpmBins, RPMValue
yBins = knockBaseNoise
gauge = RPMGauge gauge = RPMGauge
curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation"
@ -2527,6 +2537,7 @@ gaugeCategory = DynoView
; error codes ; error codes
indicator = { isTpsError}, "tps", "tps error", white, black, red, black indicator = { isTpsError}, "tps", "tps error", white, black, red, black
indicator = { isTps2Error}, "tps 2", "tps 2 error", white, black, red, black
indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black
indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black
@ -3921,7 +3932,7 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Pin mode", malfunctionIndicatorPinMode field = "Pin mode", malfunctionIndicatorPinMode
field = "Warning Period", warningPeriod field = "Warning Period", warningPeriod
dialog = softwareKnock, "Software Knock" dialog = softwareKnockCfg, "Configuration"
field = "Enable", enableSoftwareKnock field = "Enable", enableSoftwareKnock
field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock} field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock}
field = "" field = ""
@ -3939,6 +3950,10 @@ cmd_set_engine_type_default = "Z\x00\x31\x00\x00"
field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11} field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11}
field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12} field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12}
dialog = softwareKnock, "Software Knock", border
panel = softwareKnockCfg, West
panel = swKnockThresholdCurve, Center
; Engine->hip9011 Settings ; Engine->hip9011 Settings
dialog = hipFunction, "HIP9011 Settings (knock decoder)" dialog = hipFunction, "HIP9011 Settings (knock decoder)"
field = "Enabled", isHip9011Enabled field = "Enabled", isHip9011Enabled

View File

@ -204,6 +204,7 @@ enable2ndByteCanID = false
ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false";
ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false";
ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ind_pedal_error =bits, U32, 0, [26:26], "true", "false";
isTps2Error = bits, U32, 0, [29:29], "true", "false";
; RPM, vss ; RPM, vss
RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 RPMValue = scalar, U16, 4, "RPM", 1, 0.00000
@ -539,6 +540,14 @@ enable2ndByteCanID = false
yAxis = 0, 8, 10 yAxis = 0, 8, 10
xBins = knockNoiseRpmBins, RPMValue xBins = knockNoiseRpmBins, RPMValue
yBins = knockNoise yBins = knockNoise
gauge = RPMGauge
curve = swKnockThresholdCurve, "Engine knock threshold RPM based"
columnLabel = "RPM", "Threshold dB"
xAxis = 0, 8000, 10
yAxis = -30, 0, 10
xBins = ignitionRpmBins, RPMValue
yBins = knockBaseNoise
gauge = RPMGauge gauge = RPMGauge
curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation" curve = narrowToWideOxygenCurve, "Narrow to Wideband approximation"
@ -1143,6 +1152,7 @@ gaugeCategory = DynoView
; error codes ; error codes
indicator = { isTpsError}, "tps", "tps error", white, black, red, black indicator = { isTpsError}, "tps", "tps error", white, black, red, black
indicator = { isTps2Error}, "tps 2", "tps 2 error", white, black, red, black
indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black
indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black
@ -2552,7 +2562,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
field = "Pin mode", malfunctionIndicatorPinMode field = "Pin mode", malfunctionIndicatorPinMode
field = "Warning Period", warningPeriod field = "Warning Period", warningPeriod
dialog = softwareKnock, "Software Knock" dialog = softwareKnockCfg, "Configuration"
field = "Enable", enableSoftwareKnock field = "Enable", enableSoftwareKnock
field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock} field = "Knock filter frequency", knockBandCustom, {enableSoftwareKnock}
field = "" field = ""
@ -2570,6 +2580,10 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11} field = "Cylinder 11", knockBankCyl11, {enableSoftwareKnock && cylindersCount >= 11}
field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12} field = "Cylinder 12", knockBankCyl12, {enableSoftwareKnock && cylindersCount >= 12}
dialog = softwareKnock, "Software Knock", border
panel = softwareKnockCfg, West
panel = swKnockThresholdCurve, Center
; Engine->hip9011 Settings ; Engine->hip9011 Settings
dialog = hipFunction, "HIP9011 Settings (knock decoder)" dialog = hipFunction, "HIP9011 Settings (knock decoder)"
field = "Enabled", isHip9011Enabled field = "Enabled", isHip9011Enabled

View File

@ -35,7 +35,7 @@ float efiFloor(float value, float precision) {
*/ */
float efiRound(float value, float precision) { float efiRound(float value, float precision) {
efiAssert(CUSTOM_ERR_ASSERT, precision != 0, "zero precision", NAN); efiAssert(CUSTOM_ERR_ASSERT, precision != 0, "zero precision", NAN);
float a = rintf (value / precision); float a = round(value / precision);
return fixNegativeZero(a * precision); return fixNegativeZero(a * precision);
} }

View File

@ -93,7 +93,7 @@ float tanf_taylor(float theta);
#include <cstddef> #include <cstddef>
#define IS_NEGATIVE_ZERO(value) (std::signbit(value) && value==0) #define IS_NEGATIVE_ZERO(value) (__builtin_signbit(value) && value==0)
#define fixNegativeZero(value) (IS_NEGATIVE_ZERO(value) ? 0 : value) #define fixNegativeZero(value) (IS_NEGATIVE_ZERO(value) ? 0 : value)
// C++ helpers go here // C++ helpers go here

View File

@ -31,7 +31,11 @@ bool Timer::hasElapsedUs(float microseconds) const {
} }
float Timer::getElapsedSeconds() const { float Timer::getElapsedSeconds() const {
auto delta = getTimeNowNt() - m_lastReset; return getElapsedSeconds(getTimeNowNt());
}
float Timer::getElapsedSeconds(efitick_t nowNt) const {
auto delta = nowNt - m_lastReset;
if (delta > UINT32_MAX - 1) { if (delta > UINT32_MAX - 1) {
delta = UINT32_MAX - 1; delta = UINT32_MAX - 1;
@ -39,5 +43,13 @@ float Timer::getElapsedSeconds() const {
auto delta32 = (uint32_t)delta; auto delta32 = (uint32_t)delta;
return NT2US(delta32); return 1e-6 * NT2US(delta32);
}
float Timer::getElapsedSecondsAndReset(efitick_t nowNt) {
float result = getElapsedSeconds(nowNt);
reset(nowNt);
return result;
} }

View File

@ -17,7 +17,13 @@ public:
// If the elapsed time is longer than 2^32 timer tick counts, // If the elapsed time is longer than 2^32 timer tick counts,
// then a time period representing 2^32 counts will be returned. // then a time period representing 2^32 counts will be returned.
float getElapsedSeconds() const; float getElapsedSeconds() const;
float getElapsedSeconds(efitick_t nowNt) const;
// Perform an atomic update event based on the passed timestamp,
// returning the delta between the last reset and the provided timestamp
float getElapsedSecondsAndReset(efitick_t nowNt);
private: private:
efitick_t m_lastReset = INT64_MIN; // Use not-quite-minimum value to avoid overflow
efitick_t m_lastReset = INT64_MIN / 8;
}; };

Some files were not shown because too many files have changed in this diff Show More