Open wimalopaan opened 9 months ago
Yes, I would say this is a good idea.
User defined telemetry packets could be very useful in scenarios where:
It's a good idea to look into the JETI EZ-BUS. In this protocol is an option to define arbitrary telemetry fields. Protocol passes them in a transparent way to the radio. Of course, in such way OpenTX/EdgeTX would have to able to understand those
My general idea is to define something like this: EdgeTX sends a sensor discovery command to the RX The RX polls all sensors for their respective definition, including:
The RX assigns an identifier to every sensor, so that they are stable over reboots The unit, scaling and offset information is send to EdgeTX Every sensor can have multiple values For special cases, like GPS, sensor types can be predefined, so that the complex sensor information discovery is not needed.
In EdgeTX this could be triggered by pressing the telemetry discover button. Until a new discovery run is started the IDs are preserved in the RX and the sensors.
+1 for this. I am currently working with the MT12 and a drift car and wanting to get car specific information like steering angle when modified by drift gyro, or suspension information, or tire slip. As I am learning more about this protocol, it looks like I may need to stuff that data in an unrelated place and grab it back in a custom parser.
Was experimenting on an solution for this. Created a "bridge" Widget between the User-Define-Sensors and EdgeTX. Widget is only for Color Radios, but the same idea can be used in B&W with telemetry scripts.
Yappu has a "Passthrough telemetry over CRSF", and ithe plumbing is already there in OTX/ETX. https://discuss.ardupilot.org/t/passthrough-telemetry-over-crsf-crossfire/62668
Using the Yappu Lua sensor debug LUA code as a start, I get the custom sensors via LUA, and then forward them to EdgeTX. The LUA has a configuration about the custom sensor (name, id, unit, precision). In that way, when you do "discover" sensors, they appear like regular sensors in EdgeTX.
Let me know if someone wants to try it.
This was a prof-of-concept:
example sensor config: Widget Setup (With build-in Sensor simulation) Then the sensors are "Forwarded" to EdgeTX as the values comes.
@frankiearzu This is an interesting idea!
I wasn't aware, that packe type 0x7f
is already reserved for user-defined telemetry packets. And looks like this isn't documented in this wiki.
Maybe we can fix this as proven?
Other telemetry protocols have the possibility to send user-defined telemetry dat. They transport only values without physical meaning.