From b59e57c40e13c8f0d1bf05927cf97f5811de64c6 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Thu, 26 Mar 2015 22:04:48 -0500 Subject: [PATCH] auto-sync --- firmware/config/engines/sachs.cpp | 2 ++ .../controllers/algo/accel_enrichment.cpp | 23 +++++++++++++++++++ firmware/controllers/algo/accel_enrichment.h | 2 +- .../autotest/src/com/rusefi/AutoTest.java | 8 +++++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/firmware/config/engines/sachs.cpp b/firmware/config/engines/sachs.cpp index ddbf3d790c..e921e9625e 100644 --- a/firmware/config/engines/sachs.cpp +++ b/firmware/config/engines/sachs.cpp @@ -80,5 +80,7 @@ void setSachs(engine_configuration_s *engineConfiguration) { boardConfiguration->injectionPins[0] = GPIOC_15; + boardConfiguration->fuelPumpPin = GPIOE_6; + } diff --git a/firmware/controllers/algo/accel_enrichment.cpp b/firmware/controllers/algo/accel_enrichment.cpp index ae3f268d10..5ba0b800ed 100644 --- a/firmware/controllers/algo/accel_enrichment.cpp +++ b/firmware/controllers/algo/accel_enrichment.cpp @@ -23,6 +23,29 @@ EXTERN_ENGINE static AccelEnrichmemnt instance; +static void setAccelThr(float value) { + engineConfiguration->accelEnrichmentThreshold = value; +} + +static void setAccelMult(float value) { + engineConfiguration->accelEnrichmentMultiplier = value; +} + +static void setDecelThr(float value) { + engineConfiguration->deaccelEnrichmentThreshold = value; +} + +static void setDecelMult(float value) { + engineConfiguration->deaccelEnrichmentMultiplier = value; +} + +void initAccelEnrichment(void) { + addConsoleActionF("set_accel_th", setAccelThr); + addConsoleActionF("set_accel_mult", setAccelMult); + addConsoleActionF("set_decel_th", setDecelThr); + addConsoleActionF("set_decel_mult", setDecelMult); +} + void AccelEnrichmemnt::updateDiffEnrichment(engine_configuration_s *engineConfiguration, float engineLoad) { // for (int i = 3; i == 1; i--) // array[i] = array[i - 1]; diff --git a/firmware/controllers/algo/accel_enrichment.h b/firmware/controllers/algo/accel_enrichment.h index 18d5c7bc55..6d7751cd9b 100644 --- a/firmware/controllers/algo/accel_enrichment.h +++ b/firmware/controllers/algo/accel_enrichment.h @@ -36,7 +36,7 @@ private: cyclic_buffer cb; }; -void initDiffEnrichment(void); +void initAccelEnrichment(void); float getAccelEnrichment(void); #endif /* ACC_ENRICHMENT_H_ */ diff --git a/java_console/autotest/src/com/rusefi/AutoTest.java b/java_console/autotest/src/com/rusefi/AutoTest.java index e8dfe71cb4..936be3ec79 100644 --- a/java_console/autotest/src/com/rusefi/AutoTest.java +++ b/java_console/autotest/src/com/rusefi/AutoTest.java @@ -23,6 +23,7 @@ public class AutoTest { static void mainTestBody() { sendCommand("fl 1"); // just in case it was disabled + testSachs(); testMitsu(); testBmwE34(); testCitroenBerlingo(); @@ -35,6 +36,13 @@ public class AutoTest { testFordFiesta(); } + private static void testSachs() { + setEngineType(29); + String msg = "BMW"; + IoUtil.changeRpm(1200); + // todo: add more content + } + private static void testBmwE34() { setEngineType(25); String msg = "BMW";