One more issue to contend with that merits a standalone post. What to do about engine-off-coasting and instant MPG?
I changed the overflow return value -------- to 999999 (or so), which then calculates instant MPG as 4294967.295. This isn't bad ... people might like that. But, it's not exactly factory polish.
Option 1:
In the displayJSON code
Quote:
reserveQuantity = doCalculate(instantIdx, tFuelEcon)
if (reserveQuantity >= 9999) text::stringOut(devLogSerial, PSTR("infinite
MPG, "));
|
The text string could also be blank, an arbitrarily high number (such as 999999), or even ∞MPG. Personally, I like ∞.
I cannot determine an effective way to do this outside of the JSON render code (i.e. mathematically inside the instantMPG calculation, based on 0 fuel and positive speed).
I'm going to add this "∞ mpg" to your 0116 code base right now and test it in the morning.