parent
ae93591755
commit
52869d63bb
|
@ -649,3 +649,6 @@ TunerStudioOutputChannels *getTunerStudioOutputChannels() {
|
|||
return &engine->outputChannels;
|
||||
}
|
||||
|
||||
ExecutorInterface *getExecutorInterface() {
|
||||
return &engine->executor;
|
||||
}
|
||||
|
|
|
@ -382,7 +382,7 @@ void PrimeController::onIgnitionStateChanged(bool ignitionOn) {
|
|||
auto primeDelayMs = engineConfiguration->primingDelay * 1000;
|
||||
|
||||
auto startTime = getTimeNowNt() + MS2NT(primeDelayMs);
|
||||
engine->executor.scheduleByTimestampNt("prime", &m_start, startTime, { PrimeController::onPrimeStartAdapter, this});
|
||||
getExecutorInterface()->scheduleByTimestampNt("prime", &m_start, startTime, { PrimeController::onPrimeStartAdapter, this});
|
||||
} else {
|
||||
efiPrintf("Skipped priming pulse since ignSwitchCounter = %d", ignSwitchCounter);
|
||||
}
|
||||
|
@ -408,7 +408,7 @@ void PrimeController::onPrimeStart() {
|
|||
// Open all injectors, schedule closing later
|
||||
m_isPriming = true;
|
||||
startSimultaneousInjection();
|
||||
engine->executor.scheduleByTimestampNt("prime", &m_end, endTime, { onPrimeEndAdapter, this });
|
||||
getExecutorInterface()->scheduleByTimestampNt("prime", &m_end, endTime, { onPrimeEndAdapter, this });
|
||||
}
|
||||
|
||||
|
||||
|
@ -417,7 +417,7 @@ void updatePrimeInjectionPulseState() {
|
|||
if (counterWasReset)
|
||||
return;
|
||||
|
||||
if (!engine->rpmCalculator.isStopped()) {
|
||||
if (!getEngineRotationState()->isStopped()) {
|
||||
#if EFI_PROD_CODE
|
||||
backupRamSave(BACKUP_IGNITION_SWITCH_COUNTER, 0);
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
|
|
@ -67,3 +67,6 @@ struct ExecutorInterface {
|
|||
virtual void scheduleForLater(const char *msg, scheduling_s *scheduling, int delayUs, action_s action) = 0;
|
||||
virtual void cancel(scheduling_s* scheduling) = 0;
|
||||
};
|
||||
|
||||
ExecutorInterface *getExecutorInterface();
|
||||
|
||||
|
|
|
@ -16,3 +16,5 @@ public:
|
|||
void scheduleForLater(const char *msg, scheduling_s *scheduling, int delayUs, action_s action) override;
|
||||
void cancel(scheduling_s* s) override;
|
||||
};
|
||||
|
||||
ExecutorInterface *getExecutorInterface();
|
||||
|
|
Loading…
Reference in New Issue