From fdb6e492fb04f5a1d184d54f361abf97c3a4998b Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Mon, 22 Jan 2024 17:23:13 +1100 Subject: [PATCH] Enable Daihatsu+1 decoder for sequential. Tested on 3 cylinder configuration Fixes #1126 --- speeduino/decoders.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/speeduino/decoders.cpp b/speeduino/decoders.cpp index 0b388311..e272d409 100644 --- a/speeduino/decoders.cpp +++ b/speeduino/decoders.cpp @@ -3216,7 +3216,7 @@ void triggerSetup_Daihatsu(void) triggerFilterTime = MICROS_PER_MIN / MAX_RPM / configPage2.nCylinders; // Minimum time required between teeth triggerFilterTime = triggerFilterTime / 2; //Safety margin BIT_CLEAR(decoderState, BIT_DECODER_2ND_DERIV); - BIT_CLEAR(decoderState, BIT_DECODER_IS_SEQUENTIAL); + BIT_SET(decoderState, BIT_DECODER_IS_SEQUENTIAL); BIT_CLEAR(decoderState, BIT_DECODER_HAS_SECONDARY); MAX_STALL_TIME = ((MICROS_PER_DEG_1_RPM/90U) * triggerToothAngle)*4U;//Minimum 90rpm. (1851uS is the time per degree at 90rpm). This uses 90rpm rather than 50rpm due to the potentially very high stall time on a 4 cylinder if we wait that long.