Verifying button press events #106
stronnag
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
LUA Button Event Tester for EdgeTX
Introduction
As a number of users appear to have some difficulty with getting button presses recognised e.g. for the INAV Lua Telemetry Script to invoke the Configuration Menu on some budget (i.e. cheap, not enough well defined hardware button) radios, the atteched script may help.
Usage
The attached script (
events.lua
) should be installed in the radio (or Companion) (sdcard)SCRIPTS
directory. Note that due to Github rules, the scrip is compressed with gzip (events.lua.gz
). It is necessary to unzip it e.g.gunzip events.lua.gz
.Companion
When run from Companion, the results may be examined in the "Debug Viewer"; it is recommended to enable a debug filter of
/EVENT
.On the radio
When run from the radio, the results will be written to the VCP port in
LUA
mode:LUA
Ask
VCP
mode.cliterm
application. Other options are (Linux)picocom
orminicom
. Other OS can use their preferred tool.CRLF
(carriage return, line feed,\r\n
) line terminator.Running events.lua
SCRIPTS
directoryevents.lua
(orevents.luac
)Execute
Now you can press the hardware buttons and the result will be reported either in the debug console (Companion), or in the serial terminal (from the radio).
RTN
/EXIT
key (a short press is reported)Example Session
In the example serial session below, the button keys from a RadioMaster Boxer are shown, this also reports roller events. If the radio does not have a roller,
EVT_VIRTUAL_DEC
/EVT_VIRTUAL_INC
may also be reported.Comments on the actual button pressed have been added, preceded by a hash sign
#
.If your radio cannot provide either "Roller long press" or "Virtual MENU LONG", it is unlikely that you will be able to access the configuration menu in the INAV Lua Telemetry script. You might ask the firmware developer or vendor for assistance.
events.lua.gz
Beta Was this translation helpful? Give feedback.
All reactions