What is the meaning of "currentValue" in renderLoop(unsigned int currentValue, RenderPressMode userClick) #295
Replies: 2 comments 2 replies
-
I've moved this to a discussion because it's more of a question than an issue. The current value is nothing more than a convenient way to get the current value of the rotary encoder in the render loop. You can change the precision of the encoder when starting the takeover of the display to whatever range is needed, the menu manager will automatically set it back upon giving the display back. For example in an amplifier, a dashboard showing volume and programme information may be shown, turning the encoder in that case would adjust the volume. Clicking the button return to the main menu. In the early days before I provided this, many people who just wanted to use the encoders value within the takeover display callback had to manually register their own encoder, so that they could get hold of the value from it, these days it is less of an issue because the encoder has a function to get the current value anyway. But even so it is still a convenience for many cases. The user click is even less clear, it is only usable for the case where you want to detect the click to return to the menu. As once it goes to clicked it remains clicked until the display is given back. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestion. |
Beta Was this translation helpful? Give feedback.
-
It seems that the
currentValue
ofrenderLoop(unsigned int currentValue, RenderPressMode userClick)
shows the index of the active item which was hidden byrenderer.takeOverDisplay();
, and the max value ofcurrentValue
is restricted by the menu item count.IMO, since the display is already taken by custom ui,
currentValue
should not relate to the items of the current menu.Beta Was this translation helpful? Give feedback.
All reactions