global static not good, there shall be only one god object /s

This commit is contained in:
Andrey 2021-06-25 01:37:43 -04:00
parent 71fdfe6756
commit 761d9fc40e
2 changed files with 3 additions and 3 deletions

View File

@ -171,6 +171,8 @@ public:
#if EFI_ENGINE_CONTROL
FuelSchedule injectionEvents;
IgnitionEventList ignitionEvents;
scheduling_s tdcScheduler[2];
#endif /* EFI_ENGINE_CONTROL */
bool needToStopEngine(efitick_t nowNt) const;

View File

@ -320,8 +320,6 @@ float RpmCalculator::getTimeSinceEngineStart(efitick_t nowNt) const {
return engineStartTimer.getElapsedSeconds(nowNt);
}
static scheduling_s tdcScheduler[2];
static char rpmBuffer[_MAX_FILLER];
/**
@ -361,7 +359,7 @@ void tdcMarkCallback(
angle_t tdcPosition = tdcPosition();
// we need a positive angle offset here
fixAngle(tdcPosition, "tdcPosition", CUSTOM_ERR_6553);
scheduleByAngle(&tdcScheduler[revIndex2], edgeTimestamp, tdcPosition,
scheduleByAngle(&engine->tdcScheduler[revIndex2], edgeTimestamp, tdcPosition,
{ onTdcCallback, engine } PASS_ENGINE_PARAMETER_SUFFIX);
}
}