Refactor CRSF and SmartPort telemetry
Note: this PR needs updates in INAV Configurator
Global changes
- added sensor scheduler, for each sensor is possible to set low and high refresh rate, low refresh rate is used if value of sensor is changed
- rewritten smartport and crsf telemetry
SmarPort
- old legacy sensors have been removed, for ROLL and PITCh were used sensors for TEMP .. etc..
- new list of telemetry sensors is
- legacy fueID sensors was preserved, setting smartportFuelUnit as well
- it's possible to amend next sensors to sensor ID 0x51XX which is reserved for DYI sensor, in ethos must be added manualy, but it's possible use them in lua scripts
Ethos DIY sensors, how to add
it's native Ethos functionality, no needed to use any extra LUA script
Ethos sensors
CRSF
- new setting crsf_telemetry_mode, can be set to native (uses CRSF native telemetry), or to CUSTOM, for CUSTOM telemetry sensors are sensors transfered via CRSF frame 0x88, in the transmitter must run lua background script which translates custom sensors to native EdgeTX sensors, or it's possible to parse 0x88 frame directly in LUA script of third sides.
- new settings crsf_telemetry_link_rate and crsf_telemetry_link_ratio it's if they match with ELRS settings, but it's not mandatory.
- list of NATIVE sensors
- list of CUSTOM sensros
- example how could background lua script looks like snztest.lua
- for 30 CUSTOMCRSF telemetry sensors is nice to set ELRS telemetry at least to 1500bauds
CSFR CUSTOMtelemetry sensors
CSFR NATIVE telemetry sensors
For considering
- I would prefer to keep as possible sensors for smartport and custom CRSF sensors as same as possible
- second question if we need extra settings for each sensor, ON/OFF
Need to do
- [ ] new custom telemetry in INAV
- [ ] use new custom CSFR telemetry sensors here: OpenTX-Telemetry-Widget
- [ ] use new SmartPort sensors here: ETHOS-Telemetry-Dashboard
- [ ] add configuration to sensors to InavConfigurator
IMHO, old sensors should not just be removed. They should be available in a legacy mode for 2 major releases of INAV. This allows for anything that uses those sensors to catch up.
There are also sensors missing from SmartPort. Notably:
- GPS Fix and HDOP (part of old sensor 0x480)
- Airspeed
- Pitch & Roll (unless these are in the Attitude sensor?)
- Azimuth
So would you suggest to create something like "legacy sensors" for smartport as well. I would not like to mix old and new smartport sensors.
btw: I will add missing sensors to smartport and CRSF custom, and you are right pitch and roll are in attitude, it's native frsky sensor "AngleLever" it's expanded to two sensors in ethos.
What do you thing about settings for each sensor. ON/OFF?
It would make sense to follow the rotorflight way. Allow users to choose what sensors they want to display.
It also makes sense to move off legacy sensors. They are redundant and actually not officially supported.
There are some new features coming on ethos that will allow all the custom ones to be 'discovered' by ethos automatically.
Until yhay comes out it possible to auto create these and the crsf frames (as done in rotorflight) with a lua script.
I will get all this done as soon as you give me go - ahead on this being good for me to dev against.
note: implement https://github.com/iNavFlight/inav/pull/11189