Before I go through alot of work...
would efi live calc pid support embedded iff's? six deep?
Printable View
Before I go through alot of work...
would efi live calc pid support embedded iff's? six deep?
Yes. EFI live does support them it seems.
iff(boolean_condition, then_calculation, else_calculation)
Such would be correct.
But no case statments, elseifs, do whiles or fors..... sigh
Basically I fabbed a casestatement from 7 embedded if statements. It is super hard to logically understand by just looking at it but it seems to work ok. It kinda guesses what gear I am in. Seems to work.
Cool ... care to share?
Could do that. Do you have M6 or A4? I don't think it would work for A4 due to stall up and the 4L60E can only lock up in 3 and 4.
Basically, I took the theory that MPH/RPM was appox constant IN GEAR and fell in a certain range for each gear.
Like this:
IF MPH/RPM>X AND MPH/RPM<Y,
......gear = 6
..........ELSE
...............IF MPH/RPM > A AND MPH/RPM <B,
....................gear =5
..........................ELSE
........
the periods are to mark the position
I made a case for each gear and finally I stated if it isn't in any of those ranges just say 0. 0 could mean alot of slipping or not moving or in N.
What gears do you have? I wrote out code for my car. It is a M6 with 4,56 gears.
I can't test it much because my laptop battery dies in less than 1 min. I applied it to a logged file and it seemed to work. Haven't tested in real time yet.
lookup(x, a1,b1, a2,b2, a3,b3, ...)
let x = MPH/RPM
then gear = look(x, x0,0, x1,gear1, x2,gear2, x3,gear3, x4,gear4, x5,gear5, x6,gear6, x7,0)
Mine is an M6 w/ 3.73 ... sounds pretty straightforward ...