Dear experts,
I am a new in the world of RC and OpenTX. I built a custom telemetry sensor with an ATTiny controller (FrSky S.PORT protocol) which successfully transfers data on Battery Voltage, driven distance and actual speed of my RC car to my sender (TX16 Radiomaster).
I see the telemetry values (chosen sensor IDs : 0x5100 0x5101 and 0x5102) in the transmitter telemetry model screen with correct values.
I now want to write a widget to nicely display the values, The widget displays as expected, however, the values are not arriving. (All 0). Obviously I have not understood how to use the getValue(source) lua function. My telemetry sensors have the "names" 5100 5101 and 5102 in the OpenTx telemetry screen (model setup). But these values passed as strings to the function do not work.
I found the page https://downloads.open-tx.org/2.3/relea ... s_x12s.txt with promising entries "telem1" ... "telem60" but how do I know which value corresponds to which sensor (if at all this list contains the strings I am supposed to use)?
In general:
How do I find the correct "source" parameter of the getValue() function for an arbitrary FrSky telemetry sensor sending data back to the transmitter with any 16 bit sensor ID (S.PORT protocol)?
...probably I haven't understood something very fundamental here...
Thanks a lot in advance !
Lua script for telemetry
Re: Lua script for telemetry
The number for "telemx" is the slot number on the left.
You might rather want to rename the sensors after their discorvery to something more descriptive and then use those names.
You might rather want to rename the sensors after their discorvery to something more descriptive and then use those names.
Re: Lua script for telemetry
Thank you so much Kilrah, works like charm !!!
And thanks to all who contributed to OpenTX. Fantastic project !!!
And thanks to all who contributed to OpenTX. Fantastic project !!!
- Attachments
-
- screen-2022-03-16-215255.png (5.7 KiB) Viewed 1398 times