OK, so I just got a brand new second Taranis (Rev B with the improved sliders and 2AH battery), so I decided to load it up with V1.99 and try out the LUA feature...
First I downloaded the latest BIN firmware file (2014-04-25 version) and the CompanionTX Windows installer executables (opentx-taranis-20140425.bin,
companionInstall_v1.99.exe) from GitHub.
Installed CompanionTX on my Win XP box with no issues and was able to back up the as-delivered firmware and flash the new 1.99 version (2014-04-25). This all went very smoothly. Reconnected to the PC using the new boot loader feature (activated by holding in the two trim buttons while powering on).
I then selected, copied and pasted the delta mix LUA code from the wiki to a text file which I named: delta.lua. I created a new "SCRIPTS" folder in the root directory of the SD card and copied the new delta.lua file there. Here is the contents of the delta.lua file:
Code: Select all
local inputs = {
{ "Aileron", SOURCE },
{ "Elevator", SOURCE },
{ "Ail. ratio", VALUE, -100, 100, 0 },
{ "Ele. ratio", VALUE, -100, 100, 0 }
}
local outputs = { "Elv1", "Elv2" }
local function run(input1, input2, ratio1, ratio2)
value1 = (getValue(input1) * ratio1) / 100
value2 = (getValue(input2) * ratio2) / 100
elevon1 = value1 + value2
elevon2 = value1 - value2
return elevon1, elevon2
end
return { input=inputs, output=outputs, run=run }
On the default Model01 model, (and on a newly created model Model02 - makes no difference; both exhibit the same behavior), I selected the LUA scripts screen and was able to see, select, and activate the delta script. The delta setup screen looks just like the screenshot in the wiki, and I was able to select the 2 input sources to be the Ail and Ele sticks (or iAil and iEle inputs - both behave the same), and set the value1 and value2 weights to plus and minus 50.
In the Mixer screen I then set up channels 5 and 6 to be driven by the new 1Ele1 and 1Ele2 inputs (script outputs).
The problem is that the
channel 5 and 6 output is highly intermittent (mostly off) and jittery/unstable.
Mostly the outputs remain at zero but will occasionally and briefly display different values.
Here's the version I'm running (2014-04-25)
I left the INPUTS screen as-is:
I added the delta.lua script...
And set it up like this: (Note that Ail and iAil both behave similarly)
Then I added two new mixes to channels 5 and 6 to use the script outputs as their source:
Here's the details of one of the two mixes:
Should work, but the channel 5 and 6 outputs on the CHANNEL MONITO screen just flicker intermittently
Anyone else having problems (or success) with the LUA delta mix example?
THERE IS SOMETHING VERY FISHY GOING ON HERE!
Thanks,
Jeff Roberson
p.s. Can't wait to get this uber-cool feature working!