Open FlashStopFall opened 1 week ago
Interesting. I found that I can put the car in park/neutral and wait 5-10 seconds, and it will correctly show instant mpg after that every time. Then when I come to stop again, and the screen goes to the "park" screen (no vehicle movement) if I don't shift to park/neutral, it will continue to read the g/h rate which replaces mpg on the "park" screen. I wonder if there is a fuel rate threshold for stopping/restarting the instant mpg reading? Because that's the only thing really noticeably different from idling in gear (idle in gear at 0.78-0.88g/h, idle in neutral 0.47-0.68g/h).
Instant MPG seemingly randomly reports fuel flow (g/h for my settings) instead of MPG. Affects every screen as well as serial output. It seems to be working correctly about 20% of the time, and showing fuel flow the other 80%. It usually starts working, and then stops working after coming to a stop. Sometimes though it doesn't start in a working condition, and sometimes it will come back after driving (usually after coming to a halt).
From what I can tell, fuel economy is calculated in prgmFuelEcon() in functions.h.
So it seems like it calculates (amount of fuel/amount of distance) and then swaps the numerator and denominator to get (distance/fuel). (I'm using U.S. settings). So if I'm only getting (amount of fuel) reported instead of (distance/fuel), it seems like the code must be first calculating (fuel/distance), somehow loosing (distance) (or setting it = 1?) and then not swapping the numerator and denominator before returning the value.
I'll start looking here.