Search found 22 matches

by nicodh
Wed Dec 03, 2014 7:36 am
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

Hello Bertrand, after some time without touching my script (that works. :-D ) I want to do some changes. I want to be able to change a global variable value or a logical switch. The logical switch need to change depending on what i receive from telemetry and will start and stop the Timer. For now i'...
by nicodh
Tue Sep 30, 2014 7:30 am
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

And i resolve it. It's a bit of a hack but seems to work. it will return a 8 bits string from a number. :-) Now i can continue. function tobits(num) local retString="" local i = 8 while i >= 0 do if math.floor(num /(2^i)) >= 1 then retString = retString .."1" num = num-math.pow(2...
by nicodh
Mon Sep 29, 2014 4:20 pm
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

I will answer myself.... the string module is not loaded in the opentx, so i cant do the string.char()...
by nicodh
Mon Sep 29, 2014 3:43 pm
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

I'm having an issue with a telemetry script (the same as allways). I need to use a function to convert an integer into a binary string. I'm trying to use the for do sentence, but it seems not to be working... Is it available? this is the function: function NumberToStringBytes(num,optionalNumberOfByt...
by nicodh
Mon Aug 11, 2014 7:54 am
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

thanks for that info!
that is perfect.
by nicodh
Tue Aug 05, 2014 9:39 am
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

Hello Bertrand, I have a new awesome stupid question concerning lua scripts. If i use a lua custom script, can i use the values from him in a telemetry script? I'm thinking on using the variables created from Fig newton gheading script into my telemetry script, so i can use the home heading. another...
by nicodh
Wed Jul 23, 2014 9:39 am
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

Ok thanks!
by nicodh
Wed Jul 23, 2014 6:32 am
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

So it's just a define line to add the string functions?

Just adding:

#include <lstrlib.c>

should work?
by nicodh
Wed Jul 23, 2014 6:17 am
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

bertrand35 wrote:This lib costs 4k RAM, is it really needed?

For me is, (and some 2 or 3 people trying to use the mikrokopter->frsky decoder).
by nicodh
Wed Jul 23, 2014 6:15 am
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

Damn Bertrand, that would be awesome to be added in next versions. :-D

I'm trying to put some strings on a precise place of the screen and i hate to do it manually. :-( .

I also want to send a couple of data that i will decode on the script but also need the string functions. :-(
by nicodh
Wed Jul 23, 2014 5:40 am
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

I'm running into a problem with lua.

Is the string.len() working? i need to know the length of a string to place it in the screen but string.len is making the script go blank (so there is an error). Are the string functions implemented?
by nicodh
Mon Jul 14, 2014 4:52 am
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

Hi dinamich, i tried yesterday your field ids and they works!

Thanks a lot that makes everything easier.
by nicodh
Sun Jul 13, 2014 7:34 am
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

Hello Bertrand, i was looking at the code, trying to find why my md and latest script still does not work. Maybe i should fill luaGetValueAndPush with the proper lua_pushnumber(L, getValue(src)/10.0); (this is an example) for each case? And also put the right precision type on luaFields? I know wher...
by nicodh
Sat Jul 12, 2014 6:05 am
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

These are my changes in lua.cpp: static void luaGetValueAndPush(int src) { /* Hint about dividers are taken from putsTelemetryChannel() */ if (!TELEMETRY_STREAMING() && src>=MIXSRC_FIRST_TELEM && src<=MIXSRC_LAST_TELEM) { //telemetry not working, return zero for telemetry sources lua...
by nicodh
Fri Jul 11, 2014 6:13 pm
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

yes i know, that is how i tested my first lua script. But since i modded the firmware (still does'nt work with my additions) i need to build companion too right? Or just simu is enough? I tried simu as in the wiki but it does not seems complete.
by nicodh
Fri Jul 11, 2014 3:00 pm
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

ok, it builds, and runs. lua works. at least with old script. I need to look if the scripts does something more with the new params i added. it's a pity i cant build the simulator to test on computer right away. :(
by nicodh
Fri Jul 11, 2014 2:58 pm
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

it's building now... the code i put has some errors.
i'm seeing that now that lua code builds. :)
by nicodh
Fri Jul 11, 2014 2:38 pm
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

oh bertrand, i thik yes.
My make was just make PCB=TARANIS.

so i should put make PCB=TARANIS LUA= YES?
by nicodh
Fri Jul 11, 2014 1:40 pm
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

Hello Bertrand, I just add some lines to the lua.cpp to see if i can add more stuff on the telemetry screen. I think i found some bug on it (or unfinished stuff). My version builds. but i need to test it. If i build simu i can test it on pc right? edit: simu does not work.... i tried and i get a scr...
by nicodh
Thu Jul 10, 2014 6:47 am
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

Bertrand, is possible to have all of them? I mean all the frsky telemetry data can send... Why? Because i need to be able to use for other things, like showing the error codes mikrokopter can send (i will convert the value to string so it will appear on the bottom like the graupner does). :-D So if ...
by nicodh
Wed Jul 09, 2014 2:22 pm
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

Hi Bertrand, thanks! I managed (with some help on rcgroups) to make the display working. I can now, make my screen division and add some stuff there. Timer is working, and altitude too. https://dl.dropboxusercontent.com/u/6754639/screenshot-4.png My idea is getting all those data from the mk (using ...
by nicodh
Tue Jul 08, 2014 5:58 pm
Forum: openTx
Topic: Lua Telemetry scripts
Replies: 54
Views: 38582

Re: Lua Telemetry scripts

Hello,
I'm trying to create a telemetry script, but i only get a blank screen. For now i was trying to make some lines.
I see your telemetry example does not work with 2.05 firmware right? I tried and got blank screen too.
When do you think it will be able to start working with them?

Thanks!

Go to advanced search