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, 12:51 PM   #871 (permalink)
Master EcoModder
 
Join Date: Nov 2008
Location: 18603, USA
Posts: 759

The Crimson Crawler - '04 Hyundai Elantra GLS
90 day: 36.71 mpg (US)
Thanks: 221
Thanked 60 Times in 45 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.

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 03-17-2009, 02:01 PM   #872 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

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

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 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 ".
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 03-17-2009, 02:42 PM   #873 (permalink)
Master EcoModder
 
Join Date: Nov 2008
Location: 18603, USA
Posts: 759

The Crimson Crawler - '04 Hyundai Elantra GLS
90 day: 36.71 mpg (US)
Thanks: 221
Thanked 60 Times in 45 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, 03:07 PM   #874 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

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

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 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.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!

Last edited by dcb; 03-17-2009 at 04:02 PM..
  Reply With Quote
Old 03-18-2009, 12: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, 12:25 AM   #876 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

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

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 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.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 03-18-2009, 12:39 AM   #877 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

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

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 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
 }*/

__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 03-20-2009, 09:19 AM   #878 (permalink)
Master EcoModder
 
Join Date: Nov 2008
Location: 18603, USA
Posts: 759

The Crimson Crawler - '04 Hyundai Elantra GLS
90 day: 36.71 mpg (US)
Thanks: 221
Thanked 60 Times in 45 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, 02:31 PM   #879 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: Massachusetts USA
Posts: 84

Ziggy - '95 Audi S6 Sedan

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

Clarabell - '03 Audi A4 Quattro Avant

Sherman - '98 Audi A6 Quattro Avant

Cab - '96 Audi Cabriolet
Thanks: 0
Thanked 2 Times in 2 Posts
New smaller bootloader on the block...

http://spiffie.org/know/arduino_1k_bootloader/
  Reply With Quote
Old 04-20-2009, 09:09 PM   #880 (permalink)
EcoModding Lurker
 
Join Date: Apr 2009
Location: Clarkston, MI
Posts: 16
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




Similar Threads
Thread Thread Starter Forum Replies Last Post
My kingdom for a giant, heated workspace MetroMPG The Lounge 14 12-12-2010 09:08 AM
Motorcycle manufacturers beginning to release MPG info MetroMPG Motorcycles / Scooters 1 04-03-2008 05:23 PM



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