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

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 11-05-2009, 09:56 AM   #1 (permalink)
EcoModding Apprentice
 
meelis11's Avatar
 
Join Date: Feb 2009
Location: Estonia
Posts: 199

Green frog - '97 Audi A4 Avant 1.9TDI 81kW
Diesel
90 day: 43.1 mpg (US)
Thanks: 19
Thanked 40 Times in 28 Posts
MPGuino custom characters? Some optimisation suggestions

Hey,
has anybody made custom characters which are more descriptive than "LK" example?
I somewhere saw pictures, where somebody had made custom characters for example "L/100km" - it was made with 2 chars - first char was showing "L\n/1" and second "km\n00" - "\n" means newline - so imagine it as
"L/ km"
" 100"
Would be nice to know how to make them or link where I can get info.

One good hack/optimisation for code also:
I put clear screen commands before every screen change - now that half second when it shows screen name, it is only name - second line is clear. Now you can delete all trailing spaces in screen names and other strings. As a result you should save some bytes (did not count but it was less than before and screen names are clear to read)

inside setup()
Code:
  
  LCD::LcdCommandWrite(B00000001);  // clear display, set cursor position to zero         
  LCD::LcdCommandWrite(B10000);  // set dram to zero

  //LCD::gotoXY(0,0); //no need for it, clear display already made gotoxy(0,0)
  //LCD::print(getStr(PSTR("OpenGauge       ")));
  LCD::print(getStr(PSTR("OpenGauge")));  

  //LCD::gotoXY(0,1);      
  //LCD::print(getStr(PSTR("  MPGuino  v0.75"))); 
  LCD::gotoXY(2,1);      
  LCD::print(getStr(PSTR("MPGuino  v0.75")));
inside loop()
Code:
   //LCD::gotoXY(0,0); //no need for it, clear display sets it gotoxy(0,0)
   //is any of three buttons is pressed, clear display
   if( !(buttonState&lbuttonBit)  || !(buttonState&mbuttonBit) || !(buttonState&rbuttonBit) ){
      LCD::LcdCommandWrite(B00000001);  // clear display, set cursor position to zero
   }

   //see if any buttons were pressed, display a brief message if so      
   if(!(buttonState&lbuttonBit) && !(buttonState&rbuttonBit)){
      LCD::print(getStr(PSTR("Setup"))); //remove trailing spaces "Setup " -> "Setup"
      initGuino();
   }
   //....code continues
Meelis

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 11-05-2009, 02:22 PM   #2 (permalink)
EcoModding Lurker
 
Join Date: Oct 2009
Location: Austria
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
The problem is, you don't have enough free chars for all abbreviations. A minimum of three chars is required for the "big" display numbers. The maximum number of chars is 8, so 5 left. And if you insert the chars from the more beautiful big numbers mod, nothing is left. So you would have to rewrite the chars memory in LCD every time you need the other set.

But if you get a beautiful solution, it would be fine

PS: I made an excel sheet and resized the cells so they form the LCD pixels. You can fill the black dots with an X an leave other empty. It's a fast method to create chars and see how they will look like.

  Reply With Quote
Reply  Post New Thread




Similar Threads
Thread Thread Starter Forum Replies Last Post
MPGuino release one workspace dcb OpenGauge / MPGuino FE computer 1061 01-17-2020 02:37 AM
vac-n-tach... diy custom pod suggestions? lyd Instrumentation 18 02-10-2009 03:12 PM
Some suggestions and notes on the MPGuino SVOboy OpenGauge / MPGuino FE computer 4 08-01-2008 09:00 AM



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