View Single Post
Old 01-11-2009, 08:29 PM   #1 (permalink)
EcoModding Lurker
Join Date: Dec 2008
Location: Ohio
Posts: 13

DarkFit - '08 Honda Fit Sport
90 day: 32.78 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Suggested MPGuino change: average speed

I've been playing with my newly built MPGuino and thought I could improve on some of the features. I noticed that the mph of the current and tank trips would just trickle down after the car was stopped and even off. I want it to only calculate the average speed while moving. I've attached my suggested code changes.

I removed the "tankHold" variable and replaced it with "sleeping"

The code near "//currentTripResetTimeoutUS" has been changed and is a little cleaner. I also removed what I think are redundant calls to update().

Also changed:
"loopCount++;" -> "if(t.vssPulses) loopCount++;"

These code changes cause the mph average for the current and tank to not include when the vehicle is stopped and the timer on the last screen will only count up when the car is moving.

Attached Files
File Type: zip (10.4 KB, 39 views)
  Reply With Quote