From 355908de2ddece7868f88553a585363722d6e050 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Sat, 28 May 2016 19:02:28 -0400 Subject: [PATCH] auto-sync --- firmware/controllers/engine_controller.cpp | 8 ++++---- firmware/development/sensor_chart.cpp | 10 +++------- .../src/com/rusefi/binaryprotocol/BinaryProtocol.java | 3 ++- java_console/ui/src/com/rusefi/Launcher.java | 2 +- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index 864cbadb8f..2c3203932c 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -535,6 +535,10 @@ void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S initSignalExecutor(); #endif +#if EFI_SENSOR_CHART || defined(__DOXYGEN__) + initSensorChart(); +#endif /* EFI_SENSOR_CHART */ + #if EFI_PROD_CODE || EFI_SIMULATOR // todo: this is a mess, remove code duplication with simulator initSettings(engineConfiguration); @@ -572,10 +576,6 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S) { initPwmGenerator(); #endif -#if EFI_SENSOR_CHART || defined(__DOXYGEN__) - initSensorChart(); -#endif /* EFI_SENSOR_CHART */ - initAlgo(sharedLogger, engineConfiguration); #if EFI_WAVE_ANALYZER || defined(__DOXYGEN__) diff --git a/firmware/development/sensor_chart.cpp b/firmware/development/sensor_chart.cpp index 5b64633adb..3e5a5f3b53 100644 --- a/firmware/development/sensor_chart.cpp +++ b/firmware/development/sensor_chart.cpp @@ -9,17 +9,15 @@ #include "main.h" #include "engine.h" #include "rpm_calculator.h" -#if EFI_PROD_CODE || defined(__DOXYGEN__) -#include "status_loop.h" -#endif #if EFI_SENSOR_CHART || defined(__DOXYGEN__) +#include "status_loop.h" static char LOGGING_BUFFER[5000]; static Logging logging("analog chart", LOGGING_BUFFER, sizeof(LOGGING_BUFFER)); -static int pendingData = FALSE; -static int initialized = FALSE; +static int pendingData = false; +static int initialized = false; extern engine_configuration_s *engineConfiguration; @@ -49,11 +47,9 @@ void scAddData(float angle, float value) { // message terminator appendPrintf(&logging, DELIMETER); // output pending data -#if EFI_PROD_CODE || defined(__DOXYGEN__) if (getFullLog()) { scheduleLogging(&logging); } -#endif pendingData = false; } return; diff --git a/java_console/io/src/com/rusefi/binaryprotocol/BinaryProtocol.java b/java_console/io/src/com/rusefi/binaryprotocol/BinaryProtocol.java index a3ee585843..162ca0fdb6 100644 --- a/java_console/io/src/com/rusefi/binaryprotocol/BinaryProtocol.java +++ b/java_console/io/src/com/rusefi/binaryprotocol/BinaryProtocol.java @@ -313,7 +313,8 @@ public class BinaryProtocol { byte[] response = executeCommand(packet, "load image offset=" + offset, false); if (!checkResponseCode(response, RESPONSE_OK) || response.length != requestSize + 1) { - String info = response == null ? "null" : ("code " + response[0] + " size " + response.length); + String code = (response == null || response.length == 0) ? "empty" : "code " + response[0]; + String info = response == null ? "null" : (code + " size " + response.length); logger.error("readImage: Something is wrong, retrying... " + info); continue; } diff --git a/java_console/ui/src/com/rusefi/Launcher.java b/java_console/ui/src/com/rusefi/Launcher.java index 2eb84a0e9b..d82e7a8528 100644 --- a/java_console/ui/src/com/rusefi/Launcher.java +++ b/java_console/ui/src/com/rusefi/Launcher.java @@ -36,7 +36,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig; * @see EngineSnifferPanel */ public class Launcher { - public static final int CONSOLE_VERSION = 20160523; + public static final int CONSOLE_VERSION = 20160528; public static final boolean SHOW_STIMULATOR = false; private static final String TAB_INDEX = "main_tab"; protected static final String PORT_KEY = "port";