Hardware extension widget (LVGL Lua dev contest) - #34
Closed
wimalopaan wants to merge 1 commit into
Closed
Conversation
Author
|
Latest version you'll find here: https://github.com/wimalopaan/LUA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a submission to the
lvglLUA script dev contest.It shows the use of most of the new
lvglUI controls available with EdgeTx 2.11.What is the purpose of this widget?
This widget is called the hardware extension widget. Its purpose is to read and visualize the state of external controls like pots, switches, buttons, incrementals, ... . This is done via one of the serial connections of the radio (AUX1, AUX2) reading messages of the hardware extension protocol: https://github.com/wimalopaan/Electronics?tab=readme-ov-file#hwext.
By this means it can read external controls, like upto 16 11-bit (proportional) values as well as 64 binary switch values.
Ideally the firmware for the radio has PR EdgeTX/edgetx#5885, so that this widget can set the virtual controls according to the external controls.
Main telemetry screen (this widget is upper left):

Visualizing the external controls:


if a virtual switch is configured as an external button, it is shown as a blue square, if this button is on it turn to a _red_square.
if a virtual input is configured as an external input, it is shown as a filled rectangle, the height of the filling resembles the value of the external control (pot).
The settings:
Example: TX16s extended by 32 3-pos switches (64 binary switches), two 4D Sticks (6 proportional inputs and two switches) and two space-mouse (6 values each) via an external µC unit. The stick-end switches (5 switches) are controlled by an internal (not visible) µC unit. Both can work together.