Merge remote-tracking branch 'origin/master'

# Conflicts:
#	firmware/tunerstudio/rusefi.ini
#	firmware/tunerstudio/rusefi_frankenso.ini
#	firmware/tunerstudio/rusefi_microrusefi.ini
#	firmware/tunerstudio/rusefi_prometheus.ini
#	firmware/tunerstudio/rusefi_proteus.ini
This commit is contained in:
rusefi 2020-04-15 20:28:09 -04:00
commit d73e21a289
22 changed files with 130 additions and 97 deletions

View File

@ -1,4 +1,4 @@
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Mon Apr 13 18:54:34 EDT 2020 // this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Wed Apr 15 18:17:28 EDT 2020
// by class com.rusefi.output.CHeaderConsumer // by class com.rusefi.output.CHeaderConsumer
// begin // begin
#ifndef CONFIG_BOARDS_KINETIS_CONFIG_CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H #ifndef CONFIG_BOARDS_KINETIS_CONFIG_CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H
@ -672,7 +672,7 @@ struct engine_configuration_s {
bool useRunningMathForCranking : 1; bool useRunningMathForCranking : 1;
/** /**
offset 76 bit 24 */ offset 76 bit 24 */
bool issue_294_25 : 1; bool displayLogicLevelsInEngineSniffer : 1;
/** /**
offset 76 bit 25 */ offset 76 bit 25 */
bool issue_294_26 : 1; bool issue_294_26 : 1;
@ -3336,4 +3336,4 @@ typedef struct persistent_config_s persistent_config_s;
#endif #endif
// end // end
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Mon Apr 13 18:54:34 EDT 2020 // this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Wed Apr 15 18:17:28 EDT 2020

View File

@ -525,6 +525,8 @@
#define directSelfStimulation_offset_hex 4c #define directSelfStimulation_offset_hex 4c
#define displacement_offset 396 #define displacement_offset 396
#define displacement_offset_hex 18c #define displacement_offset_hex 18c
#define displayLogicLevelsInEngineSniffer_offset 76
#define displayLogicLevelsInEngineSniffer_offset_hex 4c
#define displayMode_offset 492 #define displayMode_offset 492
#define displayMode_offset_hex 1ec #define displayMode_offset_hex 1ec
#define dizzySparkOutputPin_offset 2226 #define dizzySparkOutputPin_offset 2226
@ -1375,8 +1377,6 @@
#define isMapAveragingEnabled_offset_hex 5c4 #define isMapAveragingEnabled_offset_hex 5c4
#define isSdCardEnabled_offset 744 #define isSdCardEnabled_offset 744
#define isSdCardEnabled_offset_hex 2e8 #define isSdCardEnabled_offset_hex 2e8
#define issue_294_25_offset 76
#define issue_294_25_offset_hex 4c
#define issue_294_26_offset 76 #define issue_294_26_offset 76
#define issue_294_26_offset_hex 4c #define issue_294_26_offset_hex 4c
#define issue_294_27_offset 76 #define issue_294_27_offset 76

View File

@ -258,9 +258,10 @@ static void handleCommandX14(uint16_t index) {
case 0xB: case 0xB:
starterRelayBench(); starterRelayBench();
return; return;
case 0xC:
engine->etbAutoTune = true;
return;
} }
} }
// todo: this is probably a wrong place for this method now // todo: this is probably a wrong place for this method now

View File

@ -121,9 +121,9 @@ float getEngineValue(le_action_e action DECLARE_ENGINE_PARAMETER_SUFFIX) {
case LE_METHOD_AC_TOGGLE: case LE_METHOD_AC_TOGGLE:
return getAcToggle(PASS_ENGINE_PARAMETER_SIGNATURE); return getAcToggle(PASS_ENGINE_PARAMETER_SIGNATURE);
case LE_METHOD_COOLANT: case LE_METHOD_COOLANT:
return getCoolantTemperature(); return Sensor::get(SensorType::Clt).value_or(0);
case LE_METHOD_IS_COOLANT_BROKEN: case LE_METHOD_IS_COOLANT_BROKEN:
return engine->isCltBroken; return !Sensor::get(SensorType::Clt).Valid;
case LE_METHOD_INTAKE_AIR: case LE_METHOD_INTAKE_AIR:
return getIntakeAirTemperature(); return getIntakeAirTemperature();
case LE_METHOD_RPM: case LE_METHOD_RPM:

View File

@ -1,4 +1,4 @@
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Apr 13 18:54:18 EDT 2020 // this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Wed Apr 15 18:17:04 EDT 2020
// by class com.rusefi.output.CHeaderConsumer // by class com.rusefi.output.CHeaderConsumer
// begin // begin
#ifndef CONTROLLERS_GENERATED_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H #ifndef CONTROLLERS_GENERATED_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H
@ -672,7 +672,7 @@ struct engine_configuration_s {
bool useRunningMathForCranking : 1; bool useRunningMathForCranking : 1;
/** /**
offset 76 bit 24 */ offset 76 bit 24 */
bool issue_294_25 : 1; bool displayLogicLevelsInEngineSniffer : 1;
/** /**
offset 76 bit 25 */ offset 76 bit 25 */
bool issue_294_26 : 1; bool issue_294_26 : 1;
@ -3336,4 +3336,4 @@ typedef struct persistent_config_s persistent_config_s;
#endif #endif
// end // end
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Apr 13 18:54:18 EDT 2020 // this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Wed Apr 15 18:17:04 EDT 2020

View File

@ -525,6 +525,8 @@
#define directSelfStimulation_offset_hex 4c #define directSelfStimulation_offset_hex 4c
#define displacement_offset 396 #define displacement_offset 396
#define displacement_offset_hex 18c #define displacement_offset_hex 18c
#define displayLogicLevelsInEngineSniffer_offset 76
#define displayLogicLevelsInEngineSniffer_offset_hex 4c
#define displayMode_offset 492 #define displayMode_offset 492
#define displayMode_offset_hex 1ec #define displayMode_offset_hex 1ec
#define dizzySparkOutputPin_offset 2226 #define dizzySparkOutputPin_offset 2226
@ -1375,8 +1377,6 @@
#define isMapAveragingEnabled_offset_hex 5c4 #define isMapAveragingEnabled_offset_hex 5c4
#define isSdCardEnabled_offset 744 #define isSdCardEnabled_offset 744
#define isSdCardEnabled_offset_hex 2e8 #define isSdCardEnabled_offset_hex 2e8
#define issue_294_25_offset 76
#define issue_294_25_offset_hex 4c
#define issue_294_26_offset 76 #define issue_294_26_offset 76
#define issue_294_26_offset_hex 4c #define issue_294_26_offset_hex 4c
#define issue_294_27_offset 76 #define issue_294_27_offset 76

View File

@ -24,7 +24,7 @@
#include "trigger_simulator.h" #include "trigger_simulator.h"
#include "rpm_calculator.h" #include "rpm_calculator.h"
#include "tooth_logger.h"
#include "perf_trace.h" #include "perf_trace.h"
#if EFI_PROD_CODE #if EFI_PROD_CODE
@ -103,13 +103,33 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_
tc->vvtEventFallCounter++; tc->vvtEventFallCounter++;
} }
if (!CONFIG(displayLogicLevelsInEngineSniffer)) {
addEngineSnifferEvent(PROTOCOL_VVT_NAME, front == TV_RISE ? PROTOCOL_ES_UP : PROTOCOL_ES_DOWN);
}
addEngineSnifferEvent(PROTOCOL_VVT_NAME, front == TV_RISE ? PROTOCOL_ES_UP : PROTOCOL_ES_DOWN);
if (CONFIG(vvtCamSensorUseRise) ^ (front != TV_FALL)) { if (CONFIG(vvtCamSensorUseRise) ^ (front != TV_FALL)) {
return; return;
} }
if (CONFIG(displayLogicLevelsInEngineSniffer)) {
if (CONFIG(vvtCamSensorUseRise)) {
// todo: unify TS composite logger code with console Engine Sniffer
// todo: better API to reduce copy/paste?
LogTriggerTooth(SHAFT_SECONDARY_RISING, nowNt PASS_ENGINE_PARAMETER_SUFFIX);
LogTriggerTooth(SHAFT_SECONDARY_FALLING, nowNt PASS_ENGINE_PARAMETER_SUFFIX);
addEngineSnifferEvent(PROTOCOL_VVT_NAME, PROTOCOL_ES_UP);
addEngineSnifferEvent(PROTOCOL_VVT_NAME, PROTOCOL_ES_DOWN);
} else {
LogTriggerTooth(SHAFT_SECONDARY_FALLING, nowNt PASS_ENGINE_PARAMETER_SUFFIX);
LogTriggerTooth(SHAFT_SECONDARY_RISING, nowNt PASS_ENGINE_PARAMETER_SUFFIX);
addEngineSnifferEvent(PROTOCOL_VVT_NAME, PROTOCOL_ES_DOWN);
addEngineSnifferEvent(PROTOCOL_VVT_NAME, PROTOCOL_ES_UP);
}
}
floatus_t oneDegreeUs = engine->rpmCalculator.oneDegreeUs; floatus_t oneDegreeUs = engine->rpmCalculator.oneDegreeUs;
if (cisnan(oneDegreeUs)) { if (cisnan(oneDegreeUs)) {
// we are here if we are getting VVT position signals while engine is not running // we are here if we are getting VVT position signals while engine is not running

View File

@ -547,7 +547,8 @@ void TriggerState::decodeTriggerEvent(TriggerWaveform *triggerShape, const Trigg
scheduleMsg(logger, "index=%d NaN gap, you have noise issues?", scheduleMsg(logger, "index=%d NaN gap, you have noise issues?",
i); i);
} else { } else {
scheduleMsg(logger, "time=%d index=%d: gap=%.3f expected from %.3f to %.3f error=%s", scheduleMsg(logger, "rpm=%d time=%d index=%d: gap=%.3f expected from %.3f to %.3f error=%s",
GET_RPM(),
/* cast is needed to make sure we do not put 64 bit value to stack*/ (int)getTimeNowSeconds(), /* cast is needed to make sure we do not put 64 bit value to stack*/ (int)getTimeNowSeconds(),
i, i,
gap, gap,

View File

@ -30,7 +30,10 @@ static Logging *logger;
static void vvtRisingCallback(void *) { static void vvtRisingCallback(void *) {
efitick_t now = getTimeNowNt(); efitick_t now = getTimeNowNt();
#if EFI_TOOTH_LOGGER #if EFI_TOOTH_LOGGER
LogTriggerTooth(SHAFT_SECONDARY_RISING, now); if (!CONFIG(displayLogicLevelsInEngineSniffer)) {
// real physical fronts go into engine sniffer
LogTriggerTooth(SHAFT_SECONDARY_RISING, now);
}
#endif /* EFI_TOOTH_LOGGER */ #endif /* EFI_TOOTH_LOGGER */
hwHandleVvtCamSignal(TV_RISE, now); hwHandleVvtCamSignal(TV_RISE, now);
} }
@ -38,7 +41,9 @@ static void vvtRisingCallback(void *) {
static void vvtFallingCallback(void *) { static void vvtFallingCallback(void *) {
efitick_t now = getTimeNowNt(); efitick_t now = getTimeNowNt();
#if EFI_TOOTH_LOGGER #if EFI_TOOTH_LOGGER
LogTriggerTooth(SHAFT_SECONDARY_FALLING, now); if (!CONFIG(displayLogicLevelsInEngineSniffer)) {
LogTriggerTooth(SHAFT_SECONDARY_FALLING, now);
}
#endif /* EFI_TOOTH_LOGGER */ #endif /* EFI_TOOTH_LOGGER */
hwHandleVvtCamSignal(TV_FALL, now); hwHandleVvtCamSignal(TV_FALL, now);
} }

View File

@ -373,7 +373,7 @@ bit launchControlEnabled;
bit rollingLaunchEnabled; bit rollingLaunchEnabled;
bit antiLagEnabled; bit antiLagEnabled;
bit useRunningMathForCranking,Fuel Map,Fixed; bit useRunningMathForCranking,Fuel Map,Fixed;
bit issue_294_25; bit displayLogicLevelsInEngineSniffer;
bit issue_294_26; bit issue_294_26;
bit issue_294_27; bit issue_294_27;
bit issue_294_28; bit issue_294_28;

View File

@ -40,9 +40,6 @@ enable2ndByteCanID = false
; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. ; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement.
[MegaTune]
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
signature = "rusEFI v1.2020.3"
[TunerStudio] [TunerStudio]
queryCommand = "S" queryCommand = "S"
@ -89,7 +86,7 @@ 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.bat integration\rusefi_config.txt Wed Apr 15 17:02:46 EDT 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Wed Apr 15 18:23:16 EDT 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
@ -122,7 +119,7 @@ page = 1
rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true" rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true"
antiLagEnabled = bits, U32, 76, [22:22], "false", "true" antiLagEnabled = bits, U32, 76, [22:22], "false", "true"
useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map" useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map"
issue_294_25 = bits, U32, 76, [24:24], "false", "true" displayLogicLevelsInEngineSniffer= bits, U32, 76, [24:24], "false", "true"
issue_294_26 = bits, U32, 76, [25:25], "false", "true" issue_294_26 = bits, U32, 76, [25:25], "false", "true"
issue_294_27 = bits, U32, 76, [26:26], "false", "true" issue_294_27 = bits, U32, 76, [26:26], "false", "true"
issue_294_28 = bits, U32, 76, [27:27], "false", "true" issue_294_28 = bits, U32, 76, [27:27], "false", "true"
@ -2609,6 +2606,7 @@ cmd_tle8888_init = "w\x00\x14\x00\x08"
cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_test_ac_relay = "w\x00\x14\x00\x09"
cmd_write_config = "w\x00\x14\x00\x0A" cmd_write_config = "w\x00\x14\x00\x0A"
cmd_test_starter_relay = "w\x00\x14\x00\x0B" cmd_test_starter_relay = "w\x00\x14\x00\x0B"
cmd_etb_autotune = "w\x00\x14\x00\x0C"
cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_radiator_fan = "w\x00\x15\x00\x01"
cmd_test_check_engine_light = "w\x00\x16\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01"
@ -2746,6 +2744,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
field = "!Reminder that 4-stroke cycle is 720 degrees" field = "!Reminder that 4-stroke cycle is 720 degrees"
field = "!For well-known trigger types use '0' trigger angle offset" field = "!For well-known trigger types use '0' trigger angle offset"
field = "Trigger Angle Offset", globalTriggerAngleOffset field = "Trigger Angle Offset", globalTriggerAngleOffset
field = "Display only interesting", displayLogicLevelsInEngineSniffer
field = "#Custom Trigger" field = "#Custom Trigger"
field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0} field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0}
field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0} field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0}
@ -3896,6 +3895,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot
commandButton = "Pedal Up", cmd_calibrate_pedal_up commandButton = "Pedal Up", cmd_calibrate_pedal_up
commandButton = "Pedal Down", cmd_calibrate_pedal_down commandButton = "Pedal Down", cmd_calibrate_pedal_down
commandButton = "ETB PID Autotune", cmd_etb_autotune
dialog = etbDialog, "Electronic Throttle Body (beta)", border dialog = etbDialog, "Electronic Throttle Body (beta)", border
topicHelp = "etbHelp" topicHelp = "etbHelp"

View File

@ -1443,6 +1443,7 @@ cmd_tle8888_init = "w\x00\x14\x00\x08"
cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_test_ac_relay = "w\x00\x14\x00\x09"
cmd_write_config = "w\x00\x14\x00\x0A" cmd_write_config = "w\x00\x14\x00\x0A"
cmd_test_starter_relay = "w\x00\x14\x00\x0B" cmd_test_starter_relay = "w\x00\x14\x00\x0B"
cmd_etb_autotune = "w\x00\x14\x00\x0C"
cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_radiator_fan = "w\x00\x15\x00\x01"
cmd_test_check_engine_light = "w\x00\x16\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01"
@ -1580,6 +1581,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
field = "!Reminder that 4-stroke cycle is 720 degrees" field = "!Reminder that 4-stroke cycle is 720 degrees"
field = "!For well-known trigger types use '0' trigger angle offset" field = "!For well-known trigger types use '0' trigger angle offset"
field = "Trigger Angle Offset", globalTriggerAngleOffset field = "Trigger Angle Offset", globalTriggerAngleOffset
field = "Display only interesting", displayLogicLevelsInEngineSniffer
field = "#Custom Trigger" field = "#Custom Trigger"
field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0} field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0}
field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0} field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0}
@ -2731,6 +2733,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot
commandButton = "Pedal Up", cmd_calibrate_pedal_up commandButton = "Pedal Up", cmd_calibrate_pedal_up
commandButton = "Pedal Down", cmd_calibrate_pedal_down commandButton = "Pedal Down", cmd_calibrate_pedal_down
commandButton = "ETB PID Autotune", cmd_etb_autotune
dialog = etbDialog, "Electronic Throttle Body (beta)", border dialog = etbDialog, "Electronic Throttle Body (beta)", border
topicHelp = "etbHelp" topicHelp = "etbHelp"

View File

@ -40,9 +40,6 @@ enable2ndByteCanID = false
; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. ; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement.
[MegaTune]
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
signature = "rusEFI v1.2020.3"
[TunerStudio] [TunerStudio]
queryCommand = "S" queryCommand = "S"
@ -89,7 +86,7 @@ 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.bat integration\rusefi_config.txt Wed Apr 15 17:02:53 EDT 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Wed Apr 15 18:23:26 EDT 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
@ -122,7 +119,7 @@ page = 1
rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true" rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true"
antiLagEnabled = bits, U32, 76, [22:22], "false", "true" antiLagEnabled = bits, U32, 76, [22:22], "false", "true"
useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map" useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map"
issue_294_25 = bits, U32, 76, [24:24], "false", "true" displayLogicLevelsInEngineSniffer= bits, U32, 76, [24:24], "false", "true"
issue_294_26 = bits, U32, 76, [25:25], "false", "true" issue_294_26 = bits, U32, 76, [25:25], "false", "true"
issue_294_27 = bits, U32, 76, [26:26], "false", "true" issue_294_27 = bits, U32, 76, [26:26], "false", "true"
issue_294_28 = bits, U32, 76, [27:27], "false", "true" issue_294_28 = bits, U32, 76, [27:27], "false", "true"
@ -2609,6 +2606,7 @@ cmd_tle8888_init = "w\x00\x14\x00\x08"
cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_test_ac_relay = "w\x00\x14\x00\x09"
cmd_write_config = "w\x00\x14\x00\x0A" cmd_write_config = "w\x00\x14\x00\x0A"
cmd_test_starter_relay = "w\x00\x14\x00\x0B" cmd_test_starter_relay = "w\x00\x14\x00\x0B"
cmd_etb_autotune = "w\x00\x14\x00\x0C"
cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_radiator_fan = "w\x00\x15\x00\x01"
cmd_test_check_engine_light = "w\x00\x16\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01"
@ -2746,6 +2744,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
field = "!Reminder that 4-stroke cycle is 720 degrees" field = "!Reminder that 4-stroke cycle is 720 degrees"
field = "!For well-known trigger types use '0' trigger angle offset" field = "!For well-known trigger types use '0' trigger angle offset"
field = "Trigger Angle Offset", globalTriggerAngleOffset field = "Trigger Angle Offset", globalTriggerAngleOffset
field = "Display only interesting", displayLogicLevelsInEngineSniffer
field = "#Custom Trigger" field = "#Custom Trigger"
field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0} field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0}
field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0} field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0}
@ -3896,6 +3895,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot
commandButton = "Pedal Up", cmd_calibrate_pedal_up commandButton = "Pedal Up", cmd_calibrate_pedal_up
commandButton = "Pedal Down", cmd_calibrate_pedal_down commandButton = "Pedal Down", cmd_calibrate_pedal_down
commandButton = "ETB PID Autotune", cmd_etb_autotune
dialog = etbDialog, "Electronic Throttle Body (beta)", border dialog = etbDialog, "Electronic Throttle Body (beta)", border
topicHelp = "etbHelp" topicHelp = "etbHelp"

View File

@ -86,7 +86,7 @@ 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 kineris_gen_config.bat integration/rusefi_config.txt Mon Apr 13 20:23:18 EDT 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Wed Apr 15 18:17:28 EDT 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
@ -119,7 +119,7 @@ page = 1
rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true" rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true"
antiLagEnabled = bits, U32, 76, [22:22], "false", "true" antiLagEnabled = bits, U32, 76, [22:22], "false", "true"
useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map" useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map"
issue_294_25 = bits, U32, 76, [24:24], "false", "true" displayLogicLevelsInEngineSniffer= bits, U32, 76, [24:24], "false", "true"
issue_294_26 = bits, U32, 76, [25:25], "false", "true" issue_294_26 = bits, U32, 76, [25:25], "false", "true"
issue_294_27 = bits, U32, 76, [26:26], "false", "true" issue_294_27 = bits, U32, 76, [26:26], "false", "true"
issue_294_28 = bits, U32, 76, [27:27], "false", "true" issue_294_28 = bits, U32, 76, [27:27], "false", "true"
@ -2374,14 +2374,14 @@ menuDialog = main
subMenu = std_separator subMenu = std_separator
# Targets & closed loop # Targets & closed loop
subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)}
subMenu = fuelClosedLoopDialog, "Closed loop correction", 0, {isInjectionEnabled == 1} subMenu = fuelClosedLoopDialog, "Closed loop correction", 0, {isInjectionEnabled == 1}
subMenu = coastingFuelCutControl, "Deceleration fuel cutoff (DFCO)", 0, {isInjectionEnabled == 1} subMenu = coastingFuelCutControl, "Deceleration fuel cutoff (DFCO)", 0, {isInjectionEnabled == 1}
subMenu = std_separator subMenu = std_separator
# Fuel table/VE # Fuel table/VE
subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY} subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY && fuelAlgorithm != LM_REAL_MAF}
subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)}
subMenu = injPhaseTableTbl, "Injection phase", 0, {isInjectionEnabled == 1} subMenu = injPhaseTableTbl, "Injection phase", 0, {isInjectionEnabled == 1}
subMenu = std_separator subMenu = std_separator
@ -2743,6 +2743,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
field = "!Reminder that 4-stroke cycle is 720 degrees" field = "!Reminder that 4-stroke cycle is 720 degrees"
field = "!For well-known trigger types use '0' trigger angle offset" field = "!For well-known trigger types use '0' trigger angle offset"
field = "Trigger Angle Offset", globalTriggerAngleOffset field = "Trigger Angle Offset", globalTriggerAngleOffset
field = "Display only interesting", displayLogicLevelsInEngineSniffer
field = "#Custom Trigger" field = "#Custom Trigger"
field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0} field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0}
field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0} field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0}
@ -2937,6 +2938,9 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
field = mc33816_cs, mc33816_cs field = mc33816_cs, mc33816_cs
field = mc33816_rstb, mc33816_rstb field = mc33816_rstb, mc33816_rstb
field = mc33816_flag0, mc33816_flag0 field = mc33816_flag0, mc33816_flag0
field = "trigger stimulator pin #1", triggerSimulatorPins1
field = "trigger stimulator pin #2", triggerSimulatorPins2
field = "trigger stimulator pin #2", triggerSimulatorPins3
field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1 field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1
field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2 field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2
field = mc33816_driven, mc33816_driven field = mc33816_driven, mc33816_driven

View File

@ -40,9 +40,6 @@ enable2ndByteCanID = false
; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. ; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement.
[MegaTune]
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
signature = "rusEFI v1.2020.3"
[TunerStudio] [TunerStudio]
queryCommand = "S" queryCommand = "S"
@ -89,7 +86,7 @@ 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.bat integration\rusefi_config.txt Wed Apr 15 17:02:50 EDT 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Wed Apr 15 18:23:21 EDT 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
@ -122,7 +119,7 @@ page = 1
rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true" rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true"
antiLagEnabled = bits, U32, 76, [22:22], "false", "true" antiLagEnabled = bits, U32, 76, [22:22], "false", "true"
useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map" useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map"
issue_294_25 = bits, U32, 76, [24:24], "false", "true" displayLogicLevelsInEngineSniffer= bits, U32, 76, [24:24], "false", "true"
issue_294_26 = bits, U32, 76, [25:25], "false", "true" issue_294_26 = bits, U32, 76, [25:25], "false", "true"
issue_294_27 = bits, U32, 76, [26:26], "false", "true" issue_294_27 = bits, U32, 76, [26:26], "false", "true"
issue_294_28 = bits, U32, 76, [27:27], "false", "true" issue_294_28 = bits, U32, 76, [27:27], "false", "true"
@ -2601,6 +2598,7 @@ cmd_tle8888_init = "w\x00\x14\x00\x08"
cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_test_ac_relay = "w\x00\x14\x00\x09"
cmd_write_config = "w\x00\x14\x00\x0A" cmd_write_config = "w\x00\x14\x00\x0A"
cmd_test_starter_relay = "w\x00\x14\x00\x0B" cmd_test_starter_relay = "w\x00\x14\x00\x0B"
cmd_etb_autotune = "w\x00\x14\x00\x0C"
cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_radiator_fan = "w\x00\x15\x00\x01"
cmd_test_check_engine_light = "w\x00\x16\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01"
@ -2738,6 +2736,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
field = "!Reminder that 4-stroke cycle is 720 degrees" field = "!Reminder that 4-stroke cycle is 720 degrees"
field = "!For well-known trigger types use '0' trigger angle offset" field = "!For well-known trigger types use '0' trigger angle offset"
field = "Trigger Angle Offset", globalTriggerAngleOffset field = "Trigger Angle Offset", globalTriggerAngleOffset
field = "Display only interesting", displayLogicLevelsInEngineSniffer
field = "#Custom Trigger" field = "#Custom Trigger"
field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0} field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0}
field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0} field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0}
@ -3856,6 +3855,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot
commandButton = "Pedal Up", cmd_calibrate_pedal_up commandButton = "Pedal Up", cmd_calibrate_pedal_up
commandButton = "Pedal Down", cmd_calibrate_pedal_down commandButton = "Pedal Down", cmd_calibrate_pedal_down
commandButton = "ETB PID Autotune", cmd_etb_autotune
dialog = etbDialog, "Electronic Throttle Body (beta)", border dialog = etbDialog, "Electronic Throttle Body (beta)", border
topicHelp = "etbHelp" topicHelp = "etbHelp"

View File

@ -40,9 +40,6 @@ enable2ndByteCanID = false
; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. ; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement.
[MegaTune]
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
signature = "rusEFI v1.2020.3"
[TunerStudio] [TunerStudio]
queryCommand = "S" queryCommand = "S"
@ -89,7 +86,7 @@ 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.bat integration\rusefi_config.txt Wed Apr 15 17:02:56 EDT 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Wed Apr 15 18:23:31 EDT 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
@ -122,7 +119,7 @@ page = 1
rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true" rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true"
antiLagEnabled = bits, U32, 76, [22:22], "false", "true" antiLagEnabled = bits, U32, 76, [22:22], "false", "true"
useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map" useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map"
issue_294_25 = bits, U32, 76, [24:24], "false", "true" displayLogicLevelsInEngineSniffer= bits, U32, 76, [24:24], "false", "true"
issue_294_26 = bits, U32, 76, [25:25], "false", "true" issue_294_26 = bits, U32, 76, [25:25], "false", "true"
issue_294_27 = bits, U32, 76, [26:26], "false", "true" issue_294_27 = bits, U32, 76, [26:26], "false", "true"
issue_294_28 = bits, U32, 76, [27:27], "false", "true" issue_294_28 = bits, U32, 76, [27:27], "false", "true"
@ -2605,6 +2602,7 @@ cmd_tle8888_init = "w\x00\x14\x00\x08"
cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_test_ac_relay = "w\x00\x14\x00\x09"
cmd_write_config = "w\x00\x14\x00\x0A" cmd_write_config = "w\x00\x14\x00\x0A"
cmd_test_starter_relay = "w\x00\x14\x00\x0B" cmd_test_starter_relay = "w\x00\x14\x00\x0B"
cmd_etb_autotune = "w\x00\x14\x00\x0C"
cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_radiator_fan = "w\x00\x15\x00\x01"
cmd_test_check_engine_light = "w\x00\x16\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01"
@ -2742,6 +2740,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
field = "!Reminder that 4-stroke cycle is 720 degrees" field = "!Reminder that 4-stroke cycle is 720 degrees"
field = "!For well-known trigger types use '0' trigger angle offset" field = "!For well-known trigger types use '0' trigger angle offset"
field = "Trigger Angle Offset", globalTriggerAngleOffset field = "Trigger Angle Offset", globalTriggerAngleOffset
field = "Display only interesting", displayLogicLevelsInEngineSniffer
field = "#Custom Trigger" field = "#Custom Trigger"
field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0} field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0}
field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0} field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0}
@ -3892,6 +3891,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot
commandButton = "Pedal Up", cmd_calibrate_pedal_up commandButton = "Pedal Up", cmd_calibrate_pedal_up
commandButton = "Pedal Down", cmd_calibrate_pedal_down commandButton = "Pedal Down", cmd_calibrate_pedal_down
commandButton = "ETB PID Autotune", cmd_etb_autotune
dialog = etbDialog, "Electronic Throttle Body (beta)", border dialog = etbDialog, "Electronic Throttle Body (beta)", border
topicHelp = "etbHelp" topicHelp = "etbHelp"

View File

@ -40,9 +40,6 @@ enable2ndByteCanID = false
; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. ; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement.
[MegaTune]
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
signature = "rusEFI v1.2020.3"
[TunerStudio] [TunerStudio]
queryCommand = "S" queryCommand = "S"
@ -89,7 +86,7 @@ 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.bat integration\rusefi_config.txt Wed Apr 15 17:02:58 EDT 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Wed Apr 15 18:23:35 EDT 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
@ -122,7 +119,7 @@ page = 1
rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true" rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true"
antiLagEnabled = bits, U32, 76, [22:22], "false", "true" antiLagEnabled = bits, U32, 76, [22:22], "false", "true"
useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map" useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map"
issue_294_25 = bits, U32, 76, [24:24], "false", "true" displayLogicLevelsInEngineSniffer= bits, U32, 76, [24:24], "false", "true"
issue_294_26 = bits, U32, 76, [25:25], "false", "true" issue_294_26 = bits, U32, 76, [25:25], "false", "true"
issue_294_27 = bits, U32, 76, [26:26], "false", "true" issue_294_27 = bits, U32, 76, [26:26], "false", "true"
issue_294_28 = bits, U32, 76, [27:27], "false", "true" issue_294_28 = bits, U32, 76, [27:27], "false", "true"
@ -2601,6 +2598,7 @@ cmd_tle8888_init = "w\x00\x14\x00\x08"
cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_test_ac_relay = "w\x00\x14\x00\x09"
cmd_write_config = "w\x00\x14\x00\x0A" cmd_write_config = "w\x00\x14\x00\x0A"
cmd_test_starter_relay = "w\x00\x14\x00\x0B" cmd_test_starter_relay = "w\x00\x14\x00\x0B"
cmd_etb_autotune = "w\x00\x14\x00\x0C"
cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_radiator_fan = "w\x00\x15\x00\x01"
cmd_test_check_engine_light = "w\x00\x16\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01"
@ -2738,6 +2736,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
field = "!Reminder that 4-stroke cycle is 720 degrees" field = "!Reminder that 4-stroke cycle is 720 degrees"
field = "!For well-known trigger types use '0' trigger angle offset" field = "!For well-known trigger types use '0' trigger angle offset"
field = "Trigger Angle Offset", globalTriggerAngleOffset field = "Trigger Angle Offset", globalTriggerAngleOffset
field = "Display only interesting", displayLogicLevelsInEngineSniffer
field = "#Custom Trigger" field = "#Custom Trigger"
field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0} field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0}
field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0} field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0}
@ -3864,6 +3863,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot
commandButton = "Pedal Up", cmd_calibrate_pedal_up commandButton = "Pedal Up", cmd_calibrate_pedal_up
commandButton = "Pedal Down", cmd_calibrate_pedal_down commandButton = "Pedal Down", cmd_calibrate_pedal_down
commandButton = "ETB PID Autotune", cmd_etb_autotune
dialog = etbDialog, "Electronic Throttle Body (beta)", border dialog = etbDialog, "Electronic Throttle Body (beta)", border
topicHelp = "etbHelp" topicHelp = "etbHelp"

View File

@ -1,6 +1,6 @@
package com.rusefi.config.generated; package com.rusefi.config.generated;
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Apr 13 20:23:02 EDT 2020 // this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Wed Apr 15 18:17:04 EDT 2020
// by class com.rusefi.output.FileJavaFieldsConsumer // by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*; import com.rusefi.config.*;
@ -345,6 +345,7 @@ public class Fields {
public static final int digitalPotentiometerSpiDevice_offset = 677; public static final int digitalPotentiometerSpiDevice_offset = 677;
public static final int directSelfStimulation_offset = 76; public static final int directSelfStimulation_offset = 76;
public static final int displacement_offset = 396; public static final int displacement_offset = 396;
public static final int displayLogicLevelsInEngineSniffer_offset = 76;
public static final int displayMode_offset = 492; public static final int displayMode_offset = 492;
public static final int dizzySparkOutputPin_offset = 2226; public static final int dizzySparkOutputPin_offset = 2226;
public static final int dizzySparkOutputPinMode_offset = 2227; public static final int dizzySparkOutputPinMode_offset = 2227;
@ -914,7 +915,6 @@ public class Fields {
public static final int isManualSpinningMode_offset = 1476; public static final int isManualSpinningMode_offset = 1476;
public static final int isMapAveragingEnabled_offset = 1476; public static final int isMapAveragingEnabled_offset = 1476;
public static final int isSdCardEnabled_offset = 744; public static final int isSdCardEnabled_offset = 744;
public static final int issue_294_25_offset = 76;
public static final int issue_294_26_offset = 76; public static final int issue_294_26_offset = 76;
public static final int issue_294_27_offset = 76; public static final int issue_294_27_offset = 76;
public static final int issue_294_28_offset = 76; public static final int issue_294_28_offset = 76;
@ -1572,7 +1572,7 @@ public class Fields {
public static final Field ROLLINGLAUNCHENABLED = Field.create("ROLLINGLAUNCHENABLED", 76, FieldType.BIT, 21); public static final Field ROLLINGLAUNCHENABLED = Field.create("ROLLINGLAUNCHENABLED", 76, FieldType.BIT, 21);
public static final Field ANTILAGENABLED = Field.create("ANTILAGENABLED", 76, FieldType.BIT, 22); public static final Field ANTILAGENABLED = Field.create("ANTILAGENABLED", 76, FieldType.BIT, 22);
public static final Field USERUNNINGMATHFORCRANKING = Field.create("USERUNNINGMATHFORCRANKING", 76, FieldType.BIT, 23); public static final Field USERUNNINGMATHFORCRANKING = Field.create("USERUNNINGMATHFORCRANKING", 76, FieldType.BIT, 23);
public static final Field ISSUE_294_25 = Field.create("ISSUE_294_25", 76, FieldType.BIT, 24); public static final Field DISPLAYLOGICLEVELSINENGINESNIFFER = Field.create("DISPLAYLOGICLEVELSINENGINESNIFFER", 76, FieldType.BIT, 24);
public static final Field ISSUE_294_26 = Field.create("ISSUE_294_26", 76, FieldType.BIT, 25); public static final Field ISSUE_294_26 = Field.create("ISSUE_294_26", 76, FieldType.BIT, 25);
public static final Field ISSUE_294_27 = Field.create("ISSUE_294_27", 76, FieldType.BIT, 26); public static final Field ISSUE_294_27 = Field.create("ISSUE_294_27", 76, FieldType.BIT, 26);
public static final Field ISSUE_294_28 = Field.create("ISSUE_294_28", 76, FieldType.BIT, 27); public static final Field ISSUE_294_28 = Field.create("ISSUE_294_28", 76, FieldType.BIT, 27);
@ -2507,7 +2507,7 @@ public class Fields {
ROLLINGLAUNCHENABLED, ROLLINGLAUNCHENABLED,
ANTILAGENABLED, ANTILAGENABLED,
USERUNNINGMATHFORCRANKING, USERUNNINGMATHFORCRANKING,
ISSUE_294_25, DISPLAYLOGICLEVELSINENGINESNIFFER,
ISSUE_294_26, ISSUE_294_26,
ISSUE_294_27, ISSUE_294_27,
ISSUE_294_28, ISSUE_294_28,

View File

@ -76,7 +76,10 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType, configuration_callb
} }
EngineTestHelper::EngineTestHelper(engine_type_e engineType) : EngineTestHelper(engineType, &emptyCallbackWithConfiguration) { EngineTestHelper::EngineTestHelper(engine_type_e engineType, const std::unordered_map<SensorType, float>& sensorValues) : EngineTestHelper(engineType, &emptyCallbackWithConfiguration) {
for (const auto [s, v] : sensorValues) {
Sensor::setMockValue(s, v);
}
} }
EngineTestHelper::~EngineTestHelper() { EngineTestHelper::~EngineTestHelper() {

View File

@ -29,7 +29,7 @@ public:
*/ */
class EngineTestHelper : public EngineTestHelperBase { class EngineTestHelper : public EngineTestHelperBase {
public: public:
explicit EngineTestHelper(engine_type_e engineType); EngineTestHelper(engine_type_e engineType, const std::unordered_map<SensorType, float>& sensorValues);
EngineTestHelper(engine_type_e engineType, configuration_callback_t boardCallback); EngineTestHelper(engine_type_e engineType, configuration_callback_t boardCallback);
~EngineTestHelper(); ~EngineTestHelper();

View File

@ -87,8 +87,13 @@ void print(const char *fmt, ...);
Engine *engine = &eth.engine; \ Engine *engine = &eth.engine; \
EXPAND_Engine EXPAND_Engine
#define WITH_ENGINE_TEST_HELPER(x) EngineTestHelper eth(x); \ #define WITH_ENGINE_TEST_HELPER_SENS(x, sensorvals) \
EXPAND_EngineTestHelper; EngineTestHelper eth(x, sensorvals); \
EXPAND_EngineTestHelper;
#define WITH_ENGINE_TEST_HELPER(x) \
EngineTestHelper eth(x, std::unordered_map<SensorType, float>{}); \
EXPAND_EngineTestHelper;
#define CONFIG_PARAM(x) (x) #define CONFIG_PARAM(x) (x)

View File

@ -19,7 +19,7 @@ float getEngineValue(le_action_e action DECLARE_ENGINE_PARAMETER_SUFFIX) {
case LE_METHOD_FAN: case LE_METHOD_FAN:
return engine->fsioState.mockFan; return engine->fsioState.mockFan;
case LE_METHOD_COOLANT: case LE_METHOD_COOLANT:
return getCoolantTemperature(); return Sensor::get(SensorType::Clt).value_or(0);
case LE_METHOD_RPM: case LE_METHOD_RPM:
return engine->fsioState.mockRpm; return engine->fsioState.mockRpm;
case LE_METHOD_CRANKING_RPM: case LE_METHOD_CRANKING_RPM:
@ -101,13 +101,13 @@ static void testExpression2(float selfValue, const char *line, float expected, E
ASSERT_EQ(expected, c.getValue2(selfValue, element PASS_ENGINE_PARAMETER_SUFFIX)) << line; ASSERT_EQ(expected, c.getValue2(selfValue, element PASS_ENGINE_PARAMETER_SUFFIX)) << line;
} }
static void testExpression2(float selfValue, const char *line, float expected) { static void testExpression2(float selfValue, const char *line, float expected, const std::unordered_map<SensorType, float>& sensorVals = {}) {
WITH_ENGINE_TEST_HELPER(FORD_INLINE_6_1995); WITH_ENGINE_TEST_HELPER_SENS(FORD_INLINE_6_1995, sensorVals);
testExpression2(selfValue, line, expected, engine); testExpression2(selfValue, line, expected, engine);
} }
static void testExpression(const char *line, float expectedValue) { static void testExpression(const char *line, float expectedValue, const std::unordered_map<SensorType, float>& sensorVals = {}) {
testExpression2(0, line, expectedValue); testExpression2(0, line, expectedValue, sensorVals);
} }
TEST(fsio, testIfFunction) { TEST(fsio, testIfFunction) {
@ -115,8 +115,6 @@ TEST(fsio, testIfFunction) {
} }
TEST(fsio, testLogicExpressions) { TEST(fsio, testLogicExpressions) {
printf("*************************************************** testLogicExpressions\r\n");
testParsing(); testParsing();
{ {
@ -181,36 +179,32 @@ TEST(fsio, testLogicExpressions) {
* fan = fan NOT coolant 90 AND more fan coolant 85 more AND OR * fan = fan NOT coolant 90 AND more fan coolant 85 more AND OR
*/ */
{ std::unordered_map<SensorType, float> sensorVals = {{SensorType::Clt, 100}};
WITH_ENGINE_TEST_HELPER(FORD_INLINE_6_1995); testExpression("coolant 1 +", 101, sensorVals);
engine->sensors.mockClt = 100;
engine->periodicSlowCallback(PASS_ENGINE_PARAMETER_SIGNATURE); testExpression("fan", 0, sensorVals);
testExpression2(0, "coolant 1 +", 101, engine); testExpression("fan not", 1, sensorVals);
} testExpression("coolant 90 >", 1, sensorVals);
testExpression("fan", 0); testExpression("fan not coolant 90 > and", 1, sensorVals);
testExpression("fan not", 1);
testExpression("coolant 90 >", 1);
testExpression("fan not coolant 90 > and", 1);
testExpression("100 200 1 if", 200); testExpression("100 200 1 if", 200);
testExpression("10 99 max", 99); testExpression("10 99 max", 99);
testExpression2(123, "10 self max", 123); testExpression2(123, "10 self max", 123);
testExpression("fan NOT coolant 90 > AND fan coolant 85 > AND OR", 1); testExpression("fan NOT coolant 90 > AND fan coolant 85 > AND OR", 1, sensorVals);
{
WITH_ENGINE_TEST_HELPER(FORD_INLINE_6_1995);
LEElement thepool[TEST_POOL_SIZE];
LEElementPool pool(thepool, TEST_POOL_SIZE);
LEElement * element = pool.parseExpression("fan NOT coolant 90 > AND fan coolant 85 > AND OR");
ASSERT_TRUE(element != NULL) << "Not NULL expected";
LECalculator c;
ASSERT_EQ( 1, c.getValue2(0, element PASS_ENGINE_PARAMETER_SUFFIX)) << "that expression";
ASSERT_EQ(12, c.currentCalculationLogPosition); WITH_ENGINE_TEST_HELPER_SENS(FORD_INLINE_6_1995, sensorVals);
ASSERT_EQ(102, c.calcLogAction[0]); LEElement thepool[TEST_POOL_SIZE];
ASSERT_EQ(0, c.calcLogValue[0]); LEElementPool pool(thepool, TEST_POOL_SIZE);
} LEElement * element = pool.parseExpression("fan NOT coolant 90 > AND fan coolant 85 > AND OR");
ASSERT_TRUE(element != NULL) << "Not NULL expected";
LECalculator c;
ASSERT_EQ( 1, c.getValue2(0, element PASS_ENGINE_PARAMETER_SUFFIX)) << "that expression";
ASSERT_EQ(12, c.currentCalculationLogPosition);
ASSERT_EQ(102, c.calcLogAction[0]);
ASSERT_EQ(0, c.calcLogValue[0]);
testExpression("cfg_fanOffTemperature", 0); testExpression("cfg_fanOffTemperature", 0);
testExpression("coolant cfg_fanOffTemperature >", 1); testExpression("coolant cfg_fanOffTemperature >", 1);
@ -222,13 +216,10 @@ TEST(fsio, testLogicExpressions) {
testExpression(FAN_CONTROL_LOGIC, 1); testExpression(FAN_CONTROL_LOGIC, 1);
{ engine->fsioState.mockRpm = 900;
WITH_ENGINE_TEST_HELPER(FORD_INLINE_6_1995); engine->fsioState.mockCrankingRpm = 200;
engine->fsioState.mockRpm = 900; testExpression2(0, "rpm", 900, engine);
engine->fsioState.mockCrankingRpm = 200; testExpression2(0, "cranking_rpm", 200, engine);
testExpression2(0, "rpm", 900, engine); testExpression2(0, STARTER_RELAY_LOGIC, 0, engine);
testExpression2(0, "cranking_rpm", 200, engine); testExpression2(0, "rpm cranking_rpm > ", 1, engine);
testExpression2(0, STARTER_RELAY_LOGIC, 0, engine);
testExpression2(0, "rpm cranking_rpm > ", 1, engine);
}
} }