From 016da58bbd0f6db8dcd790834faa5cd8dcbfa3f3 Mon Sep 17 00:00:00 2001 From: rusefi Date: Thu, 7 May 2020 00:55:59 -0400 Subject: [PATCH] field useful for rusEFI online catalog --- .../algo/engine_configuration_generated_structures.h | 9 +++++---- firmware/controllers/algo/engine_configuration.cpp | 2 ++ firmware/controllers/generated/rusefi_generated.h | 8 ++++---- firmware/integration/rusefi_config.txt | 4 ++-- firmware/tunerstudio/rusefi.input | 6 ++++++ 5 files changed, 19 insertions(+), 10 deletions(-) diff --git a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h index eecd145954..a5532f5164 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Wed May 06 12:33:00 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Thu May 07 00:52:12 EDT 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONFIG_BOARDS_KINETIS_CONFIG_CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -646,7 +646,7 @@ struct engine_configuration_s { injector_s injector; /** offset 76 bit 0 */ - bool unused76b0 : 1; + bool isForcedInduction : 1; /** offset 76 bit 1 */ bool activateAuxPid1 : 1; @@ -1337,9 +1337,10 @@ struct engine_configuration_s { */ uint32_t tunerStudioSerialSpeed; /** + * Just for reference really, not taken into account by any logic at this point * offset 732 */ - int anUnused4Bytes; + float compressionRatio; /** * Each rusEfi piece can provide synthetic trigger signal for external ECU. Sometimes these wires are routed back into trigger inputs of the same rusEfi board. * See also directSelfStimulation which is different. @@ -3439,4 +3440,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Wed May 06 12:33:00 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Thu May 07 00:52:12 EDT 2020 diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index bff122ee79..165d265caa 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -717,6 +717,8 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { CONFIG(startCrankingDuration) = 7; + CONFIG(compressionRatio) = 9; + engineConfiguration->idlePidRpmDeadZone = 50; engineConfiguration->startOfCrankingPrimingPulse = 0; diff --git a/firmware/controllers/generated/rusefi_generated.h b/firmware/controllers/generated/rusefi_generated.h index 59b90f2549..c750a1b877 100644 --- a/firmware/controllers/generated/rusefi_generated.h +++ b/firmware/controllers/generated/rusefi_generated.h @@ -109,8 +109,6 @@ #define antiLagEnabled_offset_hex 4c #define antiLagRpmTreshold_offset 824 #define antiLagRpmTreshold_offset_hex 338 -#define anUnused4Bytes_offset 732 -#define anUnused4Bytes_offset_hex 2dc #define autoTuneCltThreshold_offset 2420 #define autoTuneCltThreshold_offset_hex 974 #define autoTuneTpsQuietPeriod_offset 2428 @@ -454,6 +452,8 @@ #define COMPOSITE_DATA_LENGTH 2500 #define COMPOSITE_PACKET_COUNT 500 #define COMPOSITE_PACKET_SIZE 5 +#define compressionRatio_offset 732 +#define compressionRatio_offset_hex 2dc #define CONSOLE_DATA_PROTOCOL_TAG " @" #define consoleLoopPeriodMs_offset 716 #define consoleLoopPeriodMs_offset_hex 2cc @@ -1473,6 +1473,8 @@ #define isFastAdcEnabled_offset_hex 2e8 #define isFasterEngineSpinUpEnabled_offset 744 #define isFasterEngineSpinUpEnabled_offset_hex 2e8 +#define isForcedInduction_offset 76 +#define isForcedInduction_offset_hex 4c #define isHip9011Enabled_offset 744 #define isHip9011Enabled_offset_hex 2e8 #define isIgnitionEnabled_offset 1476 @@ -2271,8 +2273,6 @@ #define unused6312_offset_hex 18a8 #define unused711_offset 711 #define unused711_offset_hex 2c7 -#define unused76b0_offset 76 -#define unused76b0_offset_hex 4c #define unused806_offset 806 #define unused806_offset_hex 326 #define unused_1484_bit_24_offset 1476 diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index ed25396de1..e4c207aa57 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -367,7 +367,7 @@ end_struct injector_s injector -bit unused76b0; +bit isForcedInduction; bit activateAuxPid1; bit isVerboseAuxPid1; bit activateAuxPid2; @@ -666,7 +666,7 @@ pin_input_mode_e throttlePedalUpPinMode; uint32_t tunerStudioSerialSpeed;Secondary TTL channel baud rate;"BPs", 1, 0, 0,1000000, 0 - int anUnused4Bytes; + float compressionRatio;+Just for reference really, not taken into account by any logic at this point;"CR", 1, 0, 0, 300.0, 1 brain_pin_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPins;Each rusEfi piece can provide synthetic trigger signal for external ECU. Sometimes these wires are routed back into trigger inputs of the same rusEfi board.\nSee also directSelfStimulation which is different. pin_output_mode_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPinModes; diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 2d9fa5f5c4..1d3ee66dd5 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1621,11 +1621,17 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = baseEngineConfig, "Engine Configuration" ; field = "Engine Preset", engineType +; this field is useful for rusEFI online catalog field = "Engine Make", engineMake +; this field is useful for rusEFI online catalog field = "Engine Code", engineCode field = "Number of Cylinders", cylindersCount field = "Engine Displacement", displacement field = "Firing Order", firingOrder +; this field is useful for rusEFI online catalog + field = "Compression Ratio", compressionRatio +; this field is useful for rusEFI online catalog + field = "Forced Induction?", isForcedInduction ; Engine->Trigger configuration dialog = triggerConfiguration_settings, "Trigger Pattern"