MembersPage/GergelyLezsak/MegaTune

Megatune related

I'm using Megatune2.25b431 with vemsv3.ini r022

Injector DutyCycle? is calculated wrong way in my case, I guess I got 3x values of actual duty-cycle

Original section from vemsv3.ini:

altDiv           = { alternate ? 2 : 1 }
cycleTime        = { 60000.0 / rpm * (2.0-twoStroke)}
nSquirts         = { nCylinders/divider }
dutyCycle        = { 100.0*nSquirts/altDiv*pulseWidth/cycleTime }

This code can support only one or two injection banks (according to MegaSquirt's capabilities).

If someone (like me) using different channels for each injector and using only one squirts per cycle can use the code simplified in r024 to:

dutyCycle        = { 100.0*pulseWidth/cycleTime   }

I think this simplification is good for the configs like mine but goes wrong when banks are used ore there are more than one squirts per cycle.

My guess for a good config is:

altDiv           = { alternate ? alternateCyl : 1 }
cycleTime        = { 60000.0 / rpm * (2.0-twoStroke)}
nSquirts         = { nCylinders/divider }
dutyCycle        = { 100.0*nSquirts/altDiv*pulseWidth/cycleTime }

Haven't tried it yet, but I think altDiv's true value has to be equal the number of used injection banks.

Example 1 (my case, six cylinders, six inj. channels):

Example 2 (6 cyls with 2 banks):