Allow for swapped polarity on 4G63 decoder

This commit is contained in:
Josh Stewart 2015-07-27 21:59:03 +10:00
parent 322f0f6795
commit 5b103b4959
2 changed files with 11 additions and 3 deletions

View File

@ -262,9 +262,17 @@ void setup()
getCrankAngle = getCrankAngle_4G63;
//These may both need to change, not sure
if(configPage2.TrigEdge == 0) { attachInterrupt(triggerInterrupt, trigger, RISING); } // Attach the crank trigger wheel interrupt (Hall sensor drags to ground when triggering)
else { attachInterrupt(triggerInterrupt, trigger, FALLING); } // Primary trigger connects to
attachInterrupt(triggerInterrupt2, triggerSec_4G63, FALLING);
if(configPage2.TrigEdge == 0)
{
attachInterrupt(triggerInterrupt, trigger, RISING); // Attach the crank trigger wheel interrupt (Hall sensor drags to ground when triggering)
attachInterrupt(triggerInterrupt2, triggerSec_4G63, FALLING);
}
else
{
attachInterrupt(triggerInterrupt, trigger, FALLING); // Primary trigger connects to
attachInterrupt(triggerInterrupt2, triggerSec_4G63, RISING);
}
break;
case 5: