better method names
This commit is contained in:
parent
b022f431e2
commit
645f51a038
|
@ -100,7 +100,7 @@ static inline void tempTurnPinHigh(InjectorOutputPin *output) {
|
|||
output->overlappingCounter++;
|
||||
|
||||
#if FUEL_MATH_EXTREME_LOGGING
|
||||
printf("seTurnPinHigh %s %d %d\r\n", output->name, output->overlappingCounter, (int)getTimeNowUs());
|
||||
printf("turnInjectionPinHigh %s %d %d\r\n", output->name, output->overlappingCounter, (int)getTimeNowUs());
|
||||
#endif /* FUEL_MATH_EXTREME_LOGGING */
|
||||
|
||||
if (output->overlappingCounter > 1) {
|
||||
|
@ -123,7 +123,7 @@ static inline void tempTurnPinHigh(InjectorOutputPin *output) {
|
|||
}
|
||||
|
||||
// todo: make these macro? kind of a penny optimization if compiler is not smart to inline
|
||||
void seTurnPinHigh(InjectionEvent *event) {
|
||||
void turnInjectionPinHigh(InjectionEvent *event) {
|
||||
for (int i = 0;i < MAX_WIRES_COUNT;i++) {
|
||||
InjectorOutputPin *output = event->outputs[i];
|
||||
if (output != NULL) {
|
||||
|
@ -134,7 +134,7 @@ void seTurnPinHigh(InjectionEvent *event) {
|
|||
|
||||
static inline void turnInjectionPinLow(InjectorOutputPin *output) {
|
||||
#if FUEL_MATH_EXTREME_LOGGING
|
||||
printf("seTurnPinLow %s %d %d\r\n", output->name, output->overlappingCounter, (int)getTimeNowUs());
|
||||
printf("turnInjectionPinLow %s %d %d\r\n", output->name, output->overlappingCounter, (int)getTimeNowUs());
|
||||
#endif /* FUEL_MATH_EXTREME_LOGGING */
|
||||
|
||||
if (output->cancelNextTurningInjectorOff) {
|
||||
|
@ -171,7 +171,7 @@ static inline void turnInjectionPinLow(InjectorOutputPin *output) {
|
|||
}
|
||||
}
|
||||
|
||||
void seTurnPinLow(InjectionEvent *event) {
|
||||
void turnInjectionPinLow(InjectionEvent *event) {
|
||||
event->isScheduled = false;
|
||||
for (int i = 0;i<MAX_WIRES_COUNT;i++) {
|
||||
InjectorOutputPin *output = event->outputs[i];
|
||||
|
@ -192,7 +192,7 @@ static void sescheduleByTimestamp(scheduling_s *scheduling, efitimeus_t time, ac
|
|||
// scheduleMsg(&sharedLogger, "schX %s %x %d", prefix, scheduling, time);
|
||||
// scheduleMsg(&sharedLogger, "schX %s", param->name);
|
||||
|
||||
const char *direction = callback == &seTurnPinHigh ? "up" : "down";
|
||||
const char *direction = callback == &turnInjectionPinHigh ? "up" : "down";
|
||||
printf("seScheduleByTime %s %s %d sch=%d\r\n", direction, param->name, (int)time, (int)scheduling);
|
||||
#endif /* FUEL_MATH_EXTREME_LOGGING || EFI_UNIT_TEST */
|
||||
|
||||
|
@ -327,10 +327,10 @@ static ALWAYS_INLINE void handleFuelInjectionEvent(int injEventIndex, InjectionE
|
|||
printf("please cancel %s %d %d\r\n", output->name, (int)getTimeNowUs(), output->overlappingCounter);
|
||||
#endif /* EFI_UNIT_TEST || EFI_SIMULATOR */
|
||||
} else {
|
||||
sescheduleByTimestamp(sUp, turnOnTime, { &seTurnPinHigh, event } PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
sescheduleByTimestamp(sUp, turnOnTime, { &turnInjectionPinHigh, event } PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
}
|
||||
efitimeus_t turnOffTime = nowUs + (int) (injectionStartDelayUs + durationUs);
|
||||
sescheduleByTimestamp(sDown, turnOffTime, { &seTurnPinLow, event } PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
sescheduleByTimestamp(sDown, turnOffTime, { &turnInjectionPinLow, event } PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ void startPrimeInjectionPulse(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|||
|
||||
void startSimultaniousInjection(Engine *engine);
|
||||
void endSimultaniousInjection(InjectionEvent *event);
|
||||
void seTurnPinHigh(InjectionEvent *event);
|
||||
void seTurnPinLow(InjectionEvent *event);
|
||||
void turnInjectionPinHigh(InjectionEvent *event);
|
||||
void turnInjectionPinLow(InjectionEvent *event);
|
||||
|
||||
// reset injection switch counter if the engine started spinning
|
||||
void updatePrimeInjectionPulseState(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
|
|
@ -43,8 +43,8 @@ void SleepExecutor::scheduleByTimestampNt(scheduling_s* scheduling, efitick_t ti
|
|||
|
||||
static void timerCallback(scheduling_s *scheduling) {
|
||||
#if EFI_PRINTF_FUEL_DETAILS
|
||||
if (scheduling->action.getCallback() == (schfunc_t)&seTurnPinLow) {
|
||||
printf("executing cb=seTurnPinLow p=%d sch=%d now=%d\r\n", (int)scheduling->action.getArgument(), (int)scheduling,
|
||||
if (scheduling->action.getCallback() == (schfunc_t)&turnInjectionPinLow) {
|
||||
printf("executing cb=turnInjectionPinLow p=%d sch=%d now=%d\r\n", (int)scheduling->action.getArgument(), (int)scheduling,
|
||||
(int)getTimeNowUs());
|
||||
} else {
|
||||
// printf("exec cb=%d p=%d\r\n", (int)scheduling->callback, (int)scheduling->param);
|
||||
|
@ -75,8 +75,8 @@ static void doScheduleForLater(scheduling_s *scheduling, int delayUs, action_s a
|
|||
}
|
||||
|
||||
#if EFI_SIMULATOR
|
||||
if (action.getCallback() == (schfunc_t)&seTurnPinLow) {
|
||||
printf("setTime cb=seTurnPinLow p=%d\r\n", (int)action.getArgument());
|
||||
if (action.getCallback() == (schfunc_t)&turnInjectionPinLow) {
|
||||
printf("setTime cb=turnInjectionPinLow p=%d\r\n", (int)action.getArgument());
|
||||
} else {
|
||||
// printf("setTime cb=%d p=%d\r\n", (int)callback, (int)param);
|
||||
}
|
||||
|
|
|
@ -145,12 +145,12 @@ void EngineTestHelper::fireTriggerEvents(int count) {
|
|||
|
||||
void EngineTestHelper::assertInjectorUpEvent(const char *msg, int eventIndex, efitime_t momentX, long injectorIndex) {
|
||||
InjectionEvent *event = &engine.injectionEvents.elements[injectorIndex];
|
||||
assertEvent(msg, eventIndex, (void*)seTurnPinHigh, momentX, event);
|
||||
assertEvent(msg, eventIndex, (void*)turnInjectionPinHigh, momentX, event);
|
||||
}
|
||||
|
||||
void EngineTestHelper::assertInjectorDownEvent(const char *msg, int eventIndex, efitime_t momentX, long injectorIndex) {
|
||||
InjectionEvent *event = &engine.injectionEvents.elements[injectorIndex];
|
||||
assertEvent(msg, eventIndex, (void*)seTurnPinLow, momentX, event);
|
||||
assertEvent(msg, eventIndex, (void*)turnInjectionPinLow, momentX, event);
|
||||
}
|
||||
|
||||
scheduling_s * EngineTestHelper::assertEvent5(const char *msg, int index, void *callback, efitime_t expectedTimestamp) {
|
||||
|
|
|
@ -93,8 +93,8 @@ TEST(cranking, testFasterEngineSpinningUp) {
|
|||
|
||||
// check real events for sequential injection
|
||||
// Note: See addFuelEvents() fix inside setRpmValue()!
|
||||
eth.assertEvent5("inj start#3", 0, (void*)seTurnPinHigh, -31875);
|
||||
eth.assertEvent5("inj end#3", 1, (void*)seTurnPinLow, -30000);
|
||||
eth.assertEvent5("inj start#3", 0, (void*)turnInjectionPinHigh, -31875);
|
||||
eth.assertEvent5("inj end#3", 1, (void*)turnInjectionPinLow, -30000);
|
||||
}
|
||||
|
||||
static void doTestFasterEngineSpinningUp60_2(int startUpDelayMs, int rpm1, int expectedRpm) {
|
||||
|
|
Loading…
Reference in New Issue