One huge benefit of the open-source project is, that you are able to customize some features to your needs. The user input behaviour is one thing, which you can change even with only a little bit of programming knowledge.
In gerneral there are two different files, which have effect to the user input in XCSoar
- Arduino sketch of the USB input device: Here you can setup actions to the buttons and encoders. E.g. rotating the encoder clock-wise will trigger the right arrow key. Also long-press or double-press functions can be assigned here.
- XCI user input file in XCSoar: Here you can setup specific actions for different menus. E.g. when using the PAN menu you won´t be able to zoom in and out with the default XCI file, because the arrow keys are assigned to pan the map by default. It would be possible to use the „Fn“ and „M“ key to zoom in and out in this menu. There are some limitations of the XCI file, but in combination with a customized USB input device you have plenty of options.
Arduino sketch for the Rotary Module
Let´s begin with the actual input device. All SteFly™ input devices are using an Arduino Leonardo compatible microcontrollers to process the key presses and converts them into a USB HID signal (Human Input Device). For a USB keyboard you don´t need to install a driver, so you can also test the Rotary Module on your desktop computer.
What is Arduino? Arduino is a open-source electronic prototyping platform enabling users to create interactive electronic objects. So it is a hard- and software project. The hardware is already installed in SteFly input devices, but it´s possible to change the software on those devices.
Where do you get the Arduino software? You can download Arduino IDE for free at https://www.arduino.cc/. The basic installation process should be easy and if you have any problems, you can use the instructions and tutorials available on the web. You also need to install some libraries to get the code working.
Which specific hardware settings do you need to select? Board: „Arduino Leonardo“ and select the correct COM port.
1) Standard features currently implemented on SteFly Rotary Modules
It´s a basic setup and there is no mouse mode available. It works great in combination with the remote stick, but it has limited functionality. There is no need to change the default OpenVario input file (XCI-file).
2) Rotary Module with mouse feature
Similar to the remote stick, you can change with the FN button between mouse mode and arrow button mode. In mouse mode you are able to moove the mouse pointer. There is no need to change the default OpenVario input file (XCI-file).
3) Great and complex combination of Arduino sketch and XCI input file
A great implementation from Thomas Hanika, which uses all options available with a custom Arduino sketch and a custom XCI file. Complex inputs like longpress and pressed + rotate features are implemented. Highlights are the quick access to change the volume, MC setting and also the intuitive operation of the PAN menu.
You can upload the XCI files with your OpenVario USB stick the same way as a waypoint or airspace file. Then you need to select the file in XCSoar: System Setup -> Look -> Language, Input -> Events.
If you have a custom input option for the Rotary Module and you would like to share it here, feel free to contact me and I will add it to this post. A huge thanks to the contributors of the software implementation!