Yaapu LUA Fully Functional and Supported with PX4 Firmware

Alex Apostoli (a.k.a Yaapu) has an excellent open source FrSky Telemetry LUA Script for the Horus X10, X12, Jumper T16 and Taranis X9D, X9E and QX7 but was primarily designed for ArduPilot. With the use of a Teensy 3.x board loaded with Eric Stockenstrom’s (a.k.a. zs6buj) Mavlink to FrSky passthrough protocol telemetry, PX4 can now use and take advantage of the script and use just about all the FrSky sensors. This video shows my Jumper T16 setup with the still under development map interface. When it’s ready for release, I’ll add the steps here.

I’m not a coder and consider myself a noob and a novice and as such, had a fairly steep learning curve to implement. The intention here is to provide an almost step-by-step process to install and use it. The other objective is to hopefully make this a one-stop-shop resource that pulls all the info from the different sites from start to finish in one place.

Some basic soldering is required. You can read more in RCGroups and ArudPilot forums.

After everything is done, you’ll have telemetry presentations in your transmitters as below. Enjoy and Good Luck!

Taranis Q X7

Taranis X9D and X9E

Horus X10 and X12 ; Jumper T16
Current Default Display

Software needed for Windows:

Hardware needed:

  • Teensy 3.2 board available from eBay or Amazon
  • Pixhawk 3-pin wire harness (Safety switch)
  • Pixhawk 6-pin wire harness (Telem port)


  • Download and install Arduino IDE in C:. It’s not required but I like to add the version number of what I’m installing for reference later on with other projects.

  • Download and install Teensyduino.

    • Follow the installation instructions from the download page.
    • In the Select Arduino Folder , click the pull down menu and choose your Arduino installation location.
      image image
      If you don’t have it yet, create a TEMP folder in C:\ (C:\TEMP).
  • Download Teensy Loader and save it in C:\TEMP.

  • Download the MavlinkToPassthru zip file and unzip or choose Open in Desktop if you have GitHub Desktop.

  • After unzipping or cloning, copy all the folders in the \MavlinkToPassthru-master\libraries\ to C: Arduino\libraries\ folder.

  • Download FrskyTelemetryScript zip file and unzip or choose Open in Desktop if you have GitHub Desktop.

    • After unzipping or cloning, copy the folder MavlinkToPassthru_v1.0.16 to C:\TEMP
      Install MavlinkToPassthru
  • Open Arduino IDE

  • Click File>Preferences>Browse to C:\TEMP then click Open the click OK

  • Click File>Open and drill down to C:\TEMP\MavlinkToPassthru_v1.0.19\

  • Double-click on MavlinkToPassthru_v1.0.19.ino

  • Go to Tools>Board> then click on Teensy 3.2 /3.1

  • Go to Tools>USB Type> then click on Keyboard + Mouse + Joystick

  • Scroll down and make sure that Air Mode is defined (there’s no “//” before it.

    • If there is, simply delete the “//” and put the slashes in front of the one that had it, i.e. if #define Relay Mode didn’t have it, put the two slashes in front of it //#define Relay Mode.
    • Then click the check mark icon on the top left corner to Verify or go to Sketch>Verify/Compile
  • When there are no errors, you should get a message similar to this on the bottom

  • It will also open Teensy Loader

  • You can do one of these to upload the firmware:

    • Press the Arrow icon on the top right corner image
    • Go to Sketch then click Upload
    • Press the button on the Teensy as indicated by the Teensy Loader

Wiring to Teensy board

See the diagram on how to solder the Pixhawk wiring to the Teensy except plug it in TELEM2
Here’s my bench test bed setup
When you’re satisfied with the connection after testing, you can use a 16mm diameter clear heat shrink to protect it.
Configuring and setup in QGroundControl

PX4 v1.8.2 and earlier

In the parameters tab, set SYS_COMPANION = FrSky Telemetry.

PX4 v1.9.0 and later

  • In the parameters tab, set the following:
    • MAV_0_CONFIG = TELEM 2
    • SER_TEL2_BAUD = 57600 8N 1
    • SYS_COMPANION = Disabled
    • TEL_FRSKY_CONFIG = Disabled

Installing and running LUA script on Taranis Q X7 and X9D

These instructions are from Github.

  • Make sure your radio has at least OpenTX 2.2.3 or the latest release.

  • Enable both lua and luac support by checking the relevant options prior to flashing your radio with Companion

  • Go to where you downloaded the FrSky Telemetry Script unzipped it.

  • Copy the contents of “yourfolder”\FrskyTelemetryScript\TARANIS\SD\SCRIPTS\TELEMETRY to your radio SD card’s \SCRIPTS folder.

  • Copy and paste the “yaapu” folder of “yourfolder”\FrskyTelemetryScript\TARANIS\SD \MODELS\ to your radio SD card’s \MODELS folder.

  • Copy and paste the “yaapu0” folder of “yourfolder”\FrskyTelemetryScript\TARANIS\SD \SOUNDS\ to your radio SD card’s \SOUNDS folder.

  • On your Tx, press Menu then press Page until you get to the DISPLAY page.

  • On Screen1, select Script then select yaapu7 for Q X7 or yaapu9 for X9D.
    Which files to use

  • For X9D/X9D+ and X9E radios use the yaapu9 script

  • For QX7 radios use the yaapu7 script

  • For X-Lite radios use the yaapu7

The script is already compiled and only needs to be copied to your radio SD card.

X9 series folder structure

  • /MODELS/yaapu/modelname.cfg
  • /MODELS/yaapu/modelname_sensors.lua (optional)
  • /SCRIPTS/TELEMETRY/yaapu9.lua
  • /SCRIPTS/TELEMETRY/yaapu9.luac
  • /SCRIPTS/TELEMETRY/yaapu/alt9_view.luac
  • /SCRIPTS/TELEMETRY/yaapu/draw9.luac
  • /SCRIPTS/TELEMETRY/yaapu/hud9.luac
  • /SCRIPTS/TELEMETRY/yaapu/left9.luac
  • /SCRIPTS/TELEMETRY/yaapu/left9_m2f.luac
  • /SCRIPTS/TELEMETRY/yaapu/menu9.luac
  • /SCRIPTS/TELEMETRY/yaapu/right9.luac
  • /SCRIPTS/TELEMETRY/yaapu/copter.luac
  • /SCRIPTS/TELEMETRY/yaapu/copter_px4.luac
  • /SCRIPTS/TELEMETRY/yaapu/plane.luac
  • /SCRIPTS/TELEMETRY/yaapu/plane_px4.luac
  • /SCRIPTS/TELEMETRY/yaapu/rover.luac
  • /SOUNDS/yaapu0/en
  • /SOUNDS/yaapu0/it
  • /SOUNDS/yaapu0/fr
  • /SOUNDS/yaapu0/de

QX7 and X-Lite folder structure

  • /MODELS/yaapu/modelname.cfg
  • /MODELS/yaapu/modelname_sensors.lua (optional)
  • /SCRIPTS/TELEMETRY/yaapu7.lua
  • /SCRIPTS/TELEMETRY/yaapu7.luac
  • /SCRIPTS/TELEMETRY/yaapu/alt7_view.luac
  • /SCRIPTS/TELEMETRY/yaapu/draw7.luac
  • /SCRIPTS/TELEMETRY/yaapu/hud7.luac
  • /SCRIPTS/TELEMETRY/yaapu/left7.luac
  • /SCRIPTS/TELEMETRY/yaapu/left7_m2f.luac
  • /SCRIPTS/TELEMETRY/yaapu/menu7.luac
  • /SCRIPTS/TELEMETRY/yaapu/right7.luac
  • /SCRIPTS/TELEMETRY/yaapu/copter.luac
  • /SCRIPTS/TELEMETRY/yaapu/copter_px4.luac
  • /SCRIPTS/TELEMETRY/yaapu/plane.luac
  • /SCRIPTS/TELEMETRY/yaapu/plane_px4.luac
  • /SCRIPTS/TELEMETRY/yaapu/rover.luac
  • /SOUNDS/yaapu0/en
  • /SOUNDS/yaapu0/it
  • /SOUNDS/yaapu0/fr
  • /SOUNDS/yaapu0/de

Configure LUA to work with PX4

  • Turn on the Tx
  • Long press Page to go to the HUD screen
  • Long press Menu then scroll down to “enable px4 flightmodes:” then press ENT to change it to “yes”.
  • You can also change the units for “air/groundspeed unit” and “vertical speed unit” if you don’t want the Defaults.
  • Press Exit to come to the HUD screen.
  • Powercycle (turn Tx Off then back On).
  • Long press Page.
  • Power On the Pixhawk and if everything is working properly, your HUD will start displaying telemetry data from your flight controller. Pitch, roll and yaw the flight controller/ aircraft to test the screen.

Installing and running LUA script on Jumper T16 and Horus X10/ X12

These instructions are from Github.

  • Copy the contents of the SD folder to your radio SD Card.
  • Make sure you have the following folders:
    • /SOUNDS/yaapu0
    • /WIDGETS/Yaapu folders.
  • Power cycle the radio to clear widget caches!

Note: For the script to control the LCD panel backlight, a few extra steps are required, please follow this guide

The script is already compiled and only needs to be copied to the radio SD card.

The correct folder structure is

  • /SCRIPTS/YAAPU/yaapux.lua
  • /SCRIPTS/YAAPU/yaapux.luac
  • /SCRIPTS/YAAPU/menu.lua
  • /SCRIPTS/YAAPU/menu.luac
  • /SCRIPTS/YAAPU/LIB/copter.lua
  • /SCRIPTS/YAAPU/LIB/copter.luac
  • /SCRIPTS/YAAPU/LIB/plane.lua
  • /SCRIPTS/YAAPU/LIB/plane.luac * /SCRIPTS/YAAPU/LIB/rover.lua
  • /SCRIPTS/YAAPU/LIB/rover.luac
  • /SCRIPTS/YAAPU/LIB/init.lua
  • /SCRIPTS/YAAPU/LIB/init.luac
  • /SOUNDS/yaapu0/en
  • /SOUNDS/yaapu0/it
  • /SOUNDS/yaapu0/fr
  • /SOUNDS/yaapu0/de
  • /WIDGETS/Yaapu/main.lua
  • /WIDGETS/Yaapu/main.luac

Note: On radios without the luac option enabled it is necessary to use the .lua versions

Configure Jumper T16 and Horus X10/ X12

You need to configure up to four full screen telemetry pages.

Each page will have the Yaapu Widget configured to show different information.

To toggle between pages short press the [PAGE] button.

The Widget is configured by changing the page option in the “Widget settings”.

Widget valid page options are

  1. Main screen for single or aggregate view (mandatory)
  2. Mavlink message history screen (mandatory)
  3. Min/Max screen for single or aggregate view (optional)
  4. Main screen for dual battery view (optional)

Note: after the files have been copied to the SD card the radio needs to be rebooted to clear all widget caches


Mandatory steps

  1. Long press [TELE] to enter telemetry page setup
  2. Short press Scroll Wheel and use it to change the “Layout” to full screen, confirm pressing it and press [RTN] to exit from the “Layout” setup
  3. Uncheck “Top Bar” and “Sliders+Trims”
  4. Select “Setup widgets” and press Scroll Wheel, you’ll be presented with a full empty screen layout.
  5. Short press Scroll Wheel to assign a widget to the layout. The first available widget will be shown, “Gauge” in this example
  6. Scroll until you see the Yaapu script main display
  7. press Scroll Wheel to confirm the widget selection
  8. Press [RTN] to return to the telemetry pages setup
  9. Add a new telemetry page by pressing [PAGE] to select the plus [+] icon
  10. Press the Scroll Wheel to create a new page. The Yaapu widget instance of this page will hold the Mavlink message history
  11. Uncheck “Top Bar” and “Sliders+Trims”
  12. Select “Setup widgets” and press the Scroll Wheel. You’ll be presented with a full screen empty widget layout
  13. Short press the Scroll Wheel to assign a widget to the layout, the first available widget will be shown, “Gauge” in this example
  14. Scroll the Scroll Wheel until you see the Yaapu script main display
  15. Confirm the selection pressing the Scroll Wheel
  16. Long press the Scroll Wheel to enter the widget menu
  17. Select “Widget settings” to enter the Yaapu widget options menu
  18. Press the Scroll Wheel (1 will start blinking) and change the “page” option to 2
  19. Press [RTN] to display the Mavlink message history screen
  20. press [RTN] to return to the main telemetry setup page
    Turn your radio OFF and ON, the Yaapu widget should start at Power On!

Optional steps

To display the min/max screen repeat the steps from 9 to 20, you have to add an extra Yaapu full screen widget and set the script “page” option to 3 (step 18)

To display dual battery screen repeat the steps from 9 to 20, you have to add an extra Yaapu full screen widget and set the script “page” option to 4 (step 18)

Turn your radio OFF and ON, the Yaapu widget should start at Power On!

Sensor discovery

Power up the flight controller.

Now from the Yaapu widget page long press [MDL]
Press [PAGE] and select the TELEMETRY page
Run “Discover new sensors”, press [RTN] twice to go back to the Yaapu widget while discovery is running (do not stop sensor discovery)

As a last step from the Yaapu widget page long press [MDL]
Use the Scroll Wheel to select the telemetry page:

All sensors should have been discovered

Stop discovery and press [RTN] twice to go back to the Yaapu widget

Note: in order for discovery to work the telemetry link has to be active!

How to access the script configuration MENU while in Widget mode

From any of the telemetry pages, (the Yaapu main widget page in this example)
Long press [SYS] to enter the Radio Setup
Press [PAGE] to select the “SD CARD” tab
Browse to the /SCRIPTS/YAAPU folder
And Execute the “menu.lua” or “menu.luac” file by pressing the Scroll Wheel
This will show the Yaapu script configuration menu. Scroll down to “enable px4 flightmodes:” Press the Scroll Wheel and change it to “yes”. You can also change the units for “air/groundspeed unit” and “vertical speed unit” if you don’t want the Defaults. All changes are automatically saved.
Exit from the menu script by long pressing [RTN], then short press [RTN] twice to return to the main model telemetry page
Note: to apply the changes to the running widget you have to change the widget active page at least once by short pressing [PAGE], for instance toggle from the main screen to the message history screen


Extra telemetry pages can be added to show whatever widget the user wants to, the Yaapu widget will be running in the background and all telemetry related events will be vocally reported. This allows to leverage the full OpenTX flexibility while the Yaapu script is running.

While the “menu.lua” configuration menu is running all the widgets are stopped (execution is frozen) and all telemetry info received while in the configuration menu is lost, this is an OpenTX limit, i.e. while a one time script is running, all other LUA script are stopped. The user has to keep this in mind when launching the configuration menu while flying! While in the menu the flight timer is not stopped or reset and once back to the telemetry page it will report the correct flight time.

How to configure the Mapping Widget

Alessandro Apostoli edited this page 3 hours ago · 3 revisions

Video “How to configure” by Built from Home.

Introduction to the Mapping Widget

The following procedure explains how to download the required “offline” map tiles used by the Yaapu Mapping feature.

For each flying site the pilot will have to download the mapping tiles required to “cover” the area that the widget will display.

Up to 3 zoom levels are supported (max is -2)

A typical setup would use zoom levels -2, -1, 0 .

To switch between levels a radio channel must be assigned to the zoom toggle function from the Yaapu configuration menu.

The basic steps are:

  • Download tiles for the area at the required zoom level
  • Process the tiles with mktiles.cmd
  • Copy the tiles to the radio SD card

There are no limits to the number of sites and/or tiles that the widget can handle. The only limit is the size of the SD card.

Note: The provided mktiles.cmd script is for windows users only.

Required software

You’ll need:

Detailed configuration steps

  • Run gmapcacther
  • Search your flying site location.

Assuming you’ll use zoom levels -2,-1 and 0, do all the searching at zoom level 1, this will not download tiles for higher zoom levels (0,-1,-2) that you’ll use for the widget.

If you’d like to use lower zoom levels simply do the searching at 1 level lower than the one you’ll use to fly.

  • Right click and select “batch download”
  • Define min zoom -2 and max zoom 0 and start downloading

Note The GMapCatcher User Wiki shows how to set a path and then download the area that would be included in a visual path. Shown below is an example 100km path. (thanks to Greg Covey for the example)

When you Shift+drag the map, then the area included in the visual download zone is queued for download, from the zoom level below the current view zoom level, to the visual download’s minimum zoom level as set

One main function of the tool is to allow you to download close-up maps along a path; it gives feedback of the number of tiles downloaded/requested while downloading

  • Go to the download folder " %UserProfile%/.GMapCatcher/sat_tiles/*" and copy zoom level folders 0,-1 and -2 to a temporary folder you’ll use to resize the downloaded tiles. Let’s assume your temp folder is %UserProfile%/temp.

Now the downloaded tiles need to be resized to 100x100, the provided mktiles.cmd script uses imagemagick to do the resizing, it also processes the images to lower size and complexity.

  • Copy mktiles.cmd to your temp folder %UserProfile%/temp
  • Edit mktiles.cmd and set the correct path for imagemagick here

set MAGICK="%ProgramFiles%\ImageMagick-7.0.8-Q16\magick.exe"

Change it to the path where imagemagick executable is installed

  • CD\ to %UserProfile%/temp folder
  • Execute the mktiles.cmd script, all tiles will be resized to 100x100

Warning: This step can require a substantial amount of time depending on the size of the selected area.

  • Copy the resized tiles from %UserProfile%/temp to your SD card /SCRIPTS/YAAPU/MAPS/sat_tiles

folder structure should be something like:

  • Power cycle the radio


Note: The widget requires a valid OpenTX GPS sensor!

The final steps are:

  • Define a screen toggle channel in the widget config menu, low is message history, mid is main screen, high is map view.
  • Or assign page 5 to a widget screen the same way as 2 is used for message history, see here for more info.

Please make sure you have a valid GPS sensor in OpenTX telemetry page, if not please do a sensor discovery.

Note While using the mapping feature you’ll notice that GPS coordinates sent by ArduPilot may show a “ghost” zigzag pattern on the map whereas the real correct path would be a line or a curve. This unwanted behavior is due to sampling of latitude and longitude at different time (up to 1sec) and is a limit of the current passthrough library, more info here


Wow! Thanks @rollys!

So just to confirm, PX4 supports out of the box, this telemetry. What I think you are saying is that there is a whole lot more telemetry it could additionally support - essentially everything in the “Native passthrough” column on ardupilot docs here. Is that correct?

If so, could you post this into the PX4 docs? Or confirm that it is OK for me to do so under the CC licenses used by PX4. If not, that’s OK too - I can link to this spot from the PX4 docs: http://docs.px4.io/master/en/peripherals/frsky_telemetry.html#additional-information

1 Like


Pretty much. Additional SPORT telemetry from FrSky devices like the MLVSS LiPo Voltage Sensor to display individual cell voltages (like in the video), etc. can optionally be displayed. I also believe the gas suite is doable.

I would think so but let me confirm with them and will advise.

EDIT: Just got confirmation that it’s okay to include it in the PX4 docs. Let me know if I could be of further assistance.

1 Like

Hi! Im still a newbie at both Ardupilot and PX4. I bought a cable ment for Ardupilot at aliepress and in ardupilot the Yaapu-script works perfectly. With PX4 i still get 25 sensor readings, but the screen doesnt update anything. Is that because i have to use a cable with teensy 3.2 like you have made?


Yes, you need the Teensy with Eric’s firmware for it to correctly translate PX4 data. It’s really easy to do. In fact, this the first time I’ve ever done it. Let me know if you get stuck on anything and would be more than happy to assist.

Good luck.

Ive been trying to get this to work for several days in px4, it wasnt until I found your post I realised it couldnt be done with the cable I bought. So thanks, and thanks for replying så fast!! :smile:

I see you use 3.3v from the switch on the FC. I could use 3.3 from the dedicated 3.3 also, or am i missing something?


As long as it’s 3.3v to power the Teensy. I was just following the original documentation I used and I was using an R/C channel activate the throttle and arm it.

Good luck.

very thank’s for your work!
I’m a demand.
Is possibile to connect at the sane Port TELEM1 a 3DR Radiolink and a Teensy 3.2 whit a y cable?
I only disponible TELEM1 Port. whit connected 3DR V3 radiolink module.
From 3 day i work whit a yaapu cable connected between my pixhawk 4 and my frsky x8r receiver.
From my Jumper T16 i see the sensors discovered from Telemetry menù but yaapu widget not show the infornations on screen… but sensors Is discovered…
Thank’s friends

You can try cross-connecting it but I don’t know how for sure whether it’ll work or not.

If you’re using a cable as described in the docs, it will not work. You have to make the Teensy as described above.

If you made the Teensy, go the menu and make sure you change “enable px4 flightmodes:” to yes

Good luck.

Very thank’s for your reply rollys :slight_smile:
My cable is in picture uploaded…
It’s not similar at the cable displayed in your link.

In photo uploaded i display valor of sensor discovered but widget Yaapu only display: RS, GPS, error messages from Pixhawk.
It would seem that the transmitter receives the data correctly but that in the Yaapu widget it is not possible to view them all .
Thank’s friend

Your cable will only work with LUAPilot or if you use ArduPilot firmware. If you want the Yaapu LUA to work with PX4 you have to configure and wire the Teensy as in the above instructions.

Good luck.

Ok friend, :slight_smile:


@rollys Nice work.
One question tho. Why you decided to use 3.3V supply for Teensy, when Teensy can handle 5V input power from Vin pin? And it would be much easier to get that power from Servo output for example.


I was just following the wiring the diagram that I learned from. The Teensy board that I used specified 3.3v in its documentation as well. I don’t see any reason why you can’t use 5v if your board is 5v tolerant.

Good luck.

Hi, For other who wants to implement it. I confirm that Teensy works with no problems when 5V is applied to Vin pin. I personally take power from S.Port power line.

Hi guys,

Hoping somebody could please shed some light on what I may be doing wrong. I have been following the above tutorial now for 2 days and cannot for the life of me get the telemetry working.

I am using a Pixhawk 4 and Frskt XR8 receiver
I have made a DIY cable and if I use the Adupilot firmware I get telemetry on my Frsky Taranis 2019.

Just to clarify a few things:

  1. The Teensy 3.2 that I have flashed, this replaces the DIY cable?
  2. Is there a way to confirm that I properly flashed the Teensy 3.2?
  3. After I flashed the Teensy I setup QGroundControl and the Yaapu script as per above.
  4. I am powering the Teensy from the receiver with 5V. Is this ok?
  5. If I invested in TBS Crossfire, would I not have any of these problems. Does the Yaapu script work with Crossfire?

Whenever I try and “Discover New Sensors” on the Tx I always only get the 3 standard ones.

I really would like to get the Pixhawk 4 running with PX4 firmware as I would like to take advantage of all it’s features.

Yes. Check the wiring going to the TELEM port. I think you’ve got it wired backwards. The GND wire should be on the right.

  • The Teensy Loader would’ve confirmed it right after the upload.
  • The LED light on the Teensy flashes during boot then stays solid when it’s getting proper signal.

Confirm from your Teensy’s docs to make sure it can handle 5v. I know @kpihus mentioned it can handle it but mine specifies 3.3v.

That means the Teensy is not passing the data from the Pixhawk.

Good luck.

@broadys you are powering teensy by feeding 5V to its 3.3V rail. If I’m not mistaken. So if this teensy is not already dead, then it most probably will be. For 5V power, there is a separate pin next to USB port.
Teensy 3.2 pinout

@rollys, thank you for a clear understanding. It is my first time using a Teensy.

I will change the voltage supply from 3.3v. Just researching where to get 3.3v from on either the Pixhawk 4 itself or the Pixhawk 4 Power Management Board.

I will double check the wiring to the teensy also. I did notice that once it was plugged into the quad it never had a solid LED light.

Hopefully the board isn’t fried. This is what I have on P4 pinouts.

Good luck.

Pixhawk 4 Pinouts.pdf (197.6 KB)