Servers by jDrones

An Open Source Frsky Telemetry Script for the Horus X10,X12 and Taranis X9D,X9E and QX7 radios

ardupilot
frsky
lua

(Alex Apostoli) #514

Hi Randy,
support for this particular use case was requested a while ago by @pauljatherton so credit goes to him :slight_smile:

cheers,

Alex.


(Alex Apostoli) #515

@Cattlebaron I just verified on my setup and the sensors I expose to OpenTX are actually logged to the csv file that OpenTX produces as “SD Logs”
All you need is to discover them first

cheers,

Alex


(Alex Apostoli) #516

Hi all,
new Taranis X9D public beta: version 1.8.0 beta2

Note 1: OpenTX 2.2.3 is recommended for it frees some extra memory for lua scripts
Note 2: if you install the script in a new model and upon start you get an error, please redownload it for I fixed a small bug with missing configuration files

https://drive.google.com/open?id=1fqLpIONOMw45TwxauQpemXdXLrGqyYJl

image

new features:

  1. layout changes:
    hud left now is speed, hud right is altitude, middle bottom is vspeed
    total flown distance is shown below home distance
    vario on the right

  2. extra screen reachable by pressing [PLUS] twice
    image
    Here up to 6 sensors can be defined by editing the per model lua configuration (example included in the /MODELS/yaapu folder)
    @ChrisOlson this was designed with gas suite users in mind, could you test it with one of your setups?
    It’s possible to define multipliers, labels, warning and critical levels in the conf file.
    There’s also the option to define lookup tables, when a sensor value is found in the lookup table the script shows that value instead of the sensor one, in the example the script shows STOP but sensor value is 0. (it has been tested to display kero jet turbine sensor data)

  3. support for @Eric_Stockenstrom “Plus” firmware, the plus version sends extra info for waypoints,airspeed and throttle, the custom left panel can be enabled by selecting “m2f” in the script conf menu
    image

  4. voice playback of selected mavlink messages

  5. script reset is now possible without power cycling the radio by pressing long [ENT] + flight reset, motors should not be armed and the flight timer should not be 00:00

  6. fix to skip flight mode vocal announcement for very quick flight mode changes, like flipping a switch from pos 1 to pos 3

  7. messages can now be logged to a file on the SD card, this must be enabled from the conf menu

  8. haptic feedback, has to be enabled from the menu

  9. more options to silence the incoming message beep

as always feedback is very welcome,

cheers,

Alex


(Stamatis ) #517

Great job Alex!!! Gongrats!!!


(Colin) #518

and you must tick them in the telemetry screen in companion as well or they will not Log


(Alex Apostoli) #519

indeed I missed that part, thanks Colin for pointing it out!


(Colin) #520

your welcome buddy you have a enough on your plate just helping out


(Chris Olson) #521

Alex, this is cool! Yes, I will test it. Where it says krpm, can that come from the internal ArduPilot rpm library as well as a FrySky sensor? I don’t remember if that is one of the passthru sensors or not.


(Alex Apostoli) #522

Hi Chris,
at the time only from frsky sensors.
Getting rpm from the ardupilot stack would require a library change on the ardupilot side!

If you could test all this it would be great!
I’ve been looking for flexible solution for quite some time now :slight_smile:

Sensor numbering is
1 - 2
3 - 4
5 - 6
Sensors 1 and 2 have fixed font (small)

The configuration file is quite easy to deal with, for instance the krpm config section is

  -- Sensor 3
[3] = {
    "ENG",    -- label is ignored on taranis
    "RPM",    -- OpenTX sensor name
    1,        -- precision: number of decimals 0,1,2
    "krpm",   -- label for unit of measure, on taranis is appended to the value
    0.001,    -- multiplier if < 1 than divides
    "+",      -- "+" track max values, "-" track min values with
    2,        -- font size 1=small, 2=big
    110000,     -- warning level
    120000,     -- critical value
  },

You can use the same sensor twice, one for engine rpm and one for head rpm by using different multipliers.

Alex


(Chris Olson) #523

Cool. This is what I do in my own custom script. So this should work great! I’ll report back.


(Cornel Fudulu) #524

Great job.

If I have a MLVSS, can I output on the 2nd screen each cell voltage !? Got some older packs that need asessment now-and-then…

Cheers,
Para.


(Alex Apostoli) #525

This actually is a very good idea, I’ll try it myself!
All you have to do is manually define the cell sensors


(Alex Apostoli) #526

Hi @ThePara,
I tried with a 4s battery, your idea works great :slight_smile:

image

or using a bigger font for the “font size” attribute

image

this is the config file

----------------------------------------
-- custom sensors configuration file
----------------------------------------
local sensors = {
  -- Sensor 1
[1]=  {
    "Celm",   -- label
    "Celm",     -- OpenTX sensor name
    2,          -- precision: number of decimals 0,1,2
    "Vmin",         -- label for unit of measure
    1,          -- multiplier if < 1 than divides
    "-",        -- "+" track max values, "-" track min values with
    1,          -- font size 1=small, 2=big
    3.65,        -- warning level (nil is do not use feature)
    3.30,        -- critical level (nil is do not use feature)
  },

  -- Sensor 2
[2]=  {
    "Celd",   -- label
    "Celd",     -- OpenTX sensor name
    2,          -- precision: number of decimals 0,1,2
    "Vdelta",         -- label for unit of measure
    1,          -- multiplier if < 1 than divides
    "+",        -- "+" track max values, "-" track min values with
    1,          -- font size 1=small, 2=big
    0.2,        -- warning level (nil is do not use feature)
    0.4,        -- critical level (nil is do not use feature)
  },

  -- Sensor 3
[3]=  {
    "Cel1",   -- label
    "Cel1",     -- OpenTX sensor name
    2,          -- precision: number of decimals 0,1,2
    "V1",         -- label for unit of measure
    1,          -- multiplier if < 1 than divides
    "-",        -- "+" track max values, "-" track min values with
    1,          -- font size 1=small, 2=big
    3.65,        -- warning level (nil is do not use feature)
    3.30,        -- critical level (nil is do not use feature)
  },

  -- Sensor 4
[4]=  {
    "Cel2",   -- label
    "Cel2",     -- OpenTX sensor name
    2,          -- precision: number of decimals 0,1,2
    "V2",         -- label for unit of measure
    1,          -- multiplier if < 1 than divides
    "-",        -- "+" track max values, "-" track min values with
    1,          -- font size 1=small, 2=big
    3.65,        -- warning level (nil is do not use feature)
    3.30,        -- critical level (nil is do not use feature)
  },

  -- Sensor 5
[5]=  {
    "Cel3",   -- label
    "Cel3",     -- OpenTX sensor name
    2,          -- precision: number of decimals 0,1,2
    "V3",         -- label for unit of measure
    1,          -- multiplier if < 1 than divides
    "-",        -- "+" track max values, "-" track min values with
    1,          -- font size 1=small, 2=big
    3.65,        -- warning level (nil is do not use feature)
    3.30,        -- critical level (nil is do not use feature)
  },

  -- Sensor 6
[6]=  {
    "Cel4",   -- label
    "Cel4",     -- OpenTX sensor name
    2,          -- precision: number of decimals 0,1,2
    "V4",         -- label for unit of measure
    1,          -- multiplier if < 1 than divides
    "-",        -- "+" track max values, "-" track min values with
    1,          -- font size 1=small, 2=big
    3.65,        -- warning level (nil is do not use feature)
    3.30,        -- critical level (nil is do not use feature)
  },
}
------------------------------------------------------
-- the script can optionally look up values here
-- for each sensor and display the corresponding text instead
-- as an example to associate a lookup table to sensor 3 declare it like
--
--local lookups = {
-- [3] = {
--     [-10] = "ERR",
--     [0] = "OK",
--     [10] = "CRIT",
--   }
-- }
-- this would display the sensor value except when the value corresponds to one
-- of entered above
-- 
local lookups = {
}

collectgarbage()

return {
  sensors=sensors,lookups=lookups
}

I had to create these sensors after discovering the Cels one


(Cornel Fudulu) #527

Got the sensors showing values, modified the script for 6S and saved as 6S_batt.lua
Do I load it as 2nd telemetry screen ? And where do I need to modify script to show CURR instead of HDOP in top left corner, to be able to asess voltage sag per cell at a single glance ?

Cheers,
Para.


(Alex Apostoli) #528

No, go the script menu screen, exit and look at the .cfg file the script creates in the /model folder
The sensor file needs to be placed in the same folder and named like the cfg file but with _sensors.lua

If your cfg file is modelname.cfg your sensor file should be modelname_sensors.lua


(Alex Apostoli) #529

You can’t unless you change source code and recompile, btw current is 3rd line on the right 142Amps in the screenshots


(Chris Olson) #530

@yaapu Well, Alex it looks like everything works. I have to figure out my FrSky sensors yet. But with the engine idling I get rpm reading. My engine temp and OAT sensors work (have been changed to F instead of C, but have to change the label yet).

Everything on the ArduPilot side appears to work fine, including the Dreaded Bad Logging :sunglasses:

100_0080

You will notice I have the improved fonts in my radio, which makes the display look a lot nicer.


(Chris Olson) #531

BTW, is there a way to display four digits on the krpm? I’m gonna put a multiplier in there for headspeed instead of engine rpm and want it to display all four digits. I’m guessing there’s a multiplier in the script someplace (I haven’t looked at the code yet).

I don’t know what the 0.00V is on the top left yet.

I have a generator on this helicopter so it draws zero amps from the battery when the engine is running. So the amp-hours don’t mean much. What are the three values on the HUD? The left must the VSI, the right must be altitude AGL, which I changed to feet in the sensors. Is the bottom one Ground Speed? I usually select kts for that. And I’d like feet/min on the VSI, but all these things use m/s or (ArduPilot’s kinda dumb system) kts if you select to use kts in the GCS :unamused:

It got close to dark here so couldn’t actually fly this yet to try it out in the air.


(Nathan E) #532

I see you have everything working for 4s, does 6s work alright too? What about multiple instances of the M/FVLSS sensor for 12s?

Just throwing out ideas. I often have dual 6s batteries on-board my aircraft.


(Chris Olson) #533

After getting everything configured it works fine on a ground test. I set the speed to knots and VSI to ft/min, etc. in the config menu. And manually edited the models config for the display I wanted, including even the governor status.

Pretty impressive, actually.

100_0081