Handle 3 cylinder, non-seq, staging with >= 6 fuel channels

This commit is contained in:
Josh Stewart 2023-04-16 17:20:39 +10:00
parent f32efa7aee
commit 90530f65a3
1 changed files with 9 additions and 0 deletions

View File

@ -741,6 +741,15 @@ void loop(void)
}
#endif
}
else if( (configPage10.stagingEnabled == true) && (BIT_CHECK(currentStatus.status4, BIT_STATUS4_STAGING_ACTIVE) == true) )
{
PWdivTimerPerDegree = div(currentStatus.PW4, timePerDegree).quot; //Need to redo this for PW3 as it will be dramatically different to PW1 when staging
injector4StartAngle = calculateInjectorStartAngle(PWdivTimerPerDegree, channel1InjDegrees);
#if INJ_CHANNELS >= 6
injector5StartAngle = calculateInjectorStartAngle(PWdivTimerPerDegree, channel2InjDegrees);
injector6StartAngle = calculateInjectorStartAngle(PWdivTimerPerDegree, channel3InjDegrees);
#endif
}
break;
//4 cylinders
case 4: