doesn't need to pass callback (#1399)

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
Matthew Kennedy 2020-05-06 05:38:15 -07:00 committed by GitHub
parent 1e413cf7eb
commit 484ab6aa97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -55,9 +55,9 @@ static void tachSignalCallback(trigger_event_e ckpSignalType,
}
// What is the angle per tach output period?
float cycleTimeMs = 60000.0 / GET_RPM();
float cycleTimeMs = 60000.0f / GET_RPM();
float periodTimeMs = cycleTimeMs / periods;
tachFreq = 1000.0 / periodTimeMs;
tachFreq = 1000.0f / periodTimeMs;
if (CONFIG(tachPulseDurationAsDutyCycle)) {
// Simple case - duty explicitly set
@ -68,7 +68,7 @@ static void tachSignalCallback(trigger_event_e ckpSignalType,
}
// In case Freq is under 1Hz, we stop pwm to avoid warnings!
if (tachFreq < 1.0) {
if (tachFreq < 1) {
tachFreq = NAN;
}
@ -87,7 +87,7 @@ void initTachometer(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
&engine->executor,
CONFIG(tachOutputPin),
&enginePins.tachOut,
NAN, 0.1, (pwm_gen_callback*)applyPinState);
NAN, 0.1f);
#if EFI_SHAFT_POSITION_INPUT
addTriggerEventListener(tachSignalCallback, "tach", engine);