Frsky D4R-II 8 channels receiver with telemetry part 2: Lua
I wish to make a lua script for my Jumper T18, with D port data from pixhawk.(pixhawk 1M with D4R reciever).
There are old lua script for D port data on taranis radio, I also found a flysky lua script on T16. May be with conbination of these 2 I can get a lua script of Dport on T18
Documentation of openTX inav script is quite complicated, I found the one for tanaris, which only support D receiver and S receiver, is more easier to study:
https://github.com/iNavFlight/LuaPilot_Taranis_Telemetry
from here :
https://github.com/iNavFlight/LuaPilot_Taranis_Telemetry/blob/master/SCRIPTS/TELEMETRY/LuaPil.lua
you can see the data collected, others are based on calculation:
Tmp1 is for flight mode, Tmp2 is for GPS fix info, seems to be the same as S.port.
--data.battsumid = getTelemetryId("VFAS") | |
data.vfasid = getTelemetryId("VFAS") | |
data.celsid = getTelemetryId("Cels") | |
data.altid = getTelemetryId("Alt") | |
--data.gpsaltid = getTelemetryId("GAlt") | |
data.spdid = getTelemetryId("GSpd") | |
data.gpsid = getTelemetryId("GPS") | |
data.currentid = getTelemetryId("Curr") | |
data.flightmodeId = getTelemetryId("Tmp1") | |
data.rssiId = getTelemetryId("RSSI") | |
data.gpssatsid = getTelemetryId("Tmp2") | |
data.headingid = getTelemetryId("Hdg") | |
data.fuelid = getTelemetryId("Fuel") | |
--init Telemetry Variables | |
data.battsum = 0 | |
data.cellnum = 0 | |
data.alt = 0 | |
data.spd = 0 | |
data.current = 0 | |
data.flightmodeNr=0 | |
data.rssi = 0 | |
data.gpssatcount =0 | |
data.heading = 0 |
留言
張貼留言