Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it just me, or is LCD menu navigation backwards? #1720

Closed
ntoff opened this issue Mar 28, 2015 · 22 comments
Closed

Is it just me, or is LCD menu navigation backwards? #1720

ntoff opened this issue Mar 28, 2015 · 22 comments
Assignees
Labels
T: Feature Request Features requested by users.

Comments

@ntoff
Copy link

ntoff commented Mar 28, 2015

You scroll down the list by turning the wheel "up" (my encoder is on the side). Increasing values of variables is fine and dandy, you turn the wheel "up" to increase, but menu navigation itself seems reversed.

It's been like this for ages, so I don't know if it's something that can be changed (maybe a user selectable variable?)

@nophead
Copy link
Contributor

nophead commented Mar 28, 2015

It's been mentioned before but for most of us increasing is the same as moving forward in the menu, so clockwise is correct for both.

Other people seem to perceive a mechanical connection between the wheel and the menu and then it depends where the wheel is.

@ntoff
Copy link
Author

ntoff commented Mar 28, 2015

Yeah it depends where the encoder is physically. On my Mendel it's on the front so it's not quite as odd, but for the LCD I have that's on the side it's really strange. I'm also one of those weirdos with an inverted mouse in video games :p

So is there any way I can change it just for myself? I've taken a look but I don't know which part of the code actually handles navigation, and if there's even a separate handler for navigation and settings changes. Should I be looking in ultralcd.cpp?

@nophead
Copy link
Contributor

nophead commented Mar 28, 2015

Yes, but good luck with changing it as the code is truly horrible.

@ntoff
Copy link
Author

ntoff commented Mar 28, 2015

I wouldn't know horrible from good, I have no idea what I'm doing when it comes to code. Took me ages to figure out how to add a simple feature to Pronterface.

@nophead
Copy link
Contributor

nophead commented Mar 28, 2015

@ntoff
Copy link
Author

ntoff commented Mar 28, 2015

yep, I was afraid of that (that's the part I was looking at earlier)

@thinkyhead
Copy link
Member

@ntoff Here's what needs to be done.

  1. Create a new variable bool encoder_is_editing = false; which will be set whenever the menu is inside an editing function as opposed to a navigable menu. The lcd_goto_menu function is a good place to clear this flag, and the macro that creates the edit functions (_menu_action_setting_edit_ ## _name) is a good place to set it.
  2. Add code to Line 1353 so that it subtracts whenever that flag is false, but adds when it is true.

@oysteinkrog
Copy link
Contributor

I have this same "problem", I fixed it by switching the pins (for ramps I think it was switch 31/33), you can probably find the commit in my fork.

@thinkyhead
Copy link
Member

@oysteinkrog @ntoff Switching the pins will reverse the behavior of the controller knob everywhere, including when editing numeric values in the menu. One of these days I'll implement the method I described as a switchable feature.

@thinkyhead thinkyhead added the T: Feature Request Features requested by users. label Mar 31, 2015
@thinkyhead thinkyhead self-assigned this Mar 31, 2015
@ntoff
Copy link
Author

ntoff commented Mar 31, 2015

Yeah it reverses it everywhere. I added the feature to my own Marlin last night but for some reason it doesn't apply to the "Move Axis" menu, though it seems to work everywhere else. Or maybe I'm just crazy.

I don't even know what I'm doing with C++ so having to take a crash course in it (google)

@thinkyhead don't go to too much trouble right now. I'd rather not tie up the bug fixing with more feature requests. Like nophead said, it depends on how you perceive the knob to function, whether it's a "physical" connection or not, and also its location as on my Mendel90 the navigate + reversed direction for editing feel very natural since the wheel is on the front. It's just my other panel where the encoder is on the side that feels wrong.

@boelle boelle added this to the Feature Requests Round 17 milestone Apr 1, 2015
@TechMasterJoe
Copy link

Is it not fast to just swap the count routine by swapping the + and - in the ISR at lines 1519 to 1532 Just a thought

@AnHardt
Copy link
Member

AnHardt commented Apr 4, 2015

@TechMasterJoe
There are several easy ways to change the encoder direction - like swapping the pins.
But to make the behavior of editing values and moving in menus different is the problem her.

@nophead
Copy link
Contributor

nophead commented Apr 4, 2015

Yes the issue is psychological. Everybody seems to agree clockwise should increase values, most people expect it to move forwards through the menu as well, but a few people think it should go up the menus when the button is arranged to the left of the screen.

@thinkyhead
Copy link
Member

Yep, if you look closer you'll see that my approach would work just fine. The only thing you want to alter is menu navigation, and the only way to alter that is to understand that the (stupid?) thing uses the encoder value directly. You could imagine using the inverse or the reciprocal of encoderPosition in the menu navigation, but in fact that doesn't do it either. The simplest way is to simply set a flag when menu navigation is active, clear it otherwise, and only reverse the encoder direction in software (in the manner that @TechMasterJoe and I point out) when that flag is set. There are a few convenient spots to set and clear such a flag, within the menu macros or the menu handlers. I'll mess around with it at some point, I'm sure, if no one else does.

@boelle boelle modified the milestones: Feature Requests Round 5, Feature Requests Round 17 Jun 29, 2015
@boelle
Copy link
Contributor

boelle commented Jun 29, 2015

So since we can partly agree that this is psycological related and not a software problem should we not close this one?

@boelle boelle modified the milestones: Feature Requests Round 5, Feature Requests Round 4 Jun 29, 2015
@AnHardt
Copy link
Member

AnHardt commented Jun 29, 2015

@boelle
No. We should make this configurable. This problem will pop up over and over again.

@dEDshort
Copy link

I usually turn a volume knob clockwise to increase.
That's why I found it strange with controlling knob on LCD Displays.
Actually almost got use to it. Uncomment line 539 and enter -1 for value
//#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
Ie_#define ENCODER_PULSES_PER_STEP -1 // Increase if you have a high resolution encoder
I have had no other issues and the knob works clockwise on both navigation and values.

@thinkyhead
Copy link
Member

@dEDshort How does that affect editing of values, changing feedrate, etc.? Does it do just what you want everywhere?

@dEDshort
Copy link

Yes I believe it works for all adjustments the control knob on the LCD Display is used for.This has been tried with reprap discount displays 2004 and Full 12864 both types on a Ramps 1.4. This is just the encoder logic and should have no changes with anything else. Perhaps just editing comment line in config file would explain changing.

@thinkyhead
Copy link
Member

@dEDshort Sounds like for your controller changing the pulses per step is sufficient. For some controllers, we may need to reverse only the menu navigation (so clockwise = up or minus) and not the changing of values (keep clockwise = plus). The ENCODER_PULSES_PER_STEP solution unfortunately doesn't allow the independent reversal of these two functions, but always affects both. So, we still need to add an ENCODER_REVERSED_MENUS option.

@thinkyhead
Copy link
Member

Well that didn't take me too long. #3114 adds an option to reverse the direction of the click-wheel, in menus and SD card listings only.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T: Feature Request Features requested by users.
Projects
None yet
Development

No branches or pull requests

8 participants