refactoring: reducing header tree hell

This commit is contained in:
rusefi 2019-01-21 00:10:09 -05:00
parent db80801191
commit 2756ff57eb
11 changed files with 11 additions and 17 deletions

View File

@ -661,7 +661,7 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX)
* there is an implicit dependency on the fact that 'tachometer' listener is the 1st listener - this case
* other listeners can access current RPM value
*/
initRpmCalculator(sharedLogger, engine);
initRpmCalculator(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
#endif /* EFI_SHAFT_POSITION_INPUT */
#if (EFI_PROD_CODE && EFI_ENGINE_CONTROL) || defined(__DOXYGEN__)

View File

@ -13,10 +13,10 @@
* @author Andrey Belomutskiy, (c) 2012-2018
*/
#include "engine_math.h"
#include "aux_valves.h"
#include "allsensors.h"
#include "trigger_central.h"
#include "engine_math.h"
EXTERN_ENGINE
;

View File

@ -20,6 +20,7 @@
#include "global.h"
#include "engine.h"
#include "trigger_bmw.h"
#include "trigger_chrysler.h"
#include "trigger_gm.h"

View File

@ -9,8 +9,6 @@
#include "trigger_toyota.h"
EXTERN_ENGINE;
void initialize2jzGE1_12(TriggerShape *s) {
s->initialize(FOUR_STROKE_CAM_SENSOR, true);

View File

@ -8,7 +8,7 @@
#ifndef CONTROLLERS_TRIGGER_TRIGGER_TOYOTA_H_
#define CONTROLLERS_TRIGGER_TRIGGER_TOYOTA_H_
#include "engine.h"
#include "trigger_structure.h"
void initialize2jzGE1_12(TriggerShape *s);
void initialize2jzGE3_34(TriggerShape *s);

View File

@ -10,8 +10,8 @@
* @author Andrey Belomutskiy, (c) 2012-2018
*/
#include "global.h"
#include "rpm_calculator.h"
#include "engine.h"
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
@ -344,7 +344,7 @@ float getCrankshaftAngleNt(efitime_t timeNt DECLARE_ENGINE_PARAMETER_SUFFIX) {
return rpm == 0 ? NAN : timeSinceZeroAngleNt / getOneDegreeTimeNt(rpm);
}
void initRpmCalculator(Logging *sharedLogger, Engine *engine) {
void initRpmCalculator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
logger = sharedLogger;
if (hasFirmwareError()) {
return;

View File

@ -10,7 +10,6 @@
#define RPM_REPORTER_H_
#include <global.h>
#include "engine_configuration.h"
#include "scheduler.h"
#define TOP_DEAD_CENTER_MESSAGE "r"
@ -34,8 +33,6 @@
#define RPM_LOW_THRESHOLD 25
#endif
#ifdef __cplusplus
typedef enum {
/**
* The engine is not spinning, RPM=0
@ -56,8 +53,6 @@ typedef enum {
RUNNING,
} spinning_state_e;
class Engine;
#define GET_RPM() ( ENGINE(rpmCalculator.rpmValue) )
class RpmCalculator {
@ -166,11 +161,9 @@ void rpmShaftPositionCallback(trigger_event_e ckpSignalType, uint32_t index DECL
/**
* @brief Initialize RPM calculator
*/
void initRpmCalculator(Logging *sharedLogger, Engine *engine);
void initRpmCalculator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
float getCrankshaftAngleNt(efitime_t timeNt DECLARE_ENGINE_PARAMETER_SUFFIX);
#endif
int getRevolutionCounter(void);

View File

@ -17,6 +17,7 @@
#if EFI_EMULATE_POSITION_SENSORS || defined(__DOXYGEN__)
#include "engine.h"
#include "trigger_emulator_algo.h"
#include "engine_configuration.h"
#include "trigger_central.h"

View File

@ -11,6 +11,7 @@
#include "eficonsole.h"
#include "pin_repository.h"
#include "engine_configuration.h"
#include "engine.h"
#include "hardware.h"
#include "mpu_util.h"

View File

@ -7,11 +7,11 @@
#include "global.h"
#include "rfi_perftest.h"
#include "engine_math.h"
#include "fuel_math.h"
#include "eficonsole.h"
#include "time.h"
#include "engine_math.h"
#include "efiGpio.h"
#include "efilib2.h"
#include "console_io.h"

View File

@ -115,7 +115,7 @@ void rusEfiFunctionalTest(void) {
initAlgo(&sharedLogger);
commonInitEngineController(&sharedLogger);
initRpmCalculator(&sharedLogger, engine);
initRpmCalculator(&sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
initTriggerCentral(&sharedLogger);
initTriggerEmulator(&sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);