I spoke too soon. Last night I saw the GPH jump high again while using the injector tapped signal. So, the problem is not solved and it's not unique to the ECU signal. I'm digging deeper into the code now.
To clarify, this may be a problem only with instantgph(). I suspect that when the injector signal goes flatline, the injector temp variables are reset in loop(). Because there are no injector events happening, the inj open/closed routines never run and the variables are not updated from their reset state. The next time through loop(), the reset values are passed to the display routine which calls instantgph(). instantgph() calls div64 with a zero denominator which then returns 0xFFFFFFFF. So, the GPH value displayed is a very large number.
I'm experimenting to confirm that's what's happening.
Last edited by rmccomiskie; 02-17-2009 at 12:51 PM..
|