February 22, 200917 yr I am new to gauge programming and have a bit of a bonehead question. I am not sure what the best approach to cycling through the display of data when a gauge has only a single button. If it has a dial then it is pretty simple to put in left and right mouse areas that increase or decrease the (L: GAUGE_DISPLAY_MODE, enum), and then stop at the lowest or highest case setting.In this situation though I am having a bit of failure of imagination. With the single button, I want each button press to cycle through one of four cases/modes (0 through 3). And when it gets to the fourth case, clicking again should cycle back to the lowest case/mode.This is what I have so far: <Click>(L:GAUGE MODE SELECT, enum) 1 + (>L:GAUGE MODE SELECT, enum) (L:GAUGE SELECT, enum) 3 > if{ 3 (>L:GAUGE MODE SELECT, enum) }</Click> What else do I have to cram in there to get it to reset to Case 0 once it's hit Case 3?
February 22, 200917 yr <Click>(L:GAUGE MODE SELECT, enum) 1 + (>L:GAUGE MODE SELECT, enum) (L:GAUGE SELECT, enum) 3 > if{ 3 (>L:GAUGE MODE SELECT, enum) }</Click> What else do I have to cram in there to get it to reset to Case 0 once it's hit Case 3? Hi,Just that...Now you have this function in place:(L:GAUGE SELECT, enum) 3 > if{ 3 (>L:GAUGE MODE SELECT, enum) } if you correct the first name to L:Gauge MODE Select, enum :( , this sets the gauge mode select to 3 if its value gets over 3.Maybe you should try setting it to zero or one, depending on how your display is dependant on the value of L:gauge mode select, enum. (L:GAUGE MODE SELECT, enum) 3 > if{ 0 (>L:GAUGE MODE SELECT, enum) } hope this helpsgrtWillem
February 22, 200917 yr I guess it helps not to have syntax errors in there, too, eh? :( Thanks, this is terrific.
February 24, 200917 yr I guess it helps not to have syntax errors in there, too, eh? :(Ah well,you were very much on the right track! :( And sometimes it's the obvious you don't see....grtWillem.
Create an account or sign in to comment