View Single Post
Old 02-01-2017, 08:09 PM   #78 (permalink)
skybolt
deviant
 
Join Date: Oct 2016
Location: Seattle, WA
Posts: 69

s2k - '02 Honda s2000
Thanks: 12
Thanked 47 Times in 35 Posts
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.
  Reply With Quote
The Following User Says Thank You to skybolt For This Useful Post:
t vago (02-02-2017)