mirror of https://github.com/FOME-Tech/fome-fw.git
wrap atdc timing correctly
This commit is contained in:
parent
6bbe6ba8b4
commit
4140b824fb
|
@ -80,6 +80,11 @@ static void prepareCylinderIgnitionSchedule(angle_t dwellAngleDuration, floatms_
|
|||
// Pull any extra timing for knock retard
|
||||
- engine->module<KnockController>()->getKnockRetard();
|
||||
|
||||
// 10 ATDC ends up as 710, convert it to -10 so we can log and clamp correctly
|
||||
if (finalIgnitionTiming > 360) {
|
||||
finalIgnitionTiming -= 720;
|
||||
}
|
||||
|
||||
// Clamp the final ignition timing to the configured limits
|
||||
// finalIgnitionTiming is deg BTDC
|
||||
// minimumIgnitionTiming limits maximium retard
|
||||
|
|
Loading…
Reference in New Issue