only: better method name

This commit is contained in:
rusefi 2024-04-09 23:53:26 -04:00
parent 3c5fd68aa0
commit 9c77bc709a
5 changed files with 7 additions and 7 deletions

View File

@ -242,7 +242,7 @@ if (engineConfiguration->debugMode == DBG_DWELL_METRIC) {
#endif /* SPARK_EXTREME_LOGGING */
// We can schedule both of these right away, since we're going for "asap" not "particular angle"
engine->executor.scheduleByTimestampNt("dwell", &event->dwellStartTimer, nextDwellStart, { &turnSparkPinHigh, event });
engine->executor.scheduleByTimestampNt("dwell", &event->dwellStartTimer, nextDwellStart, { &turnSparkPinHighStartCharging, event });
engine->executor.scheduleByTimestampNt("firing", &event->sparkEvent.scheduling, nextFiring, { fireSparkAndPrepareNextSchedule, event });
} else {
if (engineConfiguration->enableTrailingSparks) {
@ -294,7 +294,7 @@ static void startDwellByTurningSparkPinHigh(IgnitionEvent *event, IgnitionOutput
output->setHigh();
}
void turnSparkPinHigh(IgnitionEvent *event) {
void turnSparkPinHighStartCharging(IgnitionEvent *event) {
event->actualStartOfDwellNt = getTimeNowLowerNt();
efitick_t nowNt = getTimeNowNt();
@ -362,7 +362,7 @@ static void scheduleSparkEvent(bool limitedSpark, IgnitionEvent *event,
* This way we make sure that coil dwell started while spark was enabled would fire and not burn
* the coil.
*/
chargeTime = scheduleByAngle(&event->dwellStartTimer, edgeTimestamp, angleOffset, { &turnSparkPinHigh, event });
chargeTime = scheduleByAngle(&event->dwellStartTimer, edgeTimestamp, angleOffset, { &turnSparkPinHighStartCharging, event });
event->sparksRemaining = engine->engineState.multispark.count;
} else {

View File

@ -8,7 +8,7 @@
#pragma once
void onTriggerEventSparkLogic(int rpm, efitick_t edgeTimestamp, float currentPhase, float nextPhase);
void turnSparkPinHigh(IgnitionEvent *event);
void turnSparkPinHighStartCharging(IgnitionEvent *event);
void fireSparkAndPrepareNextSchedule(IgnitionEvent *event);
int getNumberOfSparks(ignition_mode_e mode);
percent_t getCoilDutyCycle(int rpm);

View File

@ -37,7 +37,7 @@ TEST(issues, issueOneCylinderSpecialCase968) {
int expectedDeltaTimeUs = eth.angleToTimeUs(expectedAngle);
ASSERT_EQ( 2, engine->executor.size()) << "first revolution(s)";
eth.assertEvent5("spark up#0", 0, (void*)turnSparkPinHigh, -expectedDeltaTimeUs - MS2US(DEFAULT_CRANKING_DWELL_MS));
eth.assertEvent5("spark up#0", 0, (void*)turnSparkPinHighStartCharging, -expectedDeltaTimeUs - MS2US(DEFAULT_CRANKING_DWELL_MS));
eth.assertEvent5("spark down#0", 1, (void*)fireSparkAndPrepareNextSchedule, -expectedDeltaTimeUs);

View File

@ -44,6 +44,6 @@ TEST(trigger, map_cam_by_magic_point) {
// We have "VVT" sync, things should be scheduled!
ASSERT_EQ(2, engine->executor.size());
eth.assertEvent5("spark down#0", 0, (void*)turnSparkPinHigh, 185333);
eth.assertEvent5("spark down#0", 0, (void*)turnSparkPinHighStartCharging, 185333);
eth.assertEvent5("spark down#1", 1, (void*)fireSparkAndPrepareNextSchedule, 188333);
}

View File

@ -249,7 +249,7 @@ TEST(misc, testRpmCalculator) {
{
scheduling_s *ev0 = engine->executor.getForUnitTest(0);
assertREqualsM("Call@0", (void*)ev0->action.getCallback(), (void*)turnSparkPinHigh);
assertREqualsM("Call@0", (void*)ev0->action.getCallback(), (void*)turnSparkPinHighStartCharging);
assertEqualsM("ev 0", start + 944, ev0->momentX);
assertEqualsLM("coil 0", (uintptr_t)&enginePins.coils[0], (uintptr_t)((IgnitionEvent*)ev0->action.getArgument())->outputs[0]);