rollback to Dec 1 logic without offset fix
This commit is contained in:
rusEfi 2017-12-03 17:30:56 -05:00
parent 1bac61caa3
commit 9b54088dbe
1 changed files with 4 additions and 0 deletions

View File

@ -51,12 +51,16 @@ static void auxValveTriggerCallback(trigger_event_e ckpSignalType,
NamedOutputPin *output = &enginePins.auxValve[valveIndex];
for (int phaseIndex = 0; phaseIndex < 2; phaseIndex++) {
/* I believe a more correct implementation is the following:
* here we properly account for trigger angle position in engine cycle coordinates
// todo: at the moment this logic is assuming four-stroke 720-degree engine cycle
angle_t extra = phaseIndex * 360 // cycle opens twice per 720 engine cycle
+ valveIndex * 180 // 2nd valve is operating at 180 offset to first
+ tdcPosition() // engine cycle position to trigger cycle position conversion
- ENGINE(triggerCentral.triggerShape.eventAngles[SCHEDULING_TRIGGER_INDEX])
;
*/
angle_t extra = phaseIndex * 360 + valveIndex * 180;
angle_t onTime = extra + engine->engineState.auxValveStart;
fixAngle(onTime, "onTime");
scheduleByAngle(rpm, &turnOnEvent[valveIndex][phaseIndex],