Skip to content

Commit

Permalink
Record VVT angle when Poll cam method is in use. Fixes speeduino#1213
Browse files Browse the repository at this point in the history
  • Loading branch information
noisymime committed May 26, 2024
1 parent 84e63d8 commit bff1bec
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions speeduino/decoders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ void triggerSec_missingTooth(void)
secondaryToothCount = 1;
revolutionOne = 1; //Sequential revolution reset
triggerSecFilterTime = 0; //This is used to prevent a condition where serious intermittent signals (Eg someone furiously plugging the sensor wire in and out) can leave the filter in an unrecoverable state
triggerRecordVVT1Angle ();
triggerRecordVVT1Angle();
}
else
{
Expand All @@ -638,12 +638,18 @@ void triggerSec_missingTooth(void)
}
break;

case SEC_TRIGGER_POLL:
//Poll is effectively the same as SEC_TRIGGER_SINGLE, however we do not reset revolutionOne or change the filter
//We do still need to record the angle for VVT though
triggerRecordVVT1Angle();
break;

case SEC_TRIGGER_SINGLE:
//Standard single tooth cam trigger
revolutionOne = 1; //Sequential revolution reset
triggerSecFilterTime = curGap2 >> 1; //Next secondary filter is half the current gap
secondaryToothCount++;
triggerRecordVVT1Angle ();
triggerRecordVVT1Angle();
break;

case SEC_TRIGGER_TOYOTA_3:
Expand All @@ -653,7 +659,7 @@ void triggerSec_missingTooth(void)
if(secondaryToothCount == 2)
{
revolutionOne = 1; // sequential revolution reset
triggerRecordVVT1Angle ();
triggerRecordVVT1Angle();
}
//Next secondary filter is 25% the current gap, done here so we don't get a great big gap for the 1st tooth
triggerSecFilterTime = curGap2 >> 2;
Expand Down

0 comments on commit bff1bec

Please sign in to comment.