View Single Post
Old 11-22-2016, 12:12 AM   #27 (permalink)
t vago
MPGuino Supporter
t vago's Avatar
Join Date: Oct 2010
Location: Cedar Rapids, IA
Posts: 1,766

The Karen-Mobile - '05 Dodge Magnum SXT
Team Dodge
90 day: 26.72 mpg (US)

Fiat Dakota - '00 Dodge Dakota SLT RWD Quad Cab
90 day: 16.67 mpg (US)

The Red Sled - '01 Dodge Durango SLT 4WD
90 day: 16.96 mpg (US)
Thanks: 799
Thanked 681 Times in 437 Posts
So, here's the updated code. Haven't gotten the drag race functionality working fully yet. Be sure to configure the #defines to match your Arduino before compiling.

There is a chance that the LCD display may not work. Haven't gotten to test the LCD output with the code re-write.

A doOutputJSON serial speed of 38400 baud appears to keep the CPU loading at around 100%. Not a big deal, as all that really means is that the it'll take slightly over 1/2 a second to complete a display update loop, instead of under 1/2 a second. The injector and VSS measurements are not affected at all.

Do not try to swap between US and metric modes - something apparently broke that causes the code to hang when switching between modes is attempted.

Perhaps increasing the serial buffer size, in conjunction with disabling the LCD output, may drop the CPU loading to well under 100%. I may also look at trying to speed up the SWEET64 primitive operations.

Other code improvements center around making various low-level operations more memory efficient, improving readability of some configuration selections, and a good amount of commenting.

Update: The current version of my MPGuino code may be found here.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2016-11-21 23-02-29.png
Views:	186
Size:	86.6 KB
ID:	20951  
The Fiat Dakota

The Karen-mobile

The Red Sled

Last edited by t vago; 01-06-2017 at 12:15 AM.. Reason: Added link to current code
  Reply With Quote