refactoring
This commit is contained in:
parent
6eba573dcf
commit
c4545a9779
|
@ -626,7 +626,7 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX)
|
|||
/**
|
||||
* This method initialized the main listener which actually runs injectors & ignition
|
||||
*/
|
||||
initMainEventListener(sharedLogger, engine);
|
||||
initMainEventListener(sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
}
|
||||
#endif /* EFI_ENGINE_CONTROL */
|
||||
|
||||
|
|
|
@ -357,7 +357,7 @@ static ALWAYS_INLINE void handleFuel(const bool limitedFuel, uint32_t trgEventIn
|
|||
efiAssertVoid(getRemainingStack(chThdGetSelfX()) > 128, "lowstck#3");
|
||||
efiAssertVoid(trgEventIndex < engine->engineCycleEventCount, "handleFuel/event index");
|
||||
|
||||
if (!isInjectionEnabled(engineConfiguration) || limitedFuel) {
|
||||
if (!isInjectionEnabled(PASS_ENGINE_PARAMETER_SIGNATURE) || limitedFuel) {
|
||||
return;
|
||||
}
|
||||
if (engine->isCylinderCleanupMode) {
|
||||
|
@ -535,7 +535,7 @@ static void showMainInfo(Engine *engine) {
|
|||
#endif
|
||||
}
|
||||
|
||||
void initMainEventListener(Logging *sharedLogger, Engine *engine) {
|
||||
void initMainEventListener(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
logger = sharedLogger;
|
||||
efiAssertVoid(engine!=NULL, "null engine");
|
||||
initSparkLogic(logger);
|
||||
|
@ -545,7 +545,7 @@ void initMainEventListener(Logging *sharedLogger, Engine *engine) {
|
|||
addConsoleActionP("maininfo", (VoidPtr) showMainInfo, engine);
|
||||
|
||||
printMsg(logger, "initMainLoop: %d", currentTimeMillis());
|
||||
if (!isInjectionEnabled(engine->engineConfiguration))
|
||||
if (!isInjectionEnabled(PASS_ENGINE_PARAMETER_SIGNATURE))
|
||||
printMsg(logger, "!!!!!!!!!!!!!!!!!!! injection disabled");
|
||||
#endif
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "event_registry.h"
|
||||
#include "engine.h"
|
||||
|
||||
void initMainEventListener(Logging *sharedLogger, Engine *engine);
|
||||
void initMainEventListener(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
int isIgnitionTimingError(void);
|
||||
|
|
|
@ -21,9 +21,9 @@ IgnitionEventList::IgnitionEventList() {
|
|||
isReady = false;
|
||||
}
|
||||
|
||||
int isInjectionEnabled(engine_configuration_s *engineConfiguration) {
|
||||
int isInjectionEnabled(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
// todo: is this worth a method? should this be inlined?
|
||||
return engineConfiguration->isInjectionEnabled;
|
||||
return CONFIG(isInjectionEnabled);
|
||||
}
|
||||
|
||||
int isIgnitionTimingError(void) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "engine.h"
|
||||
|
||||
int isInjectionEnabled(engine_configuration_s *engineConfiguration);
|
||||
int isInjectionEnabled(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void handleSpark(bool limitedSpark, uint32_t trgEventIndex, int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void initSparkLogic(Logging *sharedLogger);
|
||||
void turnSparkPinHigh(IgnitionEvent *event);
|
||||
|
|
Loading…
Reference in New Issue