Passthrough telemetry over CRSF (crossfire)

Hi, should be pretty soon, waiting for @andyp1per to do some more tracer testing

@JoshW sorry for the late reply, thanks a lot for testing this!
So it seems the tracer is pushing the uart subsystem hard with itā€™s telemetry @250Hz, I wasnā€™t expecting issues on a Cube Orange to be honest, but it could very well be something else too.
How is your setup wired? I might ask @andyp1per to take a guess on why it behaved that way

Hello Alex, Thanks for your works !
Is it possible to modify the flight control parameter function through CRSF like Yaapu FrSky GCS?

Yes, using the standard crossfire lua script you have access to the same parameters you can tune from the built in OSD, look here https://ardupilot.org/copter/docs/common-paramosd.html

Please beware that on F4/F7 FC you need to wire your crossfire receiver to a serial port with dma for both tx and rx, if you fail to do so parameter tuning might not work at all or be really slow

Hello Alex,Thanks for the reply, do you explain what to do now? I currently can run FrskyTelemetryScript-Taranis-1.9.1_beta1 on my x9d without any problems, but in the crossfire menu, I canā€™t find that arduplane can be configured. There are only three options: xf micro tx, xf wifi, and xf nano rx. Thanks again for reply

Thanks for the reply, I tested it. It is configurable with the latest official dev version of crossfire lua script, but using your MatekH743_crsf_ver_0.8 the option of arduplane will not appear in the crossfire lua script. I tested RC_OPTIONS setting 0, 256, 288 Canā€™t show up

https://firmware.ardupilot.org/Plane/latest/
commit 416dd981409df31cbee320b8262bfdc424013ebf
Author: Peter Barker pbarker@barker.dropbear.id.au
Date: Thu Jan 7 16:29:55 2021 +1100
APMVERSION: ArduPlane V4.1.0dev

It requires my latest version, the one is waiting to be merged, sorry should have made it clear

Great, thank you so muchļ¼ŒAlex!

1 Like

Hello Alex,

On the Ground, the yaapu script seems to work fine. I let it run for many hours without crash on my workbench.

Without GPX fix (in fixed indoor conditions), looking at the Travel (km) indicator, the value increase continously (about +10m every 10sec), without moving the FC.Also AltASL is showing a constant -17m in my case.

  • Traveled Distance :
    Looking at Mavlink data, it seems that the ā€œGlobal Position Intā€ has latitude and longitude set to 0, as expected, but alt and relative alt is constantly moving /increasing by 1/2 metter every each sec, which lead to my 37km of traveled distance after hours of static running.
    I guess altitude variations come from barometer sensor , and its errors ( internal from Matek H743), since no GPS value is available.

  • AltASL :
    Looking at Mavlink data, i just canā€™t find -17m in any message, but only found -17000 in GPS_RAW_INT message.

My suggestion are as follow :

  • Feature 1 : Let user choose in configurator the Travel distance source data : GPS sensor or Global Position Int estimation. Also it should display an Icon showing the source of data (GPS or EKF estimation). I guess both sensors make senses depending on usage and HW setup.

  • Feature 2 : change the color the left column indicators (Alt+Dist+Travel) + GPS coord from WHITE to RED fonts when GPS is not locked. Orange would be when lock is acquired with less that 5 ( for instance, threshold in config file ?) satellites.

            When data source choosen by the USER is EKF, the a similar color mapping could be choosen regarding the EKF status FLAG : RED for 2 or more flags in error. Orange for 1 Flag in error (https://mavlink.io/en/messages/common.html#ESTIMATOR_STATUS_FLAGS).
    
  • Feature 3 : reset Traveled distance on ARMing event( adding a config option to let user choose?).

What do you think about ?

@yaapu Hey thanks Alex! All the telemetry data seems to be making its way to the DJI system reliably, but the battery voltage that gets relayed to DJI for it to use as its built-in voltage is wrong. Also the calculated cell voltage seems to get to a point and then go wrong as well. All the other panels I use update reliably and accurately though. I tried to look through the code myself but itā€™s unfortunately a bit above my head yet. I saw where the cell voltage is supposed to calculate cell count once and then not change during flight but Iā€™m not sure that bit is working properly (in addition to the overall batt voltage). FWIW, your widget does state the correct voltage, and the dataflash logs also record the correct voltage, so I suspect this is something specific to the MSP implementation directly. Itā€™s been a while since I flew this helicopter on the old version of the OSD translator that ran on the arduino, but Iā€™m pretty sure that when I was flying that configuration, the true 12S voltage was reported in the goggles.

Donā€™t know if any of this helps, but Iā€™m happy to dig deeper if you or @andyp1per tell me what youā€™d like me to do.

Edit:

The DJI goggles are getting data from ā€œGPS2ā€ and Tracer is connected to TELEM2.

i have the 0.9 custom arduplane fw flashed using it with the 1.9.1 beta version as you recommendedā€¦in the Crossfire tx module i have crsf turned on for ch1 and ch2 as Tx/rxā€¦ch1 and ch2 from the rx are connected to UART1 on the fc and not being used by anything else, i disabled the UART 2 completely which also had the sbus pin.
RC OPTIONS set to 288 (32+256) and SERIAL1_PROTOCOL to 23 to enable crsf.
gps is connected to uart3 and mavlink is connected to uart5 from Ch3 and Ch4 from the rx to the fcā€¦discovered 22/23 sensors. in MP i can change flight modes etc so crsf seems to be functioningā€¦ only issue i am having is the Yaapu script horizon is not moving and it always says no telemetry msg on main screen and basically no telemetry data is displaying at allā€¦
i have tried everything that came to mind without success so far, the only thing i might not have tried is disabling mavlink connection from ch3 and ch4 from rx on uart5, if you have any suggestions kindly let me know, thanks!

Sorry for the silly question, did you enable crossfire support in the yaapu config menu?

Hello @yaapu, I can report that I got your updated script for CRSF to work on my setup. I had a bit of a hard time at first, I was getting a message about CPU limit on my radio, a TX16S and decided to start from scratch, so I backed up my models and settings and flashed my radio to latest OpenTX and created a new SD card, so I would have a clean start; my issues went away. Here is my setup:

XF Transmitter, full module running CRSF firmware 4.0.8 - Op mode Normal, Bluetooth off
XF Nano RX, running CRSF firmware 4.0.8 - Mode 12Ch, Telemetry On, RF Profile dynamic, RC by Mavlink OFF, Output1 CRSF Tx, Output2 CRSF Rx
FC - Matek F405-SE using pre-compiled binary from your link above
RC Tx - Radiomaster TX16S, running OpenTX 2.3.11
Yaapu Telemetry Widget with crossfire for Horus class radios from your link above. Enabled CRSF option

Ardupilot options as specified, using serial1,
SERIAL1_PROTOCOL = 23
SERIAL1_OPTIONS = 0
SERIAL1_BAUD = 115 (I donā€™t think this matters?)

RC_OPTIONS = 256 (had no other options enabled)

I will be testing this with a full size CRSF Diversity receiver and will be flight testing it as well. I will report back. Want to thank you very much for all of your efforts in making these great scripts available to everyone! Couldnā€™t live without them anymore!

Worked exactly the same with the full size CRSF Diversity receiver. I see 28 telemetry sensors on my telemetry screen, more than I had ever seen! :slight_smile:

1 Like

yes i did enable crsf in the Yaapu config menu

+1, the appreciation is strong with this one. Thanks so much Alex!

1 Like

Hi,

  • travel distance: the script uses speed coming from the FC, no access to mavlink data at all, the math is easy, average speed x time, so no way of doing what you ask. What I can do which makes sense is suspend travel calculation when disarmed which I already do.
  • altasl: this is the GPS altitude (absolute) also sent by the FC
  • feature 1 is not applicable
  • feature 2 might make sense (low priority though)
  • feature 3 might make sense need to check how the internal OSD behaves and mimick it rather than introduce a new different behaviour

any suggestions?
in the Yaapu debug page i can see msgs like CRSF changed from mode 1 ro mode 2 153hz bad gps etc msgs but yet i cannot get the Yaapu telemetry screen to show any data or the horizon moving, all my settings also seems like perfect, totally clueless now

if you get the status messages it means custom crossfire telemetry is working. Are you using a tracer perhaps? which fw version are you using for your TBS TX/RX combo, and finally which controller so I can compile a test FW for you (plane/copter/heli/ā€¦)?

Finally, the only way to get it working is to set the parameter ā€œOp. Modeā€ to ā€œForce telemetryā€ in the Crossfire Tx. That way, I can discover sensors (and your script see them too).

However, when I enable this option, rc commands (Rudder, Ailerons, etc.) start to lag a lot. I could not flight my plane with that option enabled since it could be too dangerous. It sounds that something is slowing down thingsā€¦

Would you have any suggestion about this strange behavior?

mhmm, if you have mavlink enabled try lowering the mavlink rates on the FC, crsf is dropping packets cause bandwidth is limited