removing unused parameter

This commit is contained in:
rusefi 2017-05-15 09:35:06 -04:00
parent b2d1f3e446
commit d819252dd7
9 changed files with 19 additions and 21 deletions

View File

@ -150,13 +150,11 @@ void Executor::scheduleTimerCallback() {
* @param [in] delayUs the number of microseconds before the output signal immediate output if delay is zero.
* @param [in] dwell the number of ticks of output duration.
*/
void scheduleTask(const bool monitorReuse, const char *prefix, scheduling_s *scheduling, int delayUs, schfunc_t callback, void *param) {
// scheduling->name = prefix;
void scheduleTask(scheduling_s *scheduling, int delayUs, schfunc_t callback, void *param) {
instance.scheduleByTime(scheduling, getTimeNowUs() + delayUs, callback, param);
}
void scheduleByTime(const bool monitorReuse, const char *prefix, scheduling_s *scheduling, efitimeus_t time, schfunc_t callback, void *param) {
// scheduling->name = prefix;
void scheduleByTime(scheduling_s *scheduling, efitimeus_t time, schfunc_t callback, void *param) {
instance.scheduleByTime(scheduling, time, callback, param);
}

View File

@ -155,7 +155,7 @@ static void timerCallback(PwmConfig *state) {
efiAssertVoid(state->dbgNestingLevel < 25, "PWM nesting issue");
efitimeus_t switchTimeUs = togglePwmState(state);
scheduleByTime(false, "pwm", &state->scheduling, switchTimeUs, (schfunc_t) timerCallback, state);
scheduleByTime(&state->scheduling, switchTimeUs, (schfunc_t) timerCallback, state);
state->dbgNestingLevel--;
}

View File

@ -26,7 +26,7 @@ public:
bool isScheduled;
};
void scheduleTask(const bool monitorReuse, const char *prefix, scheduling_s *scheduling, int delayUs, schfunc_t callback, void *param);
void scheduleByTime(const bool monitorReuse, const char *prefix, scheduling_s *scheduling, efitimeus_t time, schfunc_t callback, void *param);
void scheduleTask(scheduling_s *scheduling, int delayUs, schfunc_t callback, void *param);
void scheduleByTime(scheduling_s *scheduling, efitimeus_t time, schfunc_t callback, void *param);
#endif /* SCHEDULER_H_ */

View File

@ -34,8 +34,8 @@
#if EFI_SIGNAL_EXECUTOR_SLEEP || defined(__DOXYGEN__)
void scheduleByTime(const bool monitorReuse, const char *prefix, scheduling_s *scheduling, efitimeus_t time, schfunc_t callback, void *param) {
scheduleTask(monitorReuse, prefix, scheduling, time - getTimeNowUs(), callback, param);
void scheduleByTime(const char *prefix, scheduling_s *scheduling, efitimeus_t time, schfunc_t callback, void *param) {
scheduleTask(scheduling, time - getTimeNowUs(), callback, param);
}
static void timerCallback(scheduling_s *scheduling) {
@ -52,7 +52,7 @@ static void timerCallback(scheduling_s *scheduling) {
}
void scheduleTask(const bool monitorReuse, const char *prefix, scheduling_s *scheduling, int delayUs, schfunc_t callback, void *param) {
void scheduleTask(scheduling_s *scheduling, int delayUs, schfunc_t callback, void *param) {
int delaySt = MY_US2ST(delayUs);
if (delaySt <= 0) {
/**

View File

@ -27,7 +27,7 @@ static void tachSignalCallback(trigger_event_e ckpSignalType,
return;
}
enginePins.tachOut.setHigh();
scheduleTask(false, "tach off", &tachTurnSignalOff, (int)MS2US(engineConfiguration->tachPulseDuractionMs), (schfunc_t) &turnTachPinLow, NULL);
scheduleTask(&tachTurnSignalOff, (int)MS2US(engineConfiguration->tachPulseDuractionMs), (schfunc_t) &turnTachPinLow, NULL);
}
void initTachometer(void) {

View File

@ -209,7 +209,7 @@ static void seScheduleByTime(const char *prefix, scheduling_s *scheduling, efiti
printf("seScheduleByTime %s %s %d sch=%d\r\n", direction, param->name, (int)time, (int)scheduling);
#endif /* FUEL_MATH_EXTREME_LOGGING || EFI_UNIT_TEST */
scheduleByTime(true, prefix, scheduling, time, callback, pair);
scheduleByTime(scheduling, time, callback, pair);
}
static void scheduleFuelInjection(int rpm, OutputSignalPair *pair, efitimeus_t nowUs, floatus_t delayUs, floatus_t durationUs, InjectionEvent *event DECLARE_ENGINE_PARAMETER_S) {
@ -318,8 +318,8 @@ static ALWAYS_INLINE void handleFuelInjectionEvent(int injEventIndex, InjectionE
// todo: sequential need this logic as well, just do not forget to clear flag pair->isScheduled = true;
scheduling_s * sDown = &pair->signalTimerDown;
scheduleTask(true, "out up s", sUp, (int) injectionStartDelayUs, (schfunc_t) &startSimultaniousInjection, event);
scheduleTask(true, "out down", sDown, (int) injectionStartDelayUs + MS2US(injectionDuration),
scheduleTask(sUp, (int) injectionStartDelayUs, (schfunc_t) &startSimultaniousInjection, event);
scheduleTask(sDown, (int) injectionStartDelayUs + MS2US(injectionDuration),
(schfunc_t) &endSimultaniousInjection, event);
} else {

View File

@ -316,7 +316,7 @@ void scheduleByAngle(int rpm, scheduling_s *timer, angle_t angle,
efiAssertVoid(isValidRpm(rpm), "RPM check expected");
float delayUs = calc->oneDegreeUs * angle;
efiAssertVoid(!cisnan(delayUs), "NaN delay?");
scheduleTask(false, "by angle", timer, (int) delayUs, callback, param);
scheduleTask(timer, (int) delayUs, callback, param);
}
#endif

View File

@ -166,7 +166,7 @@ static ALWAYS_INLINE void handleSparkEvent(bool limitedSpark, uint32_t trgEventI
* This way we make sure that coil dwell started while spark was enabled would fire and not burn
* the coil.
*/
scheduleTask(false, "spark up", sUp, chargeDelayUs, (schfunc_t) &turnSparkPinHigh, iEvent);
scheduleTask(sUp, chargeDelayUs, (schfunc_t) &turnSparkPinHigh, iEvent);
}
/**
* Spark event is often happening during a later trigger event timeframe
@ -190,7 +190,7 @@ static ALWAYS_INLINE void handleSparkEvent(bool limitedSpark, uint32_t trgEventI
scheduleMsg(logger, "scheduling sparkDown ind=%d %d %s now=%d %d later id=%d", trgEventIndex, getRevolutionCounter(), iEvent->getOutputForLoggins()->name, (int)getTimeNowUs(), (int)timeTillIgnitionUs, iEvent->sparkId);
#endif /* FUEL_MATH_EXTREME_LOGGING */
scheduleTask(false, "spark1 down", sDown, (int) timeTillIgnitionUs, (schfunc_t) &turnSparkPinLow, iEvent);
scheduleTask(sDown, (int) timeTillIgnitionUs, (schfunc_t) &turnSparkPinLow, iEvent);
} else {
#if SPARK_EXTREME_LOGGING || defined(__DOXYGEN__)
scheduleMsg(logger, "to queue sparkDown ind=%d %d %s %d for %d", trgEventIndex, getRevolutionCounter(), iEvent->getOutputForLoggins()->name, (int)getTimeNowUs(), iEvent->sparkPosition.eventIndex);
@ -334,7 +334,7 @@ void handleSpark(bool limitedSpark, uint32_t trgEventIndex, int rpm
float timeTillIgnitionUs = ENGINE(rpmCalculator.oneDegreeUs) * current->sparkPosition.angleOffset;
scheduleTask(false, "spark 2down", sDown, (int) timeTillIgnitionUs, (schfunc_t) &turnSparkPinLow, current);
scheduleTask(sDown, (int) timeTillIgnitionUs, (schfunc_t) &turnSparkPinLow, current);
}
}

View File

@ -18,15 +18,15 @@ EventQueue schedulingQueue;
bool_t debugSignalExecutor = false;
void scheduleTask(const bool monitorReuse, const char *msg, scheduling_s *scheduling, int delayUs,
void scheduleTask(scheduling_s *scheduling, int delayUs,
schfunc_t callback, void *param) {
if (debugSignalExecutor) {
printf("scheduleTask %d\r\n", delayUs);
}
scheduleByTime(monitorReuse, msg, scheduling, getTimeNowUs() + delayUs, callback, param);
scheduleByTime(scheduling, getTimeNowUs() + delayUs, callback, param);
}
void scheduleByTime(const bool monitorReuse, const char *prefix, scheduling_s *scheduling,
void scheduleByTime(scheduling_s *scheduling,
efitimeus_t time, schfunc_t callback, void *param) {
if (debugSignalExecutor) {
printf("scheduleByTime %d\r\n", time);