BasicOLEDMenu icon indicating copy to clipboard operation
BasicOLEDMenu copied to clipboard

Change value Slow or Fast

Open solrac3f opened this issue 3 years ago • 0 comments

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.

solrac3f avatar Dec 03 '22 06:12 solrac3f