From 819575f192945a3199cf292578b2d5e7f0f9636f Mon Sep 17 00:00:00 2001 From: rusEfi Date: Wed, 2 Sep 2015 21:03:43 -0400 Subject: [PATCH] auto-sync --- firmware/controllers/algo/accel_enrichment.cpp | 5 +++++ firmware/controllers/algo/accel_enrichment.h | 2 +- firmware/controllers/algo/engine.h | 2 ++ java_console/ui/src/com/rusefi/ui/SensorLiveGraph.java | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/algo/accel_enrichment.cpp b/firmware/controllers/algo/accel_enrichment.cpp index fffd3c1fba..eaa3f8afda 100644 --- a/firmware/controllers/algo/accel_enrichment.cpp +++ b/firmware/controllers/algo/accel_enrichment.cpp @@ -38,6 +38,10 @@ WallFuel::WallFuel() { memset(wallFuel, 0, sizeof(wallFuel)); } +void WallFuel::reset() { + +} + floatms_t WallFuel::adjust(int injectorIndex, floatms_t target DECLARE_ENGINE_PARAMETER_S) { if (cisnan(target)) { return target; @@ -50,6 +54,7 @@ floatms_t WallFuel::adjust(int injectorIndex, floatms_t target DECLARE_ENGINE_PA float addedToWallsAmount = result * addedToWallCoef; wallFuel[injectorIndex] = wallFuel[injectorIndex] + addedToWallsAmount - suckedOffWallsAmount; + engine->wallFuelCorrection = result - target; return result; } diff --git a/firmware/controllers/algo/accel_enrichment.h b/firmware/controllers/algo/accel_enrichment.h index 7437bf09b5..08a8dc6654 100644 --- a/firmware/controllers/algo/accel_enrichment.h +++ b/firmware/controllers/algo/accel_enrichment.h @@ -45,7 +45,7 @@ public: WallFuel(); floatms_t adjust(int injectorIndex, floatms_t target DECLARE_ENGINE_PARAMETER_S); floatms_t getWallFuel(int injectorIndex); - + void reset(); private: /** * Amount of fuel on the wall, in injector open time scale, for specific injector. diff --git a/firmware/controllers/algo/engine.h b/firmware/controllers/algo/engine.h index b75675d453..bb2e8e386f 100644 --- a/firmware/controllers/algo/engine.h +++ b/firmware/controllers/algo/engine.h @@ -191,6 +191,8 @@ public: * Fuel injection duration for current engine cycle, without wall wetting */ floatms_t fuelMs; + float totalFuelCorrection; + floatms_t wallFuelCorrection; /** * This one with wall wetting accounted for, used for logging. diff --git a/java_console/ui/src/com/rusefi/ui/SensorLiveGraph.java b/java_console/ui/src/com/rusefi/ui/SensorLiveGraph.java index f4523103d3..8951aed234 100644 --- a/java_console/ui/src/com/rusefi/ui/SensorLiveGraph.java +++ b/java_console/ui/src/com/rusefi/ui/SensorLiveGraph.java @@ -118,7 +118,7 @@ public class SensorLiveGraph extends JPanel { if (!Node.isNumeric(lower)) return; customLower = Double.parseDouble(lower); - config.setProperty(LOWER, customUpper); + config.setProperty(LOWER, customLower); } } });