diff --git a/firmware/controllers/trigger/decoders/trigger_misc.h b/firmware/controllers/trigger/decoders/trigger_misc.h index 4a63240dbf..a9e80eca09 100644 --- a/firmware/controllers/trigger/decoders/trigger_misc.h +++ b/firmware/controllers/trigger/decoders/trigger_misc.h @@ -12,4 +12,5 @@ void configureFiatIAQ_P8(TriggerWaveform * s); void configureDaihatsu4(TriggerWaveform * s); void configureFordST170(TriggerWaveform * s); +void configureTriTach(TriggerWaveform * s); diff --git a/firmware/controllers/trigger/decoders/trigger_universal.cpp b/firmware/controllers/trigger/decoders/trigger_universal.cpp index 16c74292f2..e2985fadb9 100644 --- a/firmware/controllers/trigger/decoders/trigger_universal.cpp +++ b/firmware/controllers/trigger/decoders/trigger_universal.cpp @@ -28,6 +28,7 @@ void addSkippedToothTriggerEvents(trigger_wheel_e wheel, TriggerWaveform *s, int float angleDown = engineCycle / totalTeethCount * (totalTeethCount - skippedCount - 1 + (1 - toothWidth)); s->addEventClamped(offset + angleDown, wheel, TV_RISE, filterLeft, filterRight); + // custom handling of last event in order to avoid rounding error s->addEventClamped(offset + engineCycle, wheel, TV_FALL, filterLeft, filterRight); }