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

Change value Slow or Fast #4

Open
solrac3f opened this issue Dec 3, 2022 · 0 comments
Open

Change value Slow or Fast #4

solrac3f opened this issue Dec 3, 2022 · 0 comments

Comments

@solrac3f
Copy link

solrac3f commented Dec 3, 2022

Hello,
first of all, I would like to say that this Menu with Encoder is very good and thank you for sharing it.
I am some kind of beginner in c++. That is why I come here to ask for help.

I think it would be nice to have the possibility to change the values in the Submenu depending on the speed that the encoder is turning.

What I mean is. If turning the encoder slow it would encrease or decrease the value by 1. If turning fast it would change the value by 10 for example.

I would make the following change in the code as follow.

"
// demonstration enter a value
void value1() {
  resetMenu();                        
  menuMode = value;                    
  oledMenu.menuTitle = "demo_value";     
  oledMenu.mValueLow = 0;               
  oledMenu.mValueHigh = 100;        
If (slow_fast== 0) {     
  oledMenu.mValueStep = 1;            
}  
  If (slow_fast== 1) {     
  oledMenu.mValueStep = 10;            
}  
  oledMenu.mValueEntered = 50;           
}
"
Only I don't know, where and how I could change inside the code the variable slow_fast from state 1 or 0.

I would appreciate your point of view and thanks in advance for some help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant