refactoring - updating name according to new reality

This commit is contained in:
rusefi 2019-12-03 14:39:11 -05:00
parent c4027a29f0
commit 500315b042
3 changed files with 9 additions and 7 deletions

View File

@ -108,9 +108,11 @@ public:
bool needToStopEngine(efitick_t nowNt) const;
bool etbAutoTune = false;
/**
* That's the linked list of pending spark firing events
* That's the linked list of pending events scheduled in relation to trigger
* At the moment we iterate over the whole list while looking for events for specific trigger index
* We can make it an array of lists per trigger index, but that would take some RAM and probably not needed yet.
*/
AngleBasedEvent *ignitionEventsHead = nullptr;
AngleBasedEvent *angleBasedEventsHead = nullptr;
/**
* this is based on isEngineChartEnabled and engineSnifferRpmThreshold settings
*/

View File

@ -260,13 +260,13 @@ bool scheduleOrQueue(AngleBasedEvent *event,
/**
* Spark should be scheduled in relation to some future trigger event, this way we get better firing precision
*/
bool isPending = assertNotInIgnitionList(ENGINE(ignitionEventsHead), event);
bool isPending = assertNotInIgnitionList(ENGINE(angleBasedEventsHead), event);
if (isPending) {
#if SPARK_EXTREME_LOGGING
scheduleMsg(logger, "isPending thus not adding to queue index=%d rev=%d now=%d", trgEventIndex, getRevolutionCounter(), (int)getTimeNowUs());
#endif /* FUEL_MATH_EXTREME_LOGGING */
} else {
LL_APPEND2(ENGINE(ignitionEventsHead), event, nextToothEvent);
LL_APPEND2(ENGINE(angleBasedEventsHead), event, nextToothEvent);
}
return false;
}
@ -411,11 +411,11 @@ static ALWAYS_INLINE void prepareIgnitionSchedule(DECLARE_ENGINE_PARAMETER_SIGNA
static void scheduleAllSparkEventsUntilNextTriggerTooth(uint32_t trgEventIndex DECLARE_ENGINE_PARAMETER_SUFFIX) {
AngleBasedEvent *current, *tmp;
LL_FOREACH_SAFE2(ENGINE(ignitionEventsHead), current, tmp, nextToothEvent)
LL_FOREACH_SAFE2(ENGINE(angleBasedEventsHead), current, tmp, nextToothEvent)
{
if (current->position.triggerEventIndex == trgEventIndex) {
// time to fire a spark which was scheduled previously
LL_DELETE2(ENGINE(ignitionEventsHead), current, nextToothEvent);
LL_DELETE2(ENGINE(angleBasedEventsHead), current, nextToothEvent);
scheduling_s * sDown = &current->scheduling;

View File

@ -174,7 +174,7 @@ scheduling_s * EngineTestHelper::assertEvent5(const char *msg, int index, void *
static AngleBasedEvent * getElementAtIndexForUnitText(int index, Engine *engine) {
AngleBasedEvent * current;
LL_FOREACH2(engine->ignitionEventsHead, current, nextToothEvent)
LL_FOREACH2(engine->angleBasedEventsHead, current, nextToothEvent)
{
if (index == 0)
return current;