Skip to content

Change value Slow or Fast  #4

@solrac3f

Description

@solrac3f

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions