From 3c6f0aa948e99297de3726c3f71a34b3a315c6ec Mon Sep 17 00:00:00 2001 From: rusEfi Date: Thu, 3 Sep 2015 09:01:31 -0400 Subject: [PATCH] auto-sync --- firmware/console/binary/tunerstudio_configuration.h | 4 +++- firmware/console/status_loop.cpp | 2 ++ firmware/controllers/algo/accel_enrichment.cpp | 4 ++-- firmware/controllers/engine_controller.cpp | 6 ++++-- firmware/rusefi.cpp | 2 +- java_console/models/src/com/rusefi/core/Sensor.java | 2 ++ java_console/ui/src/com/rusefi/Launcher.java | 2 +- 7 files changed, 15 insertions(+), 7 deletions(-) diff --git a/firmware/console/binary/tunerstudio_configuration.h b/firmware/console/binary/tunerstudio_configuration.h index efebe217ea..5ce6f3cc18 100644 --- a/firmware/console/binary/tunerstudio_configuration.h +++ b/firmware/console/binary/tunerstudio_configuration.h @@ -98,7 +98,9 @@ typedef struct { float knockLevel; int totalTriggerErrorCounter; float wallFuelAmount; - int unused3[8]; + float totalFuelCorrection; + floatms_t wallFuelCorrection; + int unused3[6]; } TunerStudioOutputChannels; #endif /* TUNERSTUDIO_CONFIGURATION_H_ */ diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index d37c93ab91..d84902755c 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -600,6 +600,8 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ tsOutputChannels->hasFatalError = hasFirmwareError(); tsOutputChannels->totalTriggerErrorCounter = triggerCentral.triggerState.totalTriggerErrorCounter; tsOutputChannels->wallFuelAmount = wallFuel.getWallFuel(0); + tsOutputChannels->totalFuelCorrection = engine->totalFuelCorrection; + tsOutputChannels->wallFuelCorrection = engine->wallFuelCorrection; tsOutputChannels->checkEngine = hasErrorCodes(); #if EFI_PROD_CODE || defined(__DOXYGEN__) diff --git a/firmware/controllers/algo/accel_enrichment.cpp b/firmware/controllers/algo/accel_enrichment.cpp index eaa3f8afda..c49b808e3d 100644 --- a/firmware/controllers/algo/accel_enrichment.cpp +++ b/firmware/controllers/algo/accel_enrichment.cpp @@ -35,11 +35,11 @@ static Logging *logger; WallFuel wallFuel; WallFuel::WallFuel() { - memset(wallFuel, 0, sizeof(wallFuel)); + reset(); } void WallFuel::reset() { - + memset(wallFuel, 0, sizeof(wallFuel)); } floatms_t WallFuel::adjust(int injectorIndex, floatms_t target DECLARE_ENGINE_PARAMETER_S) { diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index 8e913e0f50..656b0d1ebe 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -67,6 +67,7 @@ #endif extern bool hasFirmwareErrorFlag; +extern WallFuel wallFuel; persistent_config_container_s persistentState CCM_OPTIONAL; @@ -226,11 +227,12 @@ static void periodicSlowCallback(Engine *engine) { } #endif -#if (EFI_PROD_CODE && EFI_ENGINE_CONTROL && EFI_INTERNAL_FLASH) || defined(__DOXYGEN__) if (!engine->rpmCalculator.isRunning()) { +#if (EFI_PROD_CODE && EFI_ENGINE_CONTROL && EFI_INTERNAL_FLASH) || defined(__DOXYGEN__) writeToFlashIfPending(); - } #endif + wallFuel.reset(); + } if (versionForConfigurationListeners.isOld()) { /** diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 52d5c8c0d5..632372cb97 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -291,5 +291,5 @@ int getRusEfiVersion(void) { return 123; // this is here to make the compiler happy about the unused array if (UNUSED_CCM_SIZE[0] * 0 != 0) return 3211; // this is here to make the compiler happy about the unused array - return 20150901; + return 20150903; } diff --git a/java_console/models/src/com/rusefi/core/Sensor.java b/java_console/models/src/com/rusefi/core/Sensor.java index 8602ca4ddf..0c15626d41 100644 --- a/java_console/models/src/com/rusefi/core/Sensor.java +++ b/java_console/models/src/com/rusefi/core/Sensor.java @@ -91,6 +91,8 @@ public enum Sensor { MAP_ACCEL_DELTA(SensorCategory.OPERATIONS, FieldType.FLOAT, 124, BackgroundColor.MUD), TPS_ACCEL_FUEL(SensorCategory.OPERATIONS, FieldType.FLOAT, 128, BackgroundColor.MUD), WALL_FUEL(SensorCategory.OPERATIONS, FieldType.FLOAT, 160, BackgroundColor.MUD), + temperatureFuelCorrection(SensorCategory.OPERATIONS, FieldType.FLOAT, 164, BackgroundColor.MUD), + wallFuelCorrection(SensorCategory.OPERATIONS, FieldType.FLOAT, 168, BackgroundColor.MUD), INJ_1_2_DELTA("inj 1-2 delta", SensorCategory.SNIFFING), INJ_3_4_DELTA("inj 3-4 delta", SensorCategory.SNIFFING), diff --git a/java_console/ui/src/com/rusefi/Launcher.java b/java_console/ui/src/com/rusefi/Launcher.java index 26228d8880..735aa9f875 100644 --- a/java_console/ui/src/com/rusefi/Launcher.java +++ b/java_console/ui/src/com/rusefi/Launcher.java @@ -32,7 +32,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig; * @see com.rusefi.StartupFrame */ public class Launcher { - public static final int CONSOLE_VERSION = 20150902; + public static final int CONSOLE_VERSION = 20150903; public static final boolean SHOW_STIMULATOR = false; private static final String TAB_INDEX = "main_tab"; protected static final String PORT_KEY = "port";