refactoring: removing unused parameter
This commit is contained in:
parent
d4574a3cab
commit
eb4ceda52b
|
@ -266,7 +266,7 @@ static void mapAveragingTriggerCallback(trigger_event_e ckpEventType,
|
||||||
#if EFI_ENGINE_CONTROL
|
#if EFI_ENGINE_CONTROL
|
||||||
// this callback is invoked on interrupt thread
|
// this callback is invoked on interrupt thread
|
||||||
UNUSED(ckpEventType);
|
UNUSED(ckpEventType);
|
||||||
if (index != CONFIG(mapAveragingSchedulingAtIndex))
|
if (index != (uint32_t)CONFIG(mapAveragingSchedulingAtIndex))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
engine->m.beforeMapAveragingCb = getTimeNowLowerNt();
|
engine->m.beforeMapAveragingCb = getTimeNowLowerNt();
|
||||||
|
@ -310,9 +310,9 @@ static void mapAveragingTriggerCallback(trigger_event_e ckpEventType,
|
||||||
// we are loosing precision in case of changing RPM - the further away is the event the worse is precision
|
// we are loosing precision in case of changing RPM - the further away is the event the worse is precision
|
||||||
// todo: schedule this based on closest trigger event, same as ignition works
|
// todo: schedule this based on closest trigger event, same as ignition works
|
||||||
scheduleByAngle(rpm, &startTimer[i][structIndex], samplingStart,
|
scheduleByAngle(rpm, &startTimer[i][structIndex], samplingStart,
|
||||||
startAveraging, NULL, &engine->rpmCalculator PASS_ENGINE_PARAMETER_SUFFIX);
|
startAveraging, NULL PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
scheduleByAngle(rpm, &endTimer[i][structIndex], samplingEnd,
|
scheduleByAngle(rpm, &endTimer[i][structIndex], samplingEnd,
|
||||||
endAveraging, NULL, &engine->rpmCalculator PASS_ENGINE_PARAMETER_SUFFIX);
|
endAveraging, NULL PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
engine->m.mapAveragingCbTime = getTimeNowLowerNt()
|
engine->m.mapAveragingCbTime = getTimeNowLowerNt()
|
||||||
- engine->m.beforeMapAveragingCb;
|
- engine->m.beforeMapAveragingCb;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,12 +66,12 @@ static void auxValveTriggerCallback(trigger_event_e ckpSignalType,
|
||||||
fixAngle(onTime, "onTime", CUSTOM_ERR_6556);
|
fixAngle(onTime, "onTime", CUSTOM_ERR_6556);
|
||||||
scheduleByAngle(rpm, &turnOnEvent[valveIndex][phaseIndex],
|
scheduleByAngle(rpm, &turnOnEvent[valveIndex][phaseIndex],
|
||||||
onTime,
|
onTime,
|
||||||
(schfunc_t) &turnOn, output, &engine->rpmCalculator);
|
(schfunc_t) &turnOn, output);
|
||||||
angle_t offTime = extra + engine->engineState.auxValveEnd;
|
angle_t offTime = extra + engine->engineState.auxValveEnd;
|
||||||
fixAngle(offTime, "offTime", CUSTOM_ERR_6557);
|
fixAngle(offTime, "offTime", CUSTOM_ERR_6557);
|
||||||
scheduleByAngle(rpm, &turnOffEvent[valveIndex][phaseIndex],
|
scheduleByAngle(rpm, &turnOffEvent[valveIndex][phaseIndex],
|
||||||
offTime,
|
offTime,
|
||||||
(schfunc_t) &turnOff, output, &engine->rpmCalculator);
|
(schfunc_t) &turnOff, output);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -314,7 +314,7 @@ static void tdcMarkCallback(trigger_event_e ckpSignalType,
|
||||||
// todo: use tooth event-based scheduling, not just time-based scheduling
|
// todo: use tooth event-based scheduling, not just time-based scheduling
|
||||||
if (isValidRpm(rpm)) {
|
if (isValidRpm(rpm)) {
|
||||||
scheduleByAngle(rpm, &tdcScheduler[revIndex2], tdcPosition(),
|
scheduleByAngle(rpm, &tdcScheduler[revIndex2], tdcPosition(),
|
||||||
(schfunc_t) onTdcCallback, NULL, &engine->rpmCalculator);
|
(schfunc_t) onTdcCallback, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -355,9 +355,7 @@ void initRpmCalculator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
* it takes the crankshaft to rotate to the specified angle.
|
* it takes the crankshaft to rotate to the specified angle.
|
||||||
*/
|
*/
|
||||||
void scheduleByAngle(int rpm, scheduling_s *timer, angle_t angle,
|
void scheduleByAngle(int rpm, scheduling_s *timer, angle_t angle,
|
||||||
schfunc_t callback, void *param, RpmCalculator *calc DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
schfunc_t callback, void *param DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
// todo: remove 'calc' parameter
|
|
||||||
UNUSED(rpm);
|
|
||||||
efiAssertVoid(CUSTOM_ANGLE_NAN, !cisnan(angle), "NaN angle?");
|
efiAssertVoid(CUSTOM_ANGLE_NAN, !cisnan(angle), "NaN angle?");
|
||||||
efiAssertVoid(CUSTOM_ERR_6634, isValidRpm(rpm), "RPM check expected");
|
efiAssertVoid(CUSTOM_ERR_6634, isValidRpm(rpm), "RPM check expected");
|
||||||
float delayUs = ENGINE(rpmCalculator.oneDegreeUs) * angle;
|
float delayUs = ENGINE(rpmCalculator.oneDegreeUs) * angle;
|
||||||
|
|
|
@ -166,6 +166,6 @@ float getCrankshaftAngleNt(efitime_t timeNt DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
#define addEngineSnifferEvent(n, msg) {}
|
#define addEngineSnifferEvent(n, msg) {}
|
||||||
#endif /* EFI_ENGINE_SNIFFER */
|
#endif /* EFI_ENGINE_SNIFFER */
|
||||||
|
|
||||||
void scheduleByAngle(int rpm, scheduling_s *timer, angle_t angle, schfunc_t callback, void *param, RpmCalculator *calc DECLARE_ENGINE_PARAMETER_SUFFIX);
|
void scheduleByAngle(int rpm, scheduling_s *timer, angle_t angle, schfunc_t callback, void *param DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#endif /* RPM_REPORTER_H_ */
|
#endif /* RPM_REPORTER_H_ */
|
||||||
|
|
|
@ -255,13 +255,13 @@ static void intHoldCallback(trigger_event_e ckpEventType, uint32_t index DECLARE
|
||||||
int structIndex = getRevolutionCounter() % 2;
|
int structIndex = getRevolutionCounter() % 2;
|
||||||
// todo: schedule this based on closest trigger event, same as ignition works
|
// todo: schedule this based on closest trigger event, same as ignition works
|
||||||
scheduleByAngle(rpm, &startTimer[structIndex], engineConfiguration->knockDetectionWindowStart,
|
scheduleByAngle(rpm, &startTimer[structIndex], engineConfiguration->knockDetectionWindowStart,
|
||||||
(schfunc_t) &startIntegration, NULL, &engine->rpmCalculator);
|
(schfunc_t) &startIntegration, NULL PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
hipLastExecutionCount = lastExecutionCount;
|
hipLastExecutionCount = lastExecutionCount;
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
scheduleByAngle(rpm, &endTimer[structIndex], engineConfiguration->knockDetectionWindowEnd,
|
scheduleByAngle(rpm, &endTimer[structIndex], engineConfiguration->knockDetectionWindowEnd,
|
||||||
(schfunc_t) &endIntegration,
|
(schfunc_t) &endIntegration,
|
||||||
NULL, &engine->rpmCalculator);
|
NULL PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
engine->m.hipCbTime = getTimeNowLowerNt() - engine->m.beforeHipCb;
|
engine->m.hipCbTime = getTimeNowLowerNt() - engine->m.beforeHipCb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue