chrisjn52 Posted April 16, 2016 Report Share Posted April 16, 2016 Hi Joel, I am currently using uGFX in a project that requires a Rotary Encoder and Touchscreen for user interface navigation. Clearly touchscreens are already well catered for, but the Encoder & Switches are on your ToDo list. Before I attempt to tackle this myself, (I fall into the same category as a recent requestor for Dials!), are you able to give me some idea as to the development schedule for these? If the schedule is thought to be over the horizon then any thoughts you have with regard to the Rotary Encoder interface would be helpful, should I be brave enough to attempt myself in the meantime. uGFX is great by the way! Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted April 16, 2016 Report Share Posted April 16, 2016 The GINPUT already has working and usable interfaces for physical buttons, switches, potentiometers, rotary encoders and so on. These interfaces are called "Toggle" and "Dial". We understand that those names are not the best and might even be misleading but it's the best we could come up with at the time. After all this stuff was written even before the name "µGFX" existed. There's a lot of stuff we'd like to rename but that's something we can't do before the 3.0 release as backwards compatibility would be broken. The toggle interface allows to interface physical input sources that provide digital values/states such as push-buttons and switches. The dial interface allows to interface physical input sources that provide numeric values such as potentiometers and rotary-encoders. The toggle and the dial interface of the GINPUT module are integrated into the GWIN module just like the mouse and the keyboard module: When you add a rotary encoder and you register it properly through the highlevel API, certain widgets will automatically use these input sources when appropriate. For example, the list widget will automatically scroll through the list if you attached a dial to it. A button widget will automatically be pressed if you attached a toggle to it and so on. You can find the corresponding actions in the widgets VMT: http://wiki.ugfx.org/index.php/Creating_a_widget#VMT Of course you can also manually interface these input sources via the high-level API. The advantage of this is that thes einput sources are integrated into the GEVENT system and that you can write platform independent - and therefore portable - code. Now, to be honest at this moment there's only the API documentation (and the source code) available as a documentation source. The wiki doesn't contain any documentation about those yet. However, you should be able to get it working anyway as the interfaces are pretty straight forward to use. Both toggle and dial inputs are interfaced through board files just as with the displays and the touchscreens. I'd recommend you browsing through the corresponding files that you can find in the /src/ginput/ directory. If you have any questions please do not hesitate to ask. We are happy to help wherever we can. Link to comment Share on other sites More sharing options...
chrisjn52 Posted April 16, 2016 Author Report Share Posted April 16, 2016 Hi Joel, thanks for that, I took the "ToDo" text on this page as gospel and I mistakenly believed that toggle was only for mouse buttons although I did think of delving deeper into toggle as a start for the momentary button incorporated into the Rotary Encoder. Cheers Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted April 16, 2016 Report Share Posted April 16, 2016 I removed those "ToDo" marks from that page to prevent further confusion. They were meant in the documentation context: The documentation of the existing feature is on the ToDo list It's correct that most often you use the toggle interface for the rotary encoders 'push' action and the dial interface for well... the rotary action. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now