From 9a0378c335085d8c319efda6edcb6a54a017fa87 Mon Sep 17 00:00:00 2001 From: rusefi Date: Tue, 13 Jun 2017 10:40:16 -0400 Subject: [PATCH] #351 --- firmware/controllers/algo/engine_configuration.cpp | 1 + .../algo/engine_configuration_generated_structures.h | 10 +++++++--- firmware/controllers/algo/rusefi_generated.h | 6 ++++-- firmware/integration/rusefi_config.txt | 3 ++- firmware/rusefi.cpp | 2 +- firmware/tunerstudio/rusefi.ini | 6 ++++-- firmware/tunerstudio/rusefi.input | 1 + 7 files changed, 20 insertions(+), 9 deletions(-) diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index df078948c2..04e0f63a7e 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -274,6 +274,7 @@ void prepareVoidConfiguration(engine_configuration_s *activeConfiguration) { engineConfiguration->cj125ur = EFI_ADC_NONE; boardConfiguration->idle.stepperDirectionPin = GPIO_UNASSIGNED; + engineConfiguration->stepperDirectionPinMode = OM_DEFAULT; boardConfiguration->idle.stepperStepPin = GPIO_UNASSIGNED; engineConfiguration->stepperEnablePin = GPIO_UNASSIGNED; engineConfiguration->stepperEnablePinMode = OM_DEFAULT; diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index 999d513e6a..8892e2a689 100644 --- a/firmware/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Jun 12 18:21:38 EDT 2017 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Jun 13 10:18:38 EDT 2017 // begin #ifndef ENGINE_CONFIGURATION_GENERATED_H_ #define ENGINE_CONFIGURATION_GENERATED_H_ @@ -1547,7 +1547,11 @@ typedef struct { /** * offset 2020 */ - float unusedetb[2]; + pin_output_mode_e stepperDirectionPinMode; + /** + * offset 2024 + */ + float unusedetb; /** * CLT-based target RPM for automatic idle controller * offset 2028 @@ -2118,4 +2122,4 @@ typedef struct { #endif // end -// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Jun 12 18:21:38 EDT 2017 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Jun 13 10:18:38 EDT 2017 diff --git a/firmware/controllers/algo/rusefi_generated.h b/firmware/controllers/algo/rusefi_generated.h index 8a3f22aa8c..877b368b77 100644 --- a/firmware/controllers/algo/rusefi_generated.h +++ b/firmware/controllers/algo/rusefi_generated.h @@ -1099,8 +1099,10 @@ #define throttlePedalUpVoltage_offset_hex 7dc #define throttlePedalWOTVoltage_offset 2016 #define throttlePedalWOTVoltage_offset_hex 7e0 -#define unusedetb_offset 2020 -#define unusedetb_offset_hex 7e4 +#define stepperDirectionPinMode_offset 2020 +#define stepperDirectionPinMode_offset_hex 7e4 +#define unusedetb_offset 2024 +#define unusedetb_offset_hex 7e8 #define cltIdleRpmBins_offset 2028 #define cltIdleRpmBins_offset_hex 7ec #define cltIdleRpm_offset 2092 diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 5424b0a626..cbff302a61 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -706,7 +706,8 @@ custom pin_mode_e 4 bits, U32, @OFFSET@, [0:5], @@pin_mode_e_enum@@ float throttlePedalUpVoltage;;"voltage", 1, 0, -6, 6, 2 float throttlePedalWOTVoltage;+Pedal in the floor;"voltage", 1, 0, -6, 6, 2 - float[2] unusedetb; + pin_output_mode_e stepperDirectionPinMode; + float unusedetb; float[CLT_CURVE_SIZE] cltIdleRpmBins;CLT-based target RPM for automatic idle controller;"C", 1, 0, -100.0, 250.0, 2 float[CLT_CURVE_SIZE] cltIdleRpm;;"RPM", 1, 0, 0.0, 400.0, 0 diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 50fccb9ba3..130bd05788 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -260,5 +260,5 @@ int getRusEfiVersion(void) { if (initBootloader() != 0) return 123; #endif /* EFI_BOOTLOADER_INCLUDE_CODE */ - return 20170611; + return 20170613; } diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 08a1edfa2c..0d46a7eaf8 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -45,7 +45,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Jun 12 18:21:38 EDT 2017 +; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Jun 13 10:18:38 EDT 2017 pageSize = 16376 page = 1 @@ -551,7 +551,8 @@ page = 1 knockNoiseRpmBins = array, F32, 1980, [8], "RPM", 1, 0, 0.0, 18000, 2 throttlePedalUpVoltage = scalar, F32, 2012, "voltage", 1, 0, -6, 6, 2 throttlePedalWOTVoltage = scalar, F32, 2016, "voltage", 1, 0, -6, 6, 2 -;skipping unusedetb offset 2020 + stepperDirectionPinMode = bits, U32, 2020, [0:1], "default", "default inverted", "open collector", "open collector inverted" +;skipping unusedetb offset 2024 cltIdleRpmBins = array, F32, 2028, [16], "C", 1, 0, -100.0, 250.0, 2 cltIdleRpm = array, F32, 2092, [16], "RPM", 1, 0, 0.0, 400.0, 0 targetVBatt = scalar, F32, 2156, "Volts", 1, 0, 0,30, 1 @@ -1790,6 +1791,7 @@ cmd_call_from_pit = "w\x00\x20\x34\x56" field = "O2 heater pin", o2heaterPin field = "Idle Solenoid Pin", idle_solenoidPin field = "Idle Stepper Dir", idle_stepperDirectionPin + field = "Idle Stepper Dir Mode", stepperDirectionPinMode field = "Idle Stepper Step", idle_stepperStepPin field = "Idle Stepper Enable", stepperEnablePin field = "Idle Stepper Pulse", idleStepperPulseDuration diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index aae11fdb46..59cd869f4a 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1026,6 +1026,7 @@ cmd_call_from_pit = "w\x00\x20\x34\x56" field = "O2 heater pin", o2heaterPin field = "Idle Solenoid Pin", idle_solenoidPin field = "Idle Stepper Dir", idle_stepperDirectionPin + field = "Idle Stepper Dir Mode", stepperDirectionPinMode field = "Idle Stepper Step", idle_stepperStepPin field = "Idle Stepper Enable", stepperEnablePin field = "Idle Stepper Pulse", idleStepperPulseDuration