typo & better field name
This commit is contained in:
parent
15ae9b1580
commit
74c8b59e44
|
@ -79,9 +79,10 @@ public:
|
||||||
LocalVersionHolder auxParametersVersion;
|
LocalVersionHolder auxParametersVersion;
|
||||||
operation_mode_e getOperationMode(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
operation_mode_e getOperationMode(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* By the way 32-bit value should hold at least 400 hours of events at 6K RPM x 12 events per revolution
|
||||||
int globalSparkIdCoutner = 0;
|
*/
|
||||||
|
int globalSparkIdCounter = 0;
|
||||||
|
|
||||||
#if !EFI_PROD_CODE
|
#if !EFI_PROD_CODE
|
||||||
float mockMapValue = 0;
|
float mockMapValue = 0;
|
||||||
|
@ -118,9 +119,9 @@ public:
|
||||||
bool needToStopEngine(efitick_t nowNt) const;
|
bool needToStopEngine(efitick_t nowNt) const;
|
||||||
bool etbAutoTune = false;
|
bool etbAutoTune = false;
|
||||||
/**
|
/**
|
||||||
* That's the list of pending spark firing events
|
* That's the linked list of pending spark firing events
|
||||||
*/
|
*/
|
||||||
IgnitionEvent *iHead = nullptr;
|
IgnitionEvent *ignitionEventsHead = nullptr;
|
||||||
/**
|
/**
|
||||||
* this is based on isEngineChartEnabled and engineSnifferRpmThreshold settings
|
* this is based on isEngineChartEnabled and engineSnifferRpmThreshold settings
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -45,9 +45,13 @@ public:
|
||||||
uint32_t startOfDwell;
|
uint32_t startOfDwell;
|
||||||
event_trigger_position_s dwellPosition;
|
event_trigger_position_s dwellPosition;
|
||||||
event_trigger_position_s sparkPosition;
|
event_trigger_position_s sparkPosition;
|
||||||
|
/**
|
||||||
|
* Ignition scheduler maintains a linked list of all pending ignition events.
|
||||||
|
*/
|
||||||
IgnitionEvent *next = nullptr;
|
IgnitionEvent *next = nullptr;
|
||||||
/**
|
/**
|
||||||
* @see globalSparkIdCoutner
|
* Sequential number of all spark events
|
||||||
|
* @see globalSparkIdCounter
|
||||||
*/
|
*/
|
||||||
int sparkId = 0;
|
int sparkId = 0;
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -235,7 +235,7 @@ static ALWAYS_INLINE void handleSparkEvent(bool limitedSpark, uint32_t trgEventI
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
iEvent->sparkId = engine->globalSparkIdCoutner++;
|
iEvent->sparkId = engine->globalSparkIdCounter++;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We are alternating two event lists in order to avoid a potential issue around revolution boundary
|
* We are alternating two event lists in order to avoid a potential issue around revolution boundary
|
||||||
|
@ -310,7 +310,7 @@ static ALWAYS_INLINE void handleSparkEvent(bool limitedSpark, uint32_t trgEventI
|
||||||
/**
|
/**
|
||||||
* Spark should be scheduled in relation to some future trigger event, this way we get better firing precision
|
* Spark should be scheduled in relation to some future trigger event, this way we get better firing precision
|
||||||
*/
|
*/
|
||||||
bool isPending = assertNotInList<IgnitionEvent>(ENGINE(iHead), iEvent);
|
bool isPending = assertNotInList<IgnitionEvent>(ENGINE(ignitionEventsHead), iEvent);
|
||||||
if (isPending) {
|
if (isPending) {
|
||||||
#if SPARK_EXTREME_LOGGING
|
#if SPARK_EXTREME_LOGGING
|
||||||
scheduleMsg(logger, "not adding to queue sparkDown ind=%d %d %s %d", trgEventIndex, getRevolutionCounter(), iEvent->getOutputForLoggins()->name, (int)getTimeNowUs());
|
scheduleMsg(logger, "not adding to queue sparkDown ind=%d %d %s %d", trgEventIndex, getRevolutionCounter(), iEvent->getOutputForLoggins()->name, (int)getTimeNowUs());
|
||||||
|
@ -318,7 +318,7 @@ static ALWAYS_INLINE void handleSparkEvent(bool limitedSpark, uint32_t trgEventI
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LL_APPEND(ENGINE(iHead), iEvent);
|
LL_APPEND(ENGINE(ignitionEventsHead), iEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,11 +379,11 @@ static ALWAYS_INLINE void prepareIgnitionSchedule(DECLARE_ENGINE_PARAMETER_SIGNA
|
||||||
static void scheduleAllSparkEventsUntilNextTriggerTooth(uint32_t trgEventIndex DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
static void scheduleAllSparkEventsUntilNextTriggerTooth(uint32_t trgEventIndex DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
IgnitionEvent *current, *tmp;
|
IgnitionEvent *current, *tmp;
|
||||||
|
|
||||||
LL_FOREACH_SAFE(ENGINE(iHead), current, tmp)
|
LL_FOREACH_SAFE(ENGINE(ignitionEventsHead), current, tmp)
|
||||||
{
|
{
|
||||||
if (current->sparkPosition.triggerEventIndex == trgEventIndex) {
|
if (current->sparkPosition.triggerEventIndex == trgEventIndex) {
|
||||||
// time to fire a spark which was scheduled previously
|
// time to fire a spark which was scheduled previously
|
||||||
LL_DELETE(ENGINE(iHead), current);
|
LL_DELETE(ENGINE(ignitionEventsHead), current);
|
||||||
|
|
||||||
scheduling_s * sDown = ¤t->signalTimerDown;
|
scheduling_s * sDown = ¤t->signalTimerDown;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue