Enable Daihatsu+1 decoder for sequential. Tested on 3 cylinder configuration

Fixes #1126
This commit is contained in:
Josh Stewart 2024-01-22 17:23:13 +11:00
parent f49d6ca5d8
commit fdb6e492fb
1 changed files with 1 additions and 1 deletions

View File

@ -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.