![]() |
Instant GPH jitter fix
I noticed the instant GPH value jumping around at idle between 2 fairly stable values, eg. .12 .12 .12 .15 .12 .12 .12 .12 .15 .12 .12
I looked at the code and found what seems to be an error in how the instant injector time is calculated. Injector pulses are counted toward the instant calculation but if the trailing "off" portion of the cycle isn't complete the elapsed time containing the pulse isn't counted. So you get a spurious GPH increase whenever this happens. This error only affects the instant GPH and MPG values. Current and tank values are accurate. I fixed it by counting the instant pulse time and elapsed time together at the end of the injector pulse (so the "off" portion begins each cycle) and now the instant GPH value is rock solid. Code:
void processInjOpen(void){ |
Cool, I will take a look at it at my first opportunity.
|
Ok, I like it :)
I ran it in parallel with the previous version at a fairly constant consumption rate for several minutes and its displayed value corresponded well with the accumulated fuel/time for the trip display. |
Question for you both. I just finally got my MPGuino in my car and wired into an injector. I don't have VSS yet, but I've been working on my GPH number. I noticed when I was running it on my desk just to test things out and input my variables, that sometimes the GPH number would fluctuate even though there was nothing attached to the pin. If I stuck my finger on the USB connector shield, it seemed to stop - almost as if it needed additional grounding.
Is my issue and this fix related? I haven't noticed it occur in the car with the injector actually wired in finally, but I can't guarantee that it's not occurring either. |
nothing attached=all bets off :)
|
Ah, go figure. I had it plugged in to power just sitting next to me at work one day. Display was on big instant, so that if people walked by and saw MPG they might ask about it. I look down, and instead of 00.0 it says 999 INST MPG! I don't know where the data came from, but I haven't had issues with it since plugging in.
|
mine does not indicate mpguino l / h at idle
show only if speed is greater which may indicate liters / h? use code 075 |
All times are GMT -4. The time now is 09:01 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com