only:towards https://github.com/rusefi/rusefi/pull/4841
This commit is contained in:
parent
6708494bb0
commit
fe0080c4c0
|
@ -161,8 +161,7 @@ static void startKnockSampling(Engine* p_engine) {
|
||||||
void Engine::onSparkFireKnockSense(uint8_t cylinderNumber, efitick_t nowNt) {
|
void Engine::onSparkFireKnockSense(uint8_t cylinderNumber, efitick_t nowNt) {
|
||||||
#if EFI_HIP_9011 || EFI_SOFTWARE_KNOCK
|
#if EFI_HIP_9011 || EFI_SOFTWARE_KNOCK
|
||||||
cylinderNumberCopy = cylinderNumber;
|
cylinderNumberCopy = cylinderNumber;
|
||||||
static scheduling_s startSampling;
|
scheduleByAngle(nullptr, nowNt,
|
||||||
scheduleByAngle(&startSampling, nowNt,
|
|
||||||
/*angle*/engineConfiguration->knockDetectionWindowStart, { startKnockSampling, engine });
|
/*angle*/engineConfiguration->knockDetectionWindowStart, { startKnockSampling, engine });
|
||||||
#else
|
#else
|
||||||
UNUSED(cylinderNumber);
|
UNUSED(cylinderNumber);
|
||||||
|
|
|
@ -60,7 +60,7 @@ void PrimeController::onIgnitionStateChanged(bool ignitionOn) {
|
||||||
auto primeDelayMs = engineConfiguration->primingDelay * 1000;
|
auto primeDelayMs = engineConfiguration->primingDelay * 1000;
|
||||||
|
|
||||||
auto startTime = getTimeNowNt() + MS2NT(primeDelayMs);
|
auto startTime = getTimeNowNt() + MS2NT(primeDelayMs);
|
||||||
getExecutorInterface()->scheduleByTimestampNt("prime", &m_start, startTime, { PrimeController::onPrimeStartAdapter, this });
|
getExecutorInterface()->scheduleByTimestampNt("prime", nullptr, startTime, { PrimeController::onPrimeStartAdapter, this });
|
||||||
} else {
|
} else {
|
||||||
efiPrintf("Skipped priming pulse since ignSwitchCounter = %d", ignSwitchCounter);
|
efiPrintf("Skipped priming pulse since ignSwitchCounter = %d", ignSwitchCounter);
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ void PrimeController::onPrimeStart() {
|
||||||
// Open all injectors, schedule closing later
|
// Open all injectors, schedule closing later
|
||||||
m_isPriming = true;
|
m_isPriming = true;
|
||||||
startSimultaneousInjection();
|
startSimultaneousInjection();
|
||||||
getExecutorInterface()->scheduleByTimestampNt("prime", &m_end, endTime, { onPrimeEndAdapter, this });
|
getExecutorInterface()->scheduleByTimestampNt("prime", nullptr, endTime, { onPrimeEndAdapter, this });
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrimeController::onPrimeEnd() {
|
void PrimeController::onPrimeEnd() {
|
||||||
|
|
|
@ -24,9 +24,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
scheduling_s m_start;
|
|
||||||
scheduling_s m_end;
|
|
||||||
|
|
||||||
bool m_isPriming = false;
|
bool m_isPriming = false;
|
||||||
|
|
||||||
static void onPrimeStartAdapter(PrimeController* instance) {
|
static void onPrimeStartAdapter(PrimeController* instance) {
|
||||||
|
|
Loading…
Reference in New Issue