Go Back   EcoModder Forum > EcoModding > Instrumentation > OpenGauge / MPGuino FE computer
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 09-05-2013, 03:07 PM   #41 (permalink)
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,808

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 831
Thanked 709 Times in 457 Posts
MPGuino v0.86tav RC1 (rename it, perhaps?)

Okay, here it is. The code was developed in a standalone text editor, was compiled using Arduino 1.0.5, and uploaded to my MPGuino JBD hardware via a Pololu AVR ISP V2 USB programmer.

Let me know of any thoughts or concerns.

Remember, the code is dependent on the clock speed of your device, so be sure to comment out/in the appopriate lines near the beginning of the file. 16MHz (not tested) and 20 MHz clocks are supported.

I'm thinking of getting rid of the buffered LCD code. The existing code really doesn't benefit all that much from it, any more.

Also thinking of being able to revert a stored EEPROM parameter or screen setting to the "factory" hard-coded default, via keypress.

Also thinking of allowing editing of stored trip values.

And, of course, the Chrysler correction factor code is still a work in progress. However, for the vast majority of y'all, that's not a concern.

Edit: Bloody! Wouldn't you know it? Already had to correct a typo. The Screen Editor should work now.

Edit 2: *facepalm* Corrected another typo - Screen Editor and Trip Save should correctly save to EEPROM, now.

Edit 3: SMH - Should have released the code tomorrow. Fixed typos related to EEPROM storage for the serial enable and the bargraph period stored settings.


Last edited by t vago; 05-11-2014 at 02:53 PM.. Reason: current MPGuino code version is at first post of this thread
  Reply With Quote
The Following 2 Users Say Thank You to t vago For This Useful Post:
AndrzejM (09-05-2013), nickdigger (09-05-2013)
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 09-05-2013, 04:00 PM   #42 (permalink)
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,808

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 831
Thanked 709 Times in 457 Posts
Short and sweet instructions:

For the main screen,

Left button - go left one screen
Right button - go right one screen
Long-press left - go left to next screen group
  • if at any trip value display, goes to system clock
  • if at system clock, goes to tank time-to-empty large number screen
  • if at tank TTE large number screen, goes to bargraph
  • if at bargraph, goes to system information
  • if at system information, goes to tank average fuel economy large number screen
  • if at any fuel economy large number screen, goes to last (of 8) trip value display screen
Long-press right - go right to next screen group
  • if at any trip value display, goes to instant fuel economy large number screen
  • if at any fuel economy large number screen, goes to system information
  • if at system information, goes to bargraph
  • if at bargraph, goes to tank TTE large number screen
  • if at tank TTE large number screen, goes to system clock
  • if at system clock, goes to first (of 8) trip value display screen
Short-press left and right -
  • if at system clock, goes to System Clock set mode
  • if at any other screen, goes to Stored Settings Editor
Long-press left and right -
  • if at a trip value display screen, goes to Trip Screen Editor
  • if at any other screen, displays "FAIL" for 2 seconds
Short-press left and center - Goes to Trip Save mode, centering on Tank Trip save
Short-press right and center - Goes to Trip Save mode, centering on Current Trip save
Long-press left and center - Resets Tank Trip
Long-press right and center - Resets Current Trip
Short-press Center - cycles through Brightness
Long-press Center - displays CPU loading for selected screen, for 2 seconds

Other screen modes use the following rules (or are supposed to, anyway):
Short-press left - cursor or screen left
Short-press right - cursor or screen right
Short-press center - change digit or trip slot
Long-press center -
  • in Trip Save mode, performs selected action
  • In all other modes, save value being edited
Short-press left and right - go back one mode
Long-press left or right - Revert edited setting back to saved, or go back one mode
  Reply With Quote
The Following User Says Thank You to t vago For This Useful Post:
AndrzejM (09-06-2013)
Old 09-05-2013, 04:27 PM   #43 (permalink)
EcoModding Apprentice
 
Join Date: Aug 2009
Location: terra firma
Posts: 138
Thanks: 4
Thanked 24 Times in 22 Posts
Quote:
Also thinking of being able to revert a stored EEPROM parameter or screen setting to the "factory" hard-coded default, via keypress.
I put this at the top of loadParams():**
Code:
  if (RightButton)
  {
    buttonState = buttonsUp;
    return 1;  // don't load parms from eeprom; use default compiled parms
  }
There's a similar check for LeftButton, to reset the saved tank data in the eeprom. The "prompt" for these hidden key features is the "MPGuino" startup screen, which gives you a 1.5 second delay to press (and hold) the key.


** i later removed the option, out of paranoia that i would accidentally clear my settings

Last edited by nickdigger; 09-05-2013 at 04:37 PM.. Reason: load() changed to loadParams()
  Reply With Quote
The Following User Says Thank You to nickdigger For This Useful Post:
t vago (09-05-2013)
Old 09-05-2013, 04:38 PM   #44 (permalink)
Master EcoModder
 
AndrzejM's Avatar
 
Join Date: Oct 2011
Location: Poland
Posts: 840

Berta - '97 BMW 318 tds Compact
90 day: 62.03 mpg (US)

Charlie - '07 Citroen C4 Grand Picasso Exclusive
90 day: 37.58 mpg (US)

Corsa - '05 Opel Corsa C
90 day: 53.22 mpg (US)

Mruczek - '03 Audi A2
90 day: 60.61 mpg (US)
Thanks: 185
Thanked 167 Times in 117 Posts
Thanks T_Vago! Hopefully I'll test it soon. Of course with a proper feedback
__________________


Quote:
Gerhard Plattner: "The best attitude is to consider fuel saving a kind of sport. Everybody who has enough money for a strong car, can drive fast and hit the pedal. But saving fuel requires concentration, self-control and cleverness. It's a challenge with the nice effect of saving you money that you can use for other more important things."
  Reply With Quote
Old 09-05-2013, 04:45 PM   #45 (permalink)
EcoModding Apprentice
 
Join Date: Aug 2009
Location: terra firma
Posts: 138
Thanks: 4
Thanked 24 Times in 22 Posts
Also, you should assign a higher version number (1.00tav? 0.98tav?) It certainly is a full step above and beyond the base. 0.86 might mislead someone to think that flashing your code would be plug-and-play. At a minimum, the stored params will be corrupted.
  Reply With Quote
The Following 2 Users Say Thank You to nickdigger For This Useful Post:
AndrzejM (09-05-2013), t vago (09-05-2013)
Old 09-05-2013, 04:48 PM   #46 (permalink)
Master EcoModder
 
AndrzejM's Avatar
 
Join Date: Oct 2011
Location: Poland
Posts: 840

Berta - '97 BMW 318 tds Compact
90 day: 62.03 mpg (US)

Charlie - '07 Citroen C4 Grand Picasso Exclusive
90 day: 37.58 mpg (US)

Corsa - '05 Opel Corsa C
90 day: 53.22 mpg (US)

Mruczek - '03 Audi A2
90 day: 60.61 mpg (US)
Thanks: 185
Thanked 167 Times in 117 Posts
Quote:
Originally Posted by nickdigger View Post
Also, you should assign a higher version number (1.00tav? 0.98tav?) It certainly is a full step above and beyond the base. 0.86 might mislead someone to think that flashing your code would be plug-and-play. At a minimum, the stored params will be corrupted.
Fully agree
__________________


Quote:
Gerhard Plattner: "The best attitude is to consider fuel saving a kind of sport. Everybody who has enough money for a strong car, can drive fast and hit the pedal. But saving fuel requires concentration, self-control and cleverness. It's a challenge with the nice effect of saving you money that you can use for other more important things."
  Reply With Quote
Old 09-05-2013, 05:51 PM   #47 (permalink)
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,808

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 831
Thanked 709 Times in 457 Posts
Quote:
Originally Posted by nickdigger View Post
Also, you should assign a higher version number (1.00tav? 0.98tav?) It certainly is a full step above and beyond the base. 0.86 might mislead someone to think that flashing your code would be plug-and-play. At a minimum, the stored params will be corrupted.
Yah - probably should change the version #. 1.86tav!

Interesting. My stored parameters go away each and every single time I reprogram my MPGuino. I had assumed this would happen for anyone. Maybe not, hm?

Probably should also change the guinosig byte to something else, especially because the code does change the number (and size) of stored parameters based on what features are compiled in.
  Reply With Quote
Old 09-05-2013, 06:40 PM   #48 (permalink)
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,808

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 831
Thanked 709 Times in 457 Posts
Found another couple of typos from modifying the code to be configurable.

The first typo will (and does) cause the bargraph display to increment in 1/2 second increments, regardless of what the stored bargraph period is set to.

What is there:


What it's supposed to be:


The second error concerns the amount of storage space allocated to the window filter stored parameter.

Both have been fixed.
Attached Thumbnails
Click image for larger version

Name:	mpguino201309050000.png
Views:	231
Size:	14.5 KB
ID:	13715   Click image for larger version

Name:	mpguino201309050001.png
Views:	194
Size:	10.6 KB
ID:	13716  
  Reply With Quote
Old 09-06-2013, 01:01 AM   #49 (permalink)
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,808

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 831
Thanked 709 Times in 457 Posts
Took an idea from nickdigger, and re-wrote the display value calculation routines on an as-needed basis, instead of calculating everything at once. Had to re-write the fuel economy window filter routine, but that wasn't hard. Compilation of the core code resulted in a 12998 byte program. We'll see if it works. Hopefully, I will have freed up around 216 bytes of RAM.
  Reply With Quote
Old 09-06-2013, 07:36 AM   #50 (permalink)
Master EcoModder
 
AndrzejM's Avatar
 
Join Date: Oct 2011
Location: Poland
Posts: 840

Berta - '97 BMW 318 tds Compact
90 day: 62.03 mpg (US)

Charlie - '07 Citroen C4 Grand Picasso Exclusive
90 day: 37.58 mpg (US)

Corsa - '05 Opel Corsa C
90 day: 53.22 mpg (US)

Mruczek - '03 Audi A2
90 day: 60.61 mpg (US)
Thanks: 185
Thanked 167 Times in 117 Posts
It's getting better and smaller, running faster using less resources. That's the spirit of hypermilling

__________________


Quote:
Gerhard Plattner: "The best attitude is to consider fuel saving a kind of sport. Everybody who has enough money for a strong car, can drive fast and hit the pedal. But saving fuel requires concentration, self-control and cleverness. It's a challenge with the nice effect of saving you money that you can use for other more important things."
  Reply With Quote
Reply  Post New Thread






Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com