09-28-2013, 10: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();
}
|
|
|
Today
|
|
|
Other popular topics in this forum...
|
|
|
09-28-2013, 12:46 PM
|
#102 (permalink)
|
MPGuino Supporter
Join Date: Oct 2010
Location: Hungary
Posts: 1,807
iNXS - '10 Opel Zafira 111 Anniversary Suzi - '02 Suzuki Swift GL
Thanks: 829
Thanked 708 Times in 456 Posts
|
Quote:
Originally Posted by josemapiro
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.
|
|
|
09-28-2013, 12:49 PM
|
#103 (permalink)
|
MPGuino Supporter
Join Date: Oct 2010
Location: Hungary
Posts: 1,807
iNXS - '10 Opel Zafira 111 Anniversary Suzi - '02 Suzuki Swift GL
Thanks: 829
Thanked 708 Times in 456 Posts
|
Quote:
Originally Posted by Ardent
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.
|
|
|
09-28-2013, 01:01 PM
|
#104 (permalink)
|
MPGuino Supporter
Join Date: Oct 2010
Location: Hungary
Posts: 1,807
iNXS - '10 Opel Zafira 111 Anniversary Suzi - '02 Suzuki Swift GL
Thanks: 829
Thanked 708 Times in 456 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.
|
|
|
The Following User Says Thank You to t vago For This Useful Post:
|
|
09-28-2013, 01: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
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
|
|
|
The Following User Says Thank You to josemapiro For This Useful Post:
|
|
09-28-2013, 02:17 PM
|
#106 (permalink)
|
MPGuino Supporter
Join Date: Oct 2010
Location: Hungary
Posts: 1,807
iNXS - '10 Opel Zafira 111 Anniversary Suzi - '02 Suzuki Swift GL
Thanks: 829
Thanked 708 Times in 456 Posts
|
Yep - That's also going into the code comments!
|
|
|
09-28-2013, 03: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
That's also going into the code comments!
|
I've done it with that intention, is easier to intender.
Thank you
José Rodrigues
|
|
|
09-29-2013, 10: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
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.
|
|
|
09-29-2013, 06:00 PM
|
#109 (permalink)
|
Master EcoModder
Join Date: Oct 2011
Location: Poland
Posts: 840
Thanks: 185
Thanked 167 Times in 117 Posts
|
Quote:
Originally Posted by t vago
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."
|
|
|
|
09-30-2013, 07: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
|
|
|
|