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

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 10-03-2013, 12:08 AM   #121 (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 708 Times in 456 Posts
Quote:
Originally Posted by josemapiro View Post
Very rarely when you press the middle button it does not alter the brightness, and showed the same sequence that shows when pressing the left.
I think I have this bug fixed by now. Try the new code, and tell me your results.

Quote:
Originally Posted by josemapiro View Post
Why not use a system of 3 or 5 buttons, but with a different operation, stop using the buttons on the left, middle and right, and move to using a (top), (bottom), (OK), (yes) and (no).
The operation would be to (top) advance the menu to (bottom) retreat, and (OK) defined the choice, in some menus might be used (yes) and (no) to confirm the choice.
How would you handle entering numbers?

Quote:
Originally Posted by josemapiro View Post
The results I got were:
Without pressing any button the result was: 03FF
Pressing the left: 02BC and 02BD or 02BE
Pressing the middle button: 034D or 034E and 034F
Precionando right: 03A2 or 03A3 and 03A4
Pressing the extra1: 03D3 or 03D4 and 03D2
Extra 2 still have no results.
Hm. The code shows that 0x02BC-0x02BE should generate a value corresponding to the right button, not the left. Similarly, 0x03A2-0x03A4 should correspond to the left button, not the right one. That might could just be an error that was based on what I posted earlier. Otherwise, the numbers look right.

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 10-03-2013, 07:39 AM   #122 (permalink)
EcoModding Apprentice
 
Join Date: Jun 2010
Location: Virginia
Posts: 114
Thanks: 33
Thanked 56 Times in 38 Posts
Buttons are much improved with no incorrect results from presses. But, I've found that commenting out both bar graph displays. . .
Code:
//#define useBarFuelEconVsTime true		// Show Fuel Economy over Time bar graph
//#define useBarFuelEconVsSpeed true		// Show Fuel Economy vs Speed, Fuel Used vs Speed bar graphs
. . . causes the tank capacity value to be reported as iM and cM.
  Reply With Quote
The Following User Says Thank You to Ardent For This Useful Post:
t vago (10-03-2013)
Old 10-03-2013, 08:01 AM   #123 (permalink)
EcoModding Apprentice
 
Join Date: Jun 2010
Location: Virginia
Posts: 114
Thanks: 33
Thanked 56 Times in 38 Posts
Also, I think that the "seven" character displayed with the rounded font has an incorrect block. The upper vertical block is beveled on the top-left but shouldn't it have the character that is beveled on the lower-right?
  Reply With Quote
The Following User Says Thank You to Ardent For This Useful Post:
t vago (10-03-2013)
Old 10-03-2013, 09:45 AM   #124 (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 708 Times in 456 Posts
Quote:
Originally Posted by Ardent View Post
Also, I think that the "seven" character displayed with the rounded font has an incorrect block. The upper vertical block is beveled on the top-left but shouldn't it have the character that is beveled on the lower-right?
Yep, it's supposed to have the lower-right bevel. Fixed.

Quote:
Originally Posted by Ardent View Post
Buttons are much improved with no incorrect results from presses. But, I've found that commenting out both bar graph displays. . .
Code:
//#define useBarFuelEconVsTime true		// Show Fuel Economy over Time bar graph
//#define useBarFuelEconVsSpeed true		// Show Fuel Economy vs Speed, Fuel Used vs Speed bar graphs
. . . causes the tank capacity value to be reported as iM and cM.
That's just... weird. I see that, too. A branch in bytecode prgmFuelEcon[] went a little too far, and ended up calling prgmFindRemainingFuel[]. As to why it only showed up when the bar graphs were not selected... why that was, I don't know. Probably some quirk with compiling with Arduino.

Today's attached code has the seeeeds of the coastdown calculator in it. Nothing fancy, just stored EEPROM parameters for C(d), C(rr), frontal area (in square meters or square feet), and vehicle weight/mass. (current MPGuino code version is at first post of this thread)

Last edited by t vago; 05-11-2014 at 02:33 PM.. Reason: current MPGuino code version is at first post of this thread
  Reply With Quote
The Following User Says Thank You to t vago For This Useful Post:
AndrzejM (10-04-2013)
Old 10-03-2013, 03:37 PM   #125 (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
I think I have this bug fixed by now. Try the new code, and tell me your results.
I've been testing and it seems to be more effective operation of the buttons, but the right and left buttons seem to do the same, do not know if this is so.


Quote:
How would you handle entering numbers?
The numbers could be selected using the (up) to change 0, 1, 2, 3, 4, 5 ... and (down) 0, 9, 8, 7, 6, 5 ... after pressing the (ok) to set the number chosen and advance to the next number to right.

Thank you
José Rodrigues

Last edited by josemapiro; 10-03-2013 at 03:53 PM..
  Reply With Quote
Old 10-04-2013, 06:16 AM   #126 (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
Yep, it's supposed to have the lower-right bevel. Fixed.
Almost. Now it has an upper-right bevel.
  Reply With Quote
Old 10-04-2013, 11:27 AM   #127 (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 708 Times in 456 Posts
Quote:
Originally Posted by josemapiro View Post
I've been testing and it seems to be more effective operation of the buttons, but the right and left buttons seem to do the same, do not know if this is so.
I looked at the spreadsheet I used to generate my table, and I used the 2k2 resistor for the right button, and the 10k resistor for the left button. So, as coded, the diagram should actually look like this:

Code:
Buttons - Multiplexed Analog
	left, middle, right, extra#1, extra#2 PC3 (ADC3)

             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 right         o middle        o left          o Extra#1       o Extra#2
     |               |               |               |               |
     o---------------o---------------o---------------o---------------o--vvv--o--o 5V
                                                                     | R1 1k
                                                                     o----------o PC3
Of course, to maintain consistency (left button either corresponds to PINC3 for the legacy buttons, or 2k2 for the analog buttons; and the right button either corresponds to PINC5 for the legacy buttons, or 10k for the analog buttons), the code should be changed to match your original ASCII art that you posted earlier.

Quote:
Originally Posted by josemapiro View Post
The numbers could be selected using the (up) to change 0, 1, 2, 3, 4, 5 ... and (down) 0, 9, 8, 7, 6, 5 ... after pressing the (ok) to set the number chosen and advance to the next number to right.
That's mainly a matter of figuring out what keypresses would go to what actions. I can do that, but it's not a high priority right now.

Last edited by t vago; 10-04-2013 at 11:33 AM..
  Reply With Quote
Old 10-04-2013, 11:28 AM   #128 (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 708 Times in 456 Posts
Quote:
Originally Posted by Ardent View Post
Almost. Now it has an upper-right bevel.
*headdesk*

Edit: Finally kicked the butt of the incorrect upper right segment for the number "7" of the spiffy number font. Changed the code to correctly support the left analog button as the 2k2 resistor, and the right analog button as the 10k resistor. Changed the Parallax 5-position code to match. Added an ASCII diagram to show how to wire up and connect the Parallax 5-position switch.

(current MPGuino code version is at first post of this thread)

Last edited by t vago; 05-11-2014 at 03:25 PM.. Reason: current MPGuino code version is at first post of this thread
  Reply With Quote
The Following User Says Thank You to t vago For This Useful Post:
Ardent (10-04-2013)
Old 10-04-2013, 01:56 PM   #129 (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
Changed the code to correctly support the left analog button as the 2k2 resistor, and the right analog button as the 10k resistor. Changed the Parallax 5-position code to match. Added an ASCII diagram to show how to wire up and connect the Parallax 5-position switch.
Hope I'm not causing any inconvenience to the left and right buttons, for me it is not important yet, because I still have everything so provisionally.

Quote:
That's mainly a matter of figuring out what keypresses would go to what actions. I can do that, but it's not a high priority right now.
This system I just gave an idea, because it seems to be a more practical working, I think the current very confusing, and at the same time one can eliminate the simultaneous buttons, which may create some difficulties, due to a resistance value proximate of another.

Thank you
José Rodrigues
  Reply With Quote
Old 10-04-2013, 03:02 PM   #130 (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
Finally kicked the butt of the incorrect upper right segment for the number "7" of the spiffy number font.
I think we've got it!

Compile error though from extra pipes:
Code:
const uint8_t buttonsUp = 	rbuttonBit | mbuttonBit | lbuttonBit |  | ;

  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