Tag Archives: companion 2.1

Open TX Companion 2.1.xx for X64 Fedora

opentx

Since they only release a 32 bit version of the RPM form Fedora, I had to build the x64 bit version from source. Here are the steps I used to build it. You should be able to follow these steps even if you have no build experience. You just need to cut an past these commands into a Fedora terminal.  This is a how to of for OpenTX Companion on Fedora, although it should work for OpenTX Companion on CentOS andOpenTX Companion on Redhat also.

First you need to get everything you will need to build Open TX Companion 2.1 .

As root run:
dnf install git gcc svn qt qt-devel cmake patch xsd gcc-c++ SDL-devel phonon phonon-devel avr-gcc-c++ PyQt4 fox-devel avr-libc xerces-c-devel
Run the following commands as a normal user:
  1. git clone https://github.com/opentx/opentx
  2. cd opentx
  3. git checkout master
  4. cd opentx/companion
  5. mkdir lbuild
  6. cd lbuild
  7. cmake ../src
  8. make clean
  9. make

Now become root and run:

make install

You should have Companion 2.1 installed and ready to go.

 

Enjoy

How to add and test a LUA script to Open TX Companion

LUA scripts can make the Taranis radio even more powerful. Here is a little how to with LUA scripts and testing of those scripts. The scripts used in the demo are listed below.

How to add a LUA script to Open TX Companion

OpenTX Companion Testing Telemetry Scripts 

This is the Temp LUA script.

tempscreenlua

temp.lua

— Temp Screen
— Version 0.5 Brad Kelley
— setup for Trex500
local escTemp = 0
local battTemp = 0
local function background()
escTemp = getValue(“Tmp1”)
battTemp = getValue(“Tmp2”)

end
local function run(event)
background()
print(event)

lcd.clear()

lcd.drawText(1,0,’Trex500 Temps’,INVERS)

lcd.drawText(1,15,’Batt Temp:’,0)
lcd.drawText(1,30,battTemp,DBLSIZE)

lcd.drawText(90,15,’ESC Temp:’,0)
lcd.drawText(90,30,escTemp,DBLSIZE)

end
return { background=background, run=run }

 

 

Here is the  Head speed Calc LUA script.

headspeed

head.lua

— Headspeed Calc
— Version 1.0 Brad Kelley
— setup for Trex500
local maingear = 162
local piniongear = 14
local rpm = 18000
local gearratio = 0
local headspeed = 0

local function init()
gearratio = math.floor((maingear / piniongear) * 100 ) / 100
rpm = getValue(“RPM”)
end
local function background()
rpm = getValue(“RPM”)

headspeed = math.floor((rpm / gearratio) * 100 ) / 100

end
local function run(event)
background()
print(event)

lcd.drawText(1,0,’Trex500 Headspeed’,INVERS)

lcd.drawText(1,15,’Main Gear:’,SMLSIZE)
lcd.drawText(60,15,maingear,SMLSIZE)

lcd.drawText(1,22,’Pinion Gear:’,SMLSIZE)
lcd.drawText(60,22,piniongear,SMLSIZE)

lcd.drawText(1,29,’Gear Ratio:’,SMLSIZE)
lcd.drawText(60,29,gearratio,SMLSIZE)

lcd.drawText(1,43,’RPM:’,SMLSIZE)
lcd.drawText(40,43,rpm,SMLSIZE)

lcd.drawText(90,15,’Head Speed:’,0)
lcd.drawText(90,30,headspeed,DBLSIZE)

end
return { init=init, background=background, run=run }