From 7403a07cabc5729cc96f435bd0c95961e4969ff0 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Thu, 15 Sep 2016 14:02:45 -0400 Subject: [PATCH] auto-sync --- firmware/controllers/injector_central.cpp | 2 +- .../trigger/main_trigger_callback.cpp | 2 +- .../controllers/trigger/main_trigger_callback.h | 16 +--------------- unit_tests/engine_test_helper.cpp | 2 -- unit_tests/engine_test_helper.h | 2 -- 5 files changed, 3 insertions(+), 21 deletions(-) diff --git a/firmware/controllers/injector_central.cpp b/firmware/controllers/injector_central.cpp index 1ebe94c87b..fe273ad79f 100644 --- a/firmware/controllers/injector_central.cpp +++ b/firmware/controllers/injector_central.cpp @@ -39,7 +39,7 @@ EXTERN_ENGINE static Logging * logger; static bool isRunningBench = false; -static int is_injector_enabled[MAX_INJECTOR_COUNT]; +static int is_injector_enabled[INJECTION_PIN_COUNT]; extern engine_pins_s enginePins; diff --git a/firmware/controllers/trigger/main_trigger_callback.cpp b/firmware/controllers/trigger/main_trigger_callback.cpp index 0f758cdb05..cf851c44e8 100644 --- a/firmware/controllers/trigger/main_trigger_callback.cpp +++ b/firmware/controllers/trigger/main_trigger_callback.cpp @@ -632,7 +632,7 @@ void initMainEventListener(Logging *sharedLogger, Engine *engine) { addConsoleActionP("maininfo", (VoidPtr) showMainInfo, engine); printMsg(logger, "initMainLoop: %d", currentTimeMillis()); - if (!isInjectionEnabled(mainTriggerCallbackInstance.engine->engineConfiguration)) + if (!isInjectionEnabled(engine->engineConfiguration)) printMsg(logger, "!!!!!!!!!!!!!!!!!!! injection disabled"); #endif diff --git a/firmware/controllers/trigger/main_trigger_callback.h b/firmware/controllers/trigger/main_trigger_callback.h index 7fbcb06a16..deb3b014f2 100644 --- a/firmware/controllers/trigger/main_trigger_callback.h +++ b/firmware/controllers/trigger/main_trigger_callback.h @@ -12,10 +12,6 @@ #include "main.h" -#define MAX_INJECTOR_COUNT 12 -#define MAX_IGNITER_COUNT 4 - -#ifdef __cplusplus #include "event_registry.h" #include "engine.h" @@ -26,23 +22,13 @@ public: Engine *engine; }; + void initMainEventListener(Logging *sharedLogger, Engine *engine); void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECLARE_ENGINE_PARAMETER_S); -#endif int isIgnitionTimingError(void); -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - void showMainHistogram(void); -void onEveryMillisecondTimerSignal(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ float getFuel(int rpm, float key); #endif /* MAIN_LOOP_H_ */ diff --git a/unit_tests/engine_test_helper.cpp b/unit_tests/engine_test_helper.cpp index 1f21472f6b..6345424416 100644 --- a/unit_tests/engine_test_helper.cpp +++ b/unit_tests/engine_test_helper.cpp @@ -61,8 +61,6 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType) : engine (&persiste engine->updateSlowSensors(PASS_ENGINE_PARAMETER_F); prepareTimingMap(PASS_ENGINE_PARAMETER_F); - triggerCallbackInstance.init(engine); - engine_configuration_s *engineConfiguration = engine->engineConfiguration; engine->triggerShape.initializeTriggerShape(NULL PASS_ENGINE_PARAMETER); diff --git a/unit_tests/engine_test_helper.h b/unit_tests/engine_test_helper.h index f14534ca26..c34de9ae6e 100644 --- a/unit_tests/engine_test_helper.h +++ b/unit_tests/engine_test_helper.h @@ -25,8 +25,6 @@ public: engine_configuration2_s ec2; Engine engine; - MainTriggerCallback triggerCallbackInstance; - engine_configuration_s *ec; engine_configuration_s *engineConfiguration;