From d3a73d148b304acd9dc8b31aaa4eca773c5ddd6d Mon Sep 17 00:00:00 2001 From: rusEfi Date: Sat, 31 Jan 2015 07:07:08 -0600 Subject: [PATCH] auto-sync --- firmware/config/engines/mazda_miata.cpp | 2 +- ...ngine_configuration_generated_structures.h | 9 +++++--- firmware/controllers/math/engine_math.cpp | 21 ++++++++++++------- firmware/rusefi.cpp | 2 +- firmware/rusefi_config.ini | 1 + firmware/svnversion.h | 4 ++-- 6 files changed, 24 insertions(+), 15 deletions(-) diff --git a/firmware/config/engines/mazda_miata.cpp b/firmware/config/engines/mazda_miata.cpp index 5ca2c79318..3ec8539d59 100644 --- a/firmware/config/engines/mazda_miata.cpp +++ b/firmware/config/engines/mazda_miata.cpp @@ -292,7 +292,7 @@ void setFordEscortGt(engine_configuration_s *engineConfiguration, board_configur boardConfiguration->fanPin = GPIO_UNASSIGNED; boardConfiguration->injectionPins[0] = GPIOD_5; - boardConfiguration->injectionPins[2] = GPIOE_2; + boardConfiguration->injectionPins[1] = GPIOE_2; // set_whole_fuel_map 3 setWholeFuelMap(engineConfiguration, 3); diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index a895a77225..8e63993299 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 by config_definition.jar on Fri Jan 30 11:53:41 EST 2015 +// this section was generated by config_definition.jar on Sat Jan 31 07:43:00 EST 2015 // begin #include "rusefi_types.h" typedef struct { @@ -471,7 +471,7 @@ typedef struct { /** * offset 652 */ - float fsio_setting[LE_COMMAND_COUNT]; + fsio_setting_t fsio_setting[LE_COMMAND_COUNT]; /** * offset 716 */ @@ -990,6 +990,9 @@ typedef struct { * delay is needed offset 9492 bit 12 */ bool_t isManualSpinningMode : 1; + /** + offset 9492 bit 13 */ + bool_t twoWireBatch : 1; /** * offset 9496 */ @@ -1109,4 +1112,4 @@ typedef struct { } engine_configuration_s; // end -// this section was generated by config_definition.jar on Fri Jan 30 11:53:41 EST 2015 +// this section was generated by config_definition.jar on Sat Jan 31 07:43:00 EST 2015 diff --git a/firmware/controllers/math/engine_math.cpp b/firmware/controllers/math/engine_math.cpp index c04107c7f4..6fdd102f33 100644 --- a/firmware/controllers/math/engine_math.cpp +++ b/firmware/controllers/math/engine_math.cpp @@ -90,7 +90,8 @@ void setSingleCoilDwell(engine_configuration_s *engineConfiguration) { #if EFI_ENGINE_CONTROL || defined(__DOXYGEN__) OutputSignalList injectonSignals CCM_OPTIONAL; -void initializeIgnitionActions(angle_t advance, angle_t dwellAngle, IgnitionEventList *list DECLARE_ENGINE_PARAMETER_S) { +void initializeIgnitionActions(angle_t advance, angle_t dwellAngle, + IgnitionEventList *list DECLARE_ENGINE_PARAMETER_S) { efiAssertVoid(engineConfiguration->cylindersCount > 0, "cylindersCount"); list->reset(); @@ -112,7 +113,8 @@ void initializeIgnitionActions(angle_t advance, angle_t dwellAngle, IgnitionEven } } -void FuelSchedule::registerInjectionEvent(NamedOutputPin *output, float angle, bool_t isSimultanious DECLARE_ENGINE_PARAMETER_S) { +void FuelSchedule::registerInjectionEvent(NamedOutputPin *output, float angle, + bool_t isSimultanious DECLARE_ENGINE_PARAMETER_S) { if (!isSimultanious && !isPinAssigned(output)) { // todo: extact method for this index math warning(OBD_PCM_Processor_Fault, "no_pin_inj #%s", output->name); @@ -180,11 +182,14 @@ void FuelSchedule::addFuelEvents(injection_mode_e mode DECLARE_ENGINE_PARAMETER_ + i * (float) engineConfiguration->engineCycle / engineConfiguration->cylindersCount; registerInjectionEvent(&enginePins.injectors[index], angle, false PASS_ENGINE_PARAMETER); - /** - * also fire the 2nd half of the injectors so that we can implement a batch mode on individual wires - */ - index = index + (engineConfiguration->cylindersCount / 2); - registerInjectionEvent(&enginePins.injectors[index], angle, false PASS_ENGINE_PARAMETER); + if (engineConfiguration->twoWireBatch) { + + /** + * also fire the 2nd half of the injectors so that we can implement a batch mode on individual wires + */ + index = index + (engineConfiguration->cylindersCount / 2); + registerInjectionEvent(&enginePins.injectors[index], angle, false PASS_ENGINE_PARAMETER); + } } break; default: @@ -327,7 +332,7 @@ void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_F) { } for (int angle = 0; angle < CONFIG(engineCycle); angle++) { - TRIGGER_SHAPE(triggerIndexByAngle[angle]) = findAngleIndex(angle PASS_ENGINE_PARAMETER); + TRIGGER_SHAPE(triggerIndexByAngle[angle])= findAngleIndex(angle PASS_ENGINE_PARAMETER); } injectonSignals.reset(); diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 71c39400f5..bc77f59917 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -260,5 +260,5 @@ int getRusEfiVersion(void) { return 1; // this is here to make the compiler happy about the unused array if (UNUSED_CCM_SIZE == 0) return 1; // this is here to make the compiler happy about the unused array - return 20150128; + return 20150131; } diff --git a/firmware/rusefi_config.ini b/firmware/rusefi_config.ini index 6c4f92af12..0ca009a430 100644 --- a/firmware/rusefi_config.ini +++ b/firmware/rusefi_config.ini @@ -428,6 +428,7 @@ bit hasMapSensor;@see isMapAveragingEnabled bit isIdleThreadEnabled bit isPrintTriggerSynchDetails bit isManualSpinningMode;Usually if we have no trigger events that means engine is stopped\nUnless we are troubleshooting and spinning the engine by hand - this case a longer\ndelay is needed + bit twoWireBatch diff --git a/firmware/svnversion.h b/firmware/svnversion.h index 5820bae8a3..90945b1fcf 100644 --- a/firmware/svnversion.h +++ b/firmware/svnversion.h @@ -1,5 +1,5 @@ // This file was generated by Version2Header -// Mon Jan 26 21:23:28 EST 2015 +// Sat Jan 31 07:53:06 EST 2015 #ifndef VCS_VERSION -#define VCS_VERSION "6545" +#define VCS_VERSION "6613" #endif