From f7023fca232b5d60e4aeaff336b74914168e1716 Mon Sep 17 00:00:00 2001 From: rusefi Date: Fri, 24 Feb 2017 19:20:33 -0500 Subject: [PATCH] usability: better error handling --- firmware/controllers/algo/engine.cpp | 2 +- firmware/controllers/algo/engine.h | 6 ++++++ firmware/controllers/algo/obd_error_codes.h | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 37d2ea0800..9b47605ad3 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -93,7 +93,7 @@ Engine::Engine(persistent_config_s *config) { } void Engine::reset() { - isEngineChartEnabled = false; + withError = isEngineChartEnabled = false; sensorChartMode = SC_OFF; actualLastInjection = 0; isAlternatorControlEnabled = false; diff --git a/firmware/controllers/algo/engine.h b/firmware/controllers/algo/engine.h index 0a3eccab27..199dbc853b 100644 --- a/firmware/controllers/algo/engine.h +++ b/firmware/controllers/algo/engine.h @@ -266,6 +266,12 @@ public: */ bool isAlternatorControlEnabled; + /** + * This flag indicated a big enough problem that engine control would be + * prohibited if this flag is set to true. + */ + bool withError; + RpmCalculator rpmCalculator; persistent_config_s *config; engine_configuration_s *engineConfiguration; diff --git a/firmware/controllers/algo/obd_error_codes.h b/firmware/controllers/algo/obd_error_codes.h index a100731afc..4abebabd36 100644 --- a/firmware/controllers/algo/obd_error_codes.h +++ b/firmware/controllers/algo/obd_error_codes.h @@ -1737,7 +1737,7 @@ typedef enum { */ CUSTOM_OBD_SKIPPED_FUEL = 6046, CUSTOM_OBD_SCH_REUSE = 6047, - CUSTOM_OBD_48 = 6048, + CUSTOM_OBD_PIN_CONFLICT = 6048, CUSTOM_OBD_LOW_FREQUENCY = 6049, /**