File tree 1 file changed +3
-1
lines changed
firmware/controllers/trigger
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -372,7 +372,9 @@ expected<TriggerDecodeResult> TriggerDecoderBase::decodeTriggerEvent(
372
372
ScopePerf perf (PE::DecodeTriggerEvent);
373
373
374
374
// Timeout below approximately 12 rpm, but a maximum of 1 second timeout
375
- float triggerTimeoutPeriod = std::min (5 .0f / triggerShape.getLength (), 1 .0f );
375
+ // Trigger shape length is ~4x tooth count (rise + fall / doubled for 4 stroke),
376
+ // so extra multiply by 4 then 5 second maximum revolution
377
+ float triggerTimeoutPeriod = clampF (0 .1f , 20 .0f / triggerShape.getLength (), 1 .0f );
376
378
if (previousEventTimer.getElapsedSecondsAndReset (nowNt) > triggerTimeoutPeriod) {
377
379
/* *
378
380
* We are here if there is a time gap between now and previous shaft event - that means the engine is not running.
You can’t perform that action at this time.
0 commit comments