From a338f28396de6c2b395b90c52f648a99373bca1c Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 23 Dec 2019 20:19:13 -0500 Subject: [PATCH] removing one dead line --- .../controllers/engine_cycle/main_trigger_callback.h | 9 ++------- firmware/controllers/engine_cycle/rpm_calculator.cpp | 1 + firmware/controllers/engine_cycle/rpm_calculator.h | 6 ++---- firmware/controllers/engine_cycle/spark_logic.h | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/firmware/controllers/engine_cycle/main_trigger_callback.h b/firmware/controllers/engine_cycle/main_trigger_callback.h index 2c965aab61..5cd1310908 100644 --- a/firmware/controllers/engine_cycle/main_trigger_callback.h +++ b/firmware/controllers/engine_cycle/main_trigger_callback.h @@ -4,11 +4,10 @@ * * * @date Feb 9, 2013 - * @author Andrey Belomutskiy, (c) 2012-2017 + * @author Andrey Belomutskiy, (c) 2012-2019 */ -#ifndef MAIN_LOOP_H_ -#define MAIN_LOOP_H_ +#pragma once #include "engine.h" @@ -27,9 +26,5 @@ void endSimultaniousInjection(InjectionEvent *event); void seTurnPinHigh(InjectionEvent *event); void seTurnPinLow(InjectionEvent *event); -float getFuel(int rpm, float key); - // reset injection switch counter if the engine started spinning void updatePrimeInjectionPulseState(DECLARE_ENGINE_PARAMETER_SIGNATURE); - -#endif /* MAIN_LOOP_H_ */ diff --git a/firmware/controllers/engine_cycle/rpm_calculator.cpp b/firmware/controllers/engine_cycle/rpm_calculator.cpp index f31785e882..32caf18c03 100644 --- a/firmware/controllers/engine_cycle/rpm_calculator.cpp +++ b/firmware/controllers/engine_cycle/rpm_calculator.cpp @@ -315,6 +315,7 @@ static void tdcMarkCallback(trigger_event_e ckpSignalType, (void) ckpSignalType; bool isTriggerSynchronizationPoint = index0 == 0; if (isTriggerSynchronizationPoint && ENGINE(isEngineChartEnabled)) { + // two instances of scheduling_s are needed to properly handle event overlap int revIndex2 = getRevolutionCounter() % 2; int rpm = GET_RPM(); // todo: use tooth event-based scheduling, not just time-based scheduling diff --git a/firmware/controllers/engine_cycle/rpm_calculator.h b/firmware/controllers/engine_cycle/rpm_calculator.h index 589cef6cc6..551ec8b72f 100644 --- a/firmware/controllers/engine_cycle/rpm_calculator.h +++ b/firmware/controllers/engine_cycle/rpm_calculator.h @@ -3,11 +3,10 @@ * @brief Shaft position sensor(s) decoder header * * @date Jan 1, 2013 - * @author Andrey Belomutskiy, (c) 2012-2017 + * @author Andrey Belomutskiy, (c) 2012-2019 */ -#ifndef RPM_REPORTER_H_ -#define RPM_REPORTER_H_ +#pragma once #include "globalaccess.h" #include "scheduler.h" @@ -168,4 +167,3 @@ float getCrankshaftAngleNt(efitick_t timeNt DECLARE_ENGINE_PARAMETER_SUFFIX); void scheduleByAngle(scheduling_s *timer, angle_t angle, schfunc_t callback, void *param DECLARE_ENGINE_PARAMETER_SUFFIX); -#endif /* RPM_REPORTER_H_ */ diff --git a/firmware/controllers/engine_cycle/spark_logic.h b/firmware/controllers/engine_cycle/spark_logic.h index 914bf332ae..d311ebcf5a 100644 --- a/firmware/controllers/engine_cycle/spark_logic.h +++ b/firmware/controllers/engine_cycle/spark_logic.h @@ -2,7 +2,7 @@ * @file spark_logic.h * * @date Sep 15, 2016 - * @author Andrey Belomutskiy, (c) 2012-2017 + * @author Andrey Belomutskiy, (c) 2012-2019 */ #pragma once