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-28-2013, 09:58 AM   #101 (permalink)
EcoModding Apprentice
 
Join Date: Jun 2010
Location: Virginia
Posts: 114
Thanks: 33
Thanked 56 Times in 38 Posts
Minor appearance preference, but I added a line clear to the screen label display section:
Code:
void doCursorUpdateMain(void) {
	doMainScreenDisplay(); // call the appropriate display routine
	printStatusHold(findStr(displayFuncNames, screenCursor[(unsigned int)(mainScreenIdx)])); // briefly display screen name
	gotoXY(0, 1);
	clrEOL();
}

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 09-28-2013, 11:46 AM   #102 (permalink)
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,807

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 828
Thanked 706 Times in 455 Posts
Quote:
Originally Posted by josemapiro View Post
To remove any doubt, the scheme should I use is what is depicted in the image?



Thank you
José Rodrigues
Swap the 5 VDC and the ground connections, and you'll exactly have it.
  Reply With Quote
Old 09-28-2013, 11:49 AM   #103 (permalink)
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,807

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 828
Thanked 706 Times in 455 Posts
Quote:
Originally Posted by Ardent View Post
Minor appearance preference, but I added a line clear to the screen label display section:
Code:
void doCursorUpdateMain(void) {
	doMainScreenDisplay(); // call the appropriate display routine
	printStatusHold(findStr(displayFuncNames, screenCursor[(unsigned int)(mainScreenIdx)])); // briefly display screen name
	gotoXY(0, 1);
	clrEOL();
}
Fair enough - that can be put in via an "#include," as well.
  Reply With Quote
Old 09-28-2013, 12:01 PM   #104 (permalink)
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,807

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 828
Thanked 706 Times in 455 Posts
Code:
		if (!(timerStatus & tsButtonsUp)) { // see if any buttons were pressed, display a brief message if so

			j = buttonState;
			timerStatus |= tsButtonsUp; // reset keypress flag

			bpPtr = (PGM_P)pgm_read_word(&buttonPressAdrList[(unsigned int)(menuLevel)]);

			while (true) {

				i = pgm_read_byte(bpPtr++);

				if ((i == buttonsUp) || (j == i)) break;

				bpPtr++;

			}

			gotoXY(0, 0);
			if (j != buttonsUp) callFuncPointer((char *)(bpPtr)); // go perform action

		}
This is near the end of the code. The boldfaced things are the things that need changed.
  Reply With Quote
The Following User Says Thank You to t vago For This Useful Post:
Ardent (09-29-2013)
Old 09-28-2013, 12:50 PM   #105 (permalink)
EcoModding Apprentice
 
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
Quote:
Originally Posted by t vago View Post
Swap the 5 VDC and the ground connections, and you'll exactly have it.
Where have 5V, becomes GND, where have GND, becomes 5V, is correct?

Code:
         o-----------o-----------o-----------o-----------o--o GND
    R2   |      R3   |      R4   |      R5   |      R6   |
 o--vvv--o   o--VVV--o   o--vvv--o   o--vvv--o   o--vvv--o
 |  2,2k     |  4,7k     |  10k      |  22k      |  47k   
 o           o           o           o           o 
  /           /           /           /           /
 o           o           o           o           o
 |           |           |           |           |  R1
 o-----------o-----------o-----------o-----------o--vvv--o--o 5V
 left      middle     right     Extra#1   Extra#2|  1k
                                                 o----------o PC3
Thank you
José Rodrigues
  Reply With Quote
The Following User Says Thank You to josemapiro For This Useful Post:
t vago (09-28-2013)
Old 09-28-2013, 01:17 PM   #106 (permalink)
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,807

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 828
Thanked 706 Times in 455 Posts
Yep - That's also going into the code comments!
  Reply With Quote
Old 09-28-2013, 02:02 PM   #107 (permalink)
EcoModding Apprentice
 
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
Quote:
Originally Posted by t vago View Post
That's also going into the code comments!
I've done it with that intention, is easier to intender.

Thank you
José Rodrigues
  Reply With Quote
Old 09-29-2013, 09:38 AM   #108 (permalink)
EcoModding Apprentice
 
Join Date: Jun 2010
Location: Virginia
Posts: 114
Thanks: 33
Thanked 56 Times in 38 Posts
Quote:
Originally Posted by t vago View Post
This is near the end of the code. The boldfaced things are the things that need changed.
Thanks, I'll add that as soon as I can. I didn't enable useSavedTrips so I don't want to loose my current tank data.
  Reply With Quote
Old 09-29-2013, 05:00 PM   #109 (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 t vago View Post
You got coastdown testing to work? That would be cool!
Code:
//Coast down time
unsigned long coasttime(void){
int t1;
int t2;
int v1= instantvehiclespeed();
int ctime;
if (v1>parms[CoastSpeedMax]) {
	t1=0;
	t2=0;
	}
if (v1 == parms[CoastSpeedMax]) {t1 = tank.time();}
if (v1 == parms[CoastSpeedMin]) {t2 = tank.time();}
ctime = t2 - t1;
return ctime;
}
//Coast down distance
unsigned long coastdistance(void){
int d1;
int d2;
int cdistance;
int v2 = instantvehiclespeed();
if (v2>parms[CoastSpeedMax]) {
	d1=0;
	d2=0;
	}
if (v2 == parms[CoastSpeedMax]) {d1 = tank.distance();}
if (v2 == parms[CoastSpeedMin]) {d2 = tank.distance();}
cdistance = d2 - d1;
return cdistance;
}
This is my code, and it works , but with "canadian" version. So I think it should be rewritten for your version.
__________________


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-30-2013, 06:33 PM   #110 (permalink)
EcoModding Apprentice
 
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
I've been testing the Multiplexed Analog buttons, and it works but not correctly, the first and third seem to do the same functions, as the middle button only changes the brightness, and pro comportace times as the first, the extra 1 to precionar appears (btn 8 pressed), the extra 2 has not tested because had no 47k resistance.
What is the tolerance of the resistors you used? I'm using resistors with 5% tolerance.
I think the problem I'm having now, has to do with the values ​​that each sends resistance, which may vary slightly and complicate the whole process, but at least I can see the system moving.

Thank you
José Rodrigues

  Reply With Quote
Reply  Post New Thread


Thread Tools




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