mariansoban / FrskyTelemetryScript

A LUA telemetry script and widget for the Horus X10(S),X12 and Taranis X9D+,X9E,QX7 and X-Lite radios using ArduPilot frsky passthru protocol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yaapu Frsky Telemetry Script

This is the home of the Yaapu Telemetry Script project, a LUA telemetry script for the Frsky Horus and Taranis radios using the ArduPilot frsky passthru telemetry protocol.

Note: the latest pre-release versions are downloadable from the releases section

X10

X9D

X7

The supported radios are:

  • Taranis X9D(+) and QX7 on OpenTX 2.2.2 or greater
  • X-Lite on OpenTX 2.2.2 or greater (by using the QX7 version)
  • Horus X10 and X12 on OpenTX 2.2.2 or greater
  • Jumper T16 on JumperTX 2.2.3 or greater (by using the Horus version)

Here you'll find

  • a Telemetry script for the Taranis radios: X9D,QX7 and X-Lite (changelog)
  • a Widget for the Frsky Horus radios: X10/S and X12 and for Jumper T16 (changelog)

both support all of the telemetry DIY 0x5000 packets sent by ardupilot’s frsky passthrough protocol library

The script is also compatible with the excellent MavlinkToPassthru converter firmware by Eric Stockenstrom

Requires OpenTX 2.2.x and a recent release of ArduPilot.

Index

Screenshots

horus GPS maps view

X10maps

dual battery view

X10dual

X9Ddual

X7dual

mavlink message history

X10messages

X9Dmessages

X7messages

Display layout

X12

X9D

QX7

Features

  • configuration menu, long press [MENU] on Taranis or long press [SYS] on Horus (refer to this guide)
  • per model configuration saved in MODELS/yaapu/modelname.cfg on Taranis, SCRIPTS/YAAPU/CFG/modelname.cfg on Horus
  • imperial and metric units for altitude and distance inherited from radio settings
  • horizontal and vertical speed units selectable from script config menu
  • flight modes based on frame type:copter,plane or rover with vocal sound support
  • artificial horizon with roll,pitch and yaw with numeric compass heading
  • vertical variometer gauge on right side of center panel
  • rangefinder with max range support in config menu
  • mini home icon on yaw compass at home angle position
  • battery voltage from 2 sources, ( on taranis short pressing [ENTER]/[ENCODER] cycles between the sources)
    • frsky FLVSS voltage sensor if available (vs is displayed next to voltage)
    • flight controller via telemetry (fc is displayed next to voltage)
  • parallel, series and independent battery wiring
  • battery lowest cell if available or cell average if not
  • battery current
  • battery capacity and battery capacity used in mAh and % with vocal alerts for 90,80,70,60,50,40,30,25,20,15,10,4 levels
  • efficiency as battery current/speed, value in mAh
  • vertical speed (VSI) on bottom of HUD
  • altitude on right side of HUD
  • gps altitude
  • gps fix extendend status (2D,3D,DGPS,RTK)
  • gps HDop
  • satellite count (Note: the highest reported count is 15 sats due to telemetry library restrictions)
  • flight time (uses OpenTX timer 3) with vocal time alerts and spoken flight time
  • rssi value
  • transmitter voltage
  • home distance
  • total travel distance calculated from speed
  • horizontal ground speed or airspeed (available if configured in mission planner, see here)
  • home heading as rotating triangle
  • mavlink messages with history accessible with [PLUS]/[MINUS] on Taranis or by accessing the dedicated page on Horus (on Horus check this guide)
  • english, italian, french and german sound files for selected events: battery levels, failsafe, flightmodes, alerts and landing
  • lcd panel backlight control for the Horus radios, see this
  • full telemetry reset on timer 3 reset, see this
  • PX4 flight modes support when used with a Teensy running the mavlinkToPassthru firmware
  • vocal playback for a subset of mavlink status messages
  • up to 6 frsky sensors can be displayed on screen

Advanced Features

  • offline GPS cartography on Frsky Horus radios and Jumper T16 radios
  • dual battery support (dual FLVSS and/or dual battery from ArduPilot) short press [ENTER] on Taranis or [ENCODER] on Horus to display second battery info. If a second battery is detected there will be a "B1+B2" label on screen (in Widget mode follow this guide)
  • capacity ovveride for battery 1 and 2
  • tracking of min/max values for battery/cell voltage, current, altitude, ground and vertical speed, short press [MENU] on Taranis or [SYS] on Horus to display them, an up pointing arrow will indicate max values whereas a down pointing arrow will indicate min values (in Widget mode follow this guide)

X10 minmax

X9D minmax

X7 minmax

  • vocal alerts for battery levels,
  • vocal fence: max distance and min/max altitude alerts
  • configurable vocal timer alert every n minutes
  • sensors VFAS,CURR,Alt,VSpd,GAlt,Hdg,GSpd,Fuel,IMUt,ARM are exposed to OpenTX, see the wiki for details.

Extra screen with external frsky sensors support

Version 1.8.0 and above introduce an extra screen reachable by pressing [ENTER] from the status message history. This screen adds support for up to 6 user selected frsky sensors to be displayed on screen.

110sensors_display

X9Dsensors_display

X7sensors_display

Setup info in the wiki

MavlinkToPassthru firmware support

X9Dm2f

X7m2f

Version 1.8.0 and above natively support Eric Stockenstrom's MavlinkToPassthru converter firmware Plus version.

By using Eric's Plus version the script can display

  • waypoint number, bearing and distance
  • airspeed info
  • throttle %

To enable this feature please select it from the script config menu by choosing "m2f" as left panel option.

Voltage Sources

Battery voltage is tracked independentely for 2 battery sources: FLVSS and flight controller battery monitor. In single battery mode a short press of [ENTER] on Taranis cycles between all the sources. Min value is also tracked for the 2 sources and can be shown with a [MENU] short press on Taranis.

Note:If you use a second FLVSS voltage sensor the OpenTX variable has to be renamed to "Cel2"

When a second battery is detected the script also tracks "aggregate" battery values and shows a "B1+B2" label in the right panel. Cell value and battery voltage is the "minimum" between the two batteries, current is summed and capacity percent is averaged. A short press of [MENU] on Taranis or [ENCODER] on the Horus will show min/max values for this aggregate view.

In dual battery mode a short press of [ENTER] on the Taranis switches from single aggregate view to individual dual battery view. Subsequent short presses of [ENTER] in this dual view will cycle between voltage sources. In dual view a short press of [MENU] on Taranis shows individual packs min/max values.

To get back to aggregate view and retain the selected voltage source short press [EXIT] on Taranis.

For detailed info on supported battery configuration please check the wiki

Note:On the Horus voltage source has to be selected from the menu and Min/Max values are accessible by switching to the dedicated screen

Airspeed vs Groundspeed

The frsky passthrough telemetry library can send on the radio link only 1 speed value. Where it picks that speed value depends on arduplane configuration.

  • ARSPD_TYPE > 0 : an airspeed sensor has been enabled in arduplane. The telemetry library will try to use airspeed even if the sensor is unhealthy, if it’s unhealty the reported speed will be 0, with a healthy airspeed sensor the reported speed will be actual airspeed.

  • ARSPD_TYPE = 0 : no airspeed sensor defined in arduplane. The telemetry library will always send groundspeed (gps)

To recap: the script has no control and simply displays what arduplane is sending based on airspeed sensor configuration.

Alerts

There are 2 battery level alerts, both are set as cell voltage so independent from cell count. Battery level 1 should be set higher than battery level 2.

When cell voltage falls below level 1 it will trigger a vocal alert and the V next to the cell voltage will start blinking: once triggered blinking will persist even if the voltage raises above level 1.

When cell voltage falls below battery level 2 it will trigger a second vocal alert and the cell voltage digits will start blinking: once triggered blinking will persist even if the voltage raises above level 2.

If the battery reaches the failsafe level (it must be configured in mission planner) the script will display "batt failsafe" on the hud and play a vocal alert every n seconds (period can be configured from the menu).

It's also possible to configure a timer that will trigger a vocal alert every n minutes of flight time.

The script also support a "vocal fence" feature by setting a minimun altitude, a maximum altitude and a maximum distance alert. When the vehicle moves outside of the fence the script will play a vocal alert every n seconds.

Note: (applies to versions 1.7.1 and above) The battery monitoring engine has been modified to allow the voltage to drop below level for up to 4 seconds before triggering the alert. During this period the voltage background will flash to indicate that the alarm is about to fire, if during this "grace" period the voltage raises above level the alarm is reset.

Telemetry reset

It's possible to do a full script reset by resetting timer 3.

For the reset to occur 2 conditions must be met

  • flight time is greater than 00:00
  • vehicle is not armed

Configuration

X10 menu

X9D menu

X7 menu

Complete menu options list:

  • voice language: english, italian, french and german
  • battery alert level 1, default is 3.75V
  • battery alert level 2, default is 3.5V
  • capacity override for battery 1
  • capacity override for battery 2
  • disable all sounds
  • disable msg beep: disable sound on incoming message
  • disable msg blink: disable text blink on incoming message
  • default voltage source: disable autodetection and force either FLVSS,A2 or ArduPilot as battery voltage source
  • timer alert every: play a vocal timer alert and speak flight time at configured intervals
  • min altitude alert: minimum altitude vocal fence
  • max altitude alert: maximum altitude vocal fence
  • max distance alert: maximum distance vocal fence
  • repeat alerts every: alert period in seconds
  • cell count override: disable cell count detection and override it manually
  • rangefinder max: enable rangefinder and enter maximum rangefinder distance
  • enable synthetic vspeed: ignore telemetry vertical speed and calculate it from atitude variations
  • ground/airspeed unit: select either m/s, km/h, mph, kn
  • vertical speed unit: select either m/s, ft/s, ft/min

The language of the vocal alerts is independent from the radio language and can be configured from the menu. Right now only english, italian and french are supported but new languages can be added with ease.

Battery capacity for battery 1 and battery 2 is automatically read from the values configured in mission planner but can both be overidden from the menu. When a new capacity is defined from the menu it will immediately be used in all calculations and it's value will be displayed on screen.

ArduPilot Configuration

The two main wiring configurations are

ArduPilot sends native frsky passthrough telemetry data

The flight controller is configured to send native frsky passthrough telemetry data either with an inverting cable or without (pixracer). To enable this feature the SERIALn_PROTOCOL of the uart connected to the receiver has to be set to 10, check the ardupilot wiki for details.

This configuration requires a "special" cable that acts as logic level converter and inverter, an example of such a cable is here

For the pixracer an inverting cable is not needed but the wiring requires that the TX and RX pin of the frs port be connected together, check this image for further details.

ArduPilot sends mavlink telemetry data

The flight controller is configured to send mavlink messages and an external board (Teensy, Blue Pill,etc) is used to convert mavlink to frsky using Eric Stockenstrom MavlinkToPassthru firmware.

This is the default configuration for long range systems (Dragonlink, TBS Crossfire, ULRS to name a few) unable to carry native frsky telemetry but compatible with mavlink.

Installation on Taranis

Please check the wiki for more info

Installation on Horus

Please check the wiki for more info

Compilation

To compile your own version you must first preprocess the SOURCES/yaapu0.lua scripts with the pproc.lua preprocessor. Details on the preprocessor can be found here

You need a working lua interpreter for this to work. On a command line simply run "lua pproc.lua yaapu0.lua yaapu9.lua" The yaapu9.lua script is now ready to be compiled in Companion.

Hardware requirements

Please refer to the arducopter wiki for information on how to configure your flight controller for passthrough protocol

For information on how to connect the FrSky equipment together, please refer to

For information about building DIY frsky telemetry cables

Support and Troubleshooting

Official Blog Thread on ardupilot.org

Official thread on rcgroups.com

Open an issue on github.com

Credits

Thanks go to

  • Marco Robustini (X9D tester)
  • Chris Rey (QX7 tester)
  • Alain Chartier (french sound files)
  • Johnex for TTSAutomate phrase file
  • Franck Perruchoud (X12 main beta tester)
  • Chen Zhengzhong (X10 tester)
  • Andras Schaffer (X12 tester)
  • Massild (X10 tester)
  • Zeek (X10 tester)
  • Vova Reznik (X10 tester)
  • Greg Covey (Horus and X9D tester)
  • Marc Dornan (Horus Tester)
  • Markus Greinwald (Horus tester)
  • Paul Atherton athertop (X9D tester)
  • Eric Stockenstrom zs6buj (Horus and X9D tester)
  • qba667 (NV14 support)
  • BFD Systems (Horus version sponsor)
  • Harris Aerial (Horus version sponsor)
  • Jumper (Jumper T16 version sponsor)
  • Frsky (Taranis X9D 2019 sponsor)
  • Craft&Theory for the passthrough protocol

Donation

This project is free and will always be.

If you like it you can support it by making a donation!

donate

About

A LUA telemetry script and widget for the Horus X10(S),X12 and Taranis X9D+,X9E,QX7 and X-Lite radios using ArduPilot frsky passthru protocol

License:GNU General Public License v3.0


Languages

Language:Lua 99.9%Language:Batchfile 0.1%