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


Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 03-17-2009, 01:51 PM   #871 (permalink)
EcoModding Apprentice
 
Join Date: Nov 2008
Location: 18603, USA
Posts: 231

The Lumina - '93 Lumina Euro
90 day: 29.74 mpg (US)
Thanks: 6
Thanked 3 Times in 3 Posts
I've noticed in the code there are a lot of seemingly unused "display spaces." Such as in the example below:

Code:
void doDisplayBigTank()    {bigNum(tank.mpg(),"TANK","MPG ");}
I realize that it's not a lot of space, but I found 20 or 30 of them. Every byte counts? Shrunk from 14194 to 14172.


(Support Ecomodder.com & get rid of these annoying ads!)      
 
__________________
  Reply With Quote
Old 03-17-2009, 03:01 PM   #872 (permalink)
dcb
Don't Panic
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 2,674

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Golf TDI
90 day: 53.56 mpg (US)
Thanks: 7
Thanked 28 Times in 26 Posts
Problem is some of those spaces "erase" what might have been there before, so you could wind up with something like "MPG0" displayed instead of "MPG ".
__________________
"I kicked a giant mouse in the butt! Do I have to draw you a diagram?"
  Reply With Quote
Old 03-17-2009, 03:42 PM   #873 (permalink)
EcoModding Apprentice
 
Join Date: Nov 2008
Location: 18603, USA
Posts: 231

The Lumina - '93 Lumina Euro
90 day: 29.74 mpg (US)
Thanks: 6
Thanked 3 Times in 3 Posts
Quote:
Originally Posted by dcb View Post
Problem is some of those spaces "erase" what might have been there before, so you could wind up with something like "MPG0" displayed instead of "MPG ".
I'll go back through. Some of them I think can be taken out. Ones that are on the titles for the screens, they only flash on the display and then go out. certainly they don't need trailing spaces.
__________________
  Reply With Quote
Old 03-17-2009, 04:07 PM   #874 (permalink)
dcb
Don't Panic
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 2,674

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Golf TDI
90 day: 53.56 mpg (US)
Thanks: 7
Thanked 28 Times in 26 Posts
I don't think the bootloader adds to the stability of the prebuilt one. I mean to have this code sitting there waiting to overwrite the flash when the power comes on or is flakey is a recepie for trouble. I think I will go ahead and reclaim that 2048 bootloader bytes with a define and possibly use an older version of the compiler to reclaim the space. I will look into leaving it as a single source file that will compile with arduino0011 by default, but that isn't the priority. I will do the appropriate define when I build if so, and use the usbtinyisp to program them, and add some more features finally. So programming with an arduino will still work, but if you can figure out an ISP programmer you can load the extra features (and they will start shipping with the pre-built by default)

The features I'm looking at are (and they could easily take up 2k)
1. metric option (setup might stay US, but day to day display will be metric)
2. slope option for injector direction
3. pulse threshold reject feature (i.e. this pulse is abnormally long so get rid of it) or otherwise sort that out.
__________________
"I kicked a giant mouse in the butt! Do I have to draw you a diagram?"

Last edited by dcb; 03-17-2009 at 05:02 PM..
  Reply With Quote
Old 03-18-2009, 01:18 AM   #875 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: Union City, CA USA
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Built the MPGuino from the plans above using the Arduino with USB and DC power input jack.

Downloaded the version 11 software, copied the program sketch from the googlecode archive, hooked up to my Mac Mini with the usb cable and wallwart power. All seems good until the message:
Sketch too big - Binary sketch size: 14346 bytes (of a 14336 byte maximum)

Where can we cut out 10 bytes???

Thanks dcb, you have done an awesome job!

Phil A.
  Reply With Quote
Old 03-18-2009, 01:25 AM   #876 (permalink)
dcb
Don't Panic
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 2,674

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Golf TDI
90 day: 53.56 mpg (US)
Thanks: 7
Thanked 28 Times in 26 Posts
Thanks man, The avr compilers are not in a good way for cross platform consistency. I have to compile on XP using arduino 0011. I'm guessing you have a Mac.
__________________
"I kicked a giant mouse in the butt! Do I have to draw you a diagram?"
  Reply With Quote
Old 03-18-2009, 01:39 AM   #877 (permalink)
dcb
Don't Panic
 
dcb's Avatar
 
Join Date: Feb 2008
Location: 3rd rock
Posts: 2,674

pimp mobile - '81 gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Golf TDI
90 day: 53.56 mpg (US)
Thanks: 7
Thanked 28 Times in 26 Posts
Here's a quick one, just comment out the guts of simpletx so it doesn't send data out the tx pin.

PHP Code:
#define myubbr (16000000/16/9600-1)
void simpletxchar string ){
/* if (UCSR0B != (1<<TXEN0)){ //do we need to init the uart?
    UBRR0H = (unsigned char)(myubbr>>8);
    UBRR0L = (unsigned char)myubbr;
    UCSR0B = (1<<TXEN0);//Enable transmitter
    UCSR0C = (3<<UCSZ00);//N81
 }
 while (*string)
 {
   while ( !( UCSR0A & (1<<UDRE0)) );
   UDR0 = *string++; //send the data
 }*/

__________________
"I kicked a giant mouse in the butt! Do I have to draw you a diagram?"
  Reply With Quote
Old 03-20-2009, 10:19 AM   #878 (permalink)
EcoModding Apprentice
 
Join Date: Nov 2008
Location: 18603, USA
Posts: 231

The Lumina - '93 Lumina Euro
90 day: 29.74 mpg (US)
Thanks: 6
Thanked 3 Times in 3 Posts
Added the info to the wiki. I didn't see the files in the repository yet, but maybe you posted here and then went off to upload them?
__________________
  Reply With Quote
Old 03-27-2009, 03:31 PM   #879 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: Massachusetts USA
Posts: 83

The Tank - '90 200 Quattro Avant

Ziggy - '95 S6 Sedan

Manfred - '97 A6 Quattro Sedan
90 day: 20.61 mpg (US)

Clarabell - '03 A4 Quattro Avant

Sherman - '98 A6 Quattro Avant
Thanks: 0
Thanked 0 Times in 0 Posts
New smaller bootloader on the block...

http://spiffie.org/know/arduino_1k_bootloader/
  Reply With Quote
Old 04-20-2009, 10:09 PM   #880 (permalink)
EcoModding Lurker
 
Join Date: Apr 2009
Location: Clarkston, MI
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post
Quote:
Originally Posted by dcb View Post
03/19/2009
updates for v0.80

No functional changes, but from .80 on there will be a mpguino.cpp file added to the repository.
I can't find the 0.80 code -- could someone please post it to the repository?

This is what I find in the repository right now:

Code:
MPGUINO.brd	22.0 KB	r76	Sep 19, 2008	davebr...@prodigy.net
MPGUINO.sch	247 KB	r76	Sep 19, 2008	davebr...@prodigy.net
mpguino.pde	37.3 KB	r121	Feb 02, 2009	davebr...@prodigy.net
wiring.GIF	30.5 KB	r19	Jul 04, 2008	davebr...@prodigy.net
Or... am I in the wrong place?

I got my MPGuino from spiffie.org and it came with 0.80 installed already, but I am looking for the source...
  Reply With Quote
Reply  Post New Thread

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Motorcycle manufacturers beginning to release MPG info MetroMPG Motorcycles / Scooters 1 04-03-2008 06:23 PM
My kingdom for a giant, heated workspace MetroMPG The Lounge 13 01-07-2008 12:11 AM


car hire glasgow
Compare numerous car hire deals in Glasgow with one easy Dealchecker search. Follow the link.



Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
All content copyright EcoModder.com