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] 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. * @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) { void scheduleTask(scheduling_s *scheduling, int delayUs, schfunc_t callback, void *param) {
// scheduling->name = prefix;
instance.scheduleByTime(scheduling, getTimeNowUs() + delayUs, callback, 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) { void scheduleByTime(scheduling_s *scheduling, efitimeus_t time, schfunc_t callback, void *param) {
// scheduling->name = prefix;
instance.scheduleByTime(scheduling, time, callback, 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"); efiAssertVoid(state->dbgNestingLevel < 25, "PWM nesting issue");
efitimeus_t switchTimeUs = togglePwmState(state); 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--; state->dbgNestingLevel--;
} }

View File

@ -26,7 +26,7 @@ public:
bool isScheduled; bool isScheduled;
}; };
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);
void scheduleByTime(const bool monitorReuse, const char *prefix, scheduling_s *scheduling, efitimeus_t time, schfunc_t callback, void *param); void scheduleByTime(scheduling_s *scheduling, efitimeus_t time, schfunc_t callback, void *param);
#endif /* SCHEDULER_H_ */ #endif /* SCHEDULER_H_ */

View File

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

View File

@ -27,7 +27,7 @@ static void tachSignalCallback(trigger_event_e ckpSignalType,
return; return;
} }
enginePins.tachOut.setHigh(); 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) { 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); printf("seScheduleByTime %s %s %d sch=%d\r\n", direction, param->name, (int)time, (int)scheduling);
#endif /* FUEL_MATH_EXTREME_LOGGING || EFI_UNIT_TEST */ #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) { 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; // todo: sequential need this logic as well, just do not forget to clear flag pair->isScheduled = true;
scheduling_s * sDown = &pair->signalTimerDown; scheduling_s * sDown = &pair->signalTimerDown;
scheduleTask(true, "out up s", sUp, (int) injectionStartDelayUs, (schfunc_t) &startSimultaniousInjection, event); scheduleTask(sUp, (int) injectionStartDelayUs, (schfunc_t) &startSimultaniousInjection, event);
scheduleTask(true, "out down", sDown, (int) injectionStartDelayUs + MS2US(injectionDuration), scheduleTask(sDown, (int) injectionStartDelayUs + MS2US(injectionDuration),
(schfunc_t) &endSimultaniousInjection, event); (schfunc_t) &endSimultaniousInjection, event);
} else { } else {

View File

@ -316,7 +316,7 @@ void scheduleByAngle(int rpm, scheduling_s *timer, angle_t angle,
efiAssertVoid(isValidRpm(rpm), "RPM check expected"); efiAssertVoid(isValidRpm(rpm), "RPM check expected");
float delayUs = calc->oneDegreeUs * angle; float delayUs = calc->oneDegreeUs * angle;
efiAssertVoid(!cisnan(delayUs), "NaN delay?"); efiAssertVoid(!cisnan(delayUs), "NaN delay?");
scheduleTask(false, "by angle", timer, (int) delayUs, callback, param); scheduleTask(timer, (int) delayUs, callback, param);
} }
#endif #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 * This way we make sure that coil dwell started while spark was enabled would fire and not burn
* the coil. * 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 * 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); 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 */ #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 { } else {
#if SPARK_EXTREME_LOGGING || defined(__DOXYGEN__) #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); 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; 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; 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) { schfunc_t callback, void *param) {
if (debugSignalExecutor) { if (debugSignalExecutor) {
printf("scheduleTask %d\r\n", delayUs); 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) { efitimeus_t time, schfunc_t callback, void *param) {
if (debugSignalExecutor) { if (debugSignalExecutor) {
printf("scheduleByTime %d\r\n", time); printf("scheduleByTime %d\r\n", time);