Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master yaapu7.lua file is only 33.7kb... #5

Closed
LTMNO opened this issue Jul 15, 2018 · 21 comments
Closed

Master yaapu7.lua file is only 33.7kb... #5

LTMNO opened this issue Jul 15, 2018 · 21 comments

Comments

@LTMNO
Copy link

LTMNO commented Jul 15, 2018

The following occurs when you first execute the new created yaapu7.lua file that is created via "On a command line simply run "lua pproc.lua yaapu0.lua yaapu9.lua"

The output file was generated, then placed in Scripts Folder and then executed in Companion. The following is the log...

Then the file was copied to the the SD Card and loaded... Neither attempt to use only the yaapu7.lua or .luac file worked.

luaInit
luaClose 0x7fda88538fe0
luaLoadScriptFileToState(/SCRIPTS/TELEMETRY/yaapu7.lua, T): loading /SCRIPTS/TELEMETRY/yaapu7.lua
luaDumpState(/SCRIPTS/TELEMETRY/yaapu7.luac): Saved bytecode to file.
Script run function returned unexpected value
luaInit
luaClose 0x7fda8aa62d10
luaLoadScriptFileToState(/SCRIPTS/TELEMETRY/yaapu7.lua, T): loading /SCRIPTS/TELEMETRY/yaapu7.lua

@yaapu
Copy link
Owner

yaapu commented Jul 15, 2018

Hi what are you trying to achieve and how did you run the script?
It's a telemetry script and cannot be run by browsing the sd card and executing it.

33.7Kb is the right size

@LTMNO
Copy link
Author

LTMNO commented Jul 16, 2018

Hello Alessandro, I tried to execute the .lua and .luac scripts on my Taranis QX7+ when the files were loaded on the SD Card.
That was unsuccessful, then I created the .luac file via Companion as instructed in the readme.txt,
That didn't work either...
I then manually created my own version of the file using the command line... that worked and then loaded it on the SD Card after compiling in Companion.... no luck there either...

I either get errors in the script or memory error.

I did find an older version "https://github.com/yaapu/FrskyTelemetryScript" here and that was able to load on my radio. its version 1.1 but from what i read, there is v1.6 available.

Hope that explains everything...

I am not sure if something was wrong in the Lua Script.. i was going to do some file compariosn on the 1.1 version to the 1.6 version and see what has changed.

Great work btw, thanks for the contribution...

@yaapu
Copy link
Owner

yaapu commented Jul 16, 2018

Hi,
there's nothing special to do to run the script on a QX7.
Just copy the /TARANIS/SD/ folder content to your radio SD card, make sure you have

/SCRIPTS/TELEMETRY/yaapu/copter.lua
/SCRIPTS/TELEMETRY/yaapu/rover.lua
/SCRIPTS/TELEMETRY/yaapu/plane.lua
/SCRIPTS/TELEMETRY/yaapu/copter.luac
/SCRIPTS/TELEMETRY/yaapu/rover.luac
/SCRIPTS/TELEMETRY/yaapu/plane.luac
/SCRIPTS/TELEMETRY/yaapu7.lua
/SCRIPTS/TELEMETRY/yaapu7.luac
/MODELS/yaapu
/SOUNDS/yaapu0/*

Then please run it as a telemetry script by setting it up in the model telemetry page (page 13 or 14), use screen1, select type script, choose yaapu7, exit and then from main model page long press [page] to start it!

that's all required to run it

@LTMNO
Copy link
Author

LTMNO commented Jul 16, 2018

Hello Alessandro, thanks for the reply....
I went ahead and formated the SD Card... I uploaded the information above... again.... this time removed the LUAC from the OpenTx Firmware options so just LUA enabled.
And it worked... I can see and hear that the script loads... also, yesterday was running rc4, today running rc5 on opentx.

Unfortunately, I get the "No Telemetry" Banner in front of the Telem1 screen.

I have read in forums that the RxBt or RSSI is used to disable that. I have captured my Telemetry screen... I have all the data showing in Telemetry Config Screens - all data is streaming.
One Caveat is that my Tmp1 and Tmp2 are Id 0002 and 0005 respectively instead of 0400 and 0410. Also my Fuel Id is 0004 instead of 0600
and Finally, no VSpd is getting picked up from the Sensors... but that could be because it is not moving?

Will that break the system?

p.s. if you have a paypal account... i am happy to contribute to your efforts... great work on this! I see that some have been giving you a hard time (ie FD)

@yaapu
Copy link
Owner

yaapu commented Jul 17, 2018

You have the serial protocol set to 4 in mission planner, you have to set it to 10 delete all sensors and run discovery again. You need OpenTX 2.2 and a recent ardupulot

@yaapu
Copy link
Owner

yaapu commented Jul 17, 2018

Did you manage to make it work?

I do have an account for donations, and they are very much appreciated, I use them to buy new equipment here's the link https://www.paypal.me/yaapu

@LTMNO
Copy link
Author

LTMNO commented Jul 17, 2018 via email

@yaapu
Copy link
Owner

yaapu commented Jul 17, 2018

Copter 3.2.1 is not supported, it does not have native passthru, but with a mavlink to passthru converter should work just fine, this is the link

https://github.com/zs6buj/MavlinkToPassthru

you'll also need a teensy to run it though

@LTMNO
Copy link
Author

LTMNO commented Jul 17, 2018

screen shot 2018-07-16 at 6 39 00 pm
Yes, thanks... currently I am using an Arduino with Converter Software written by MikeB. https://github.com/MikeBland/APM_Mavlink_to_FrSky
Its exposed 90+% of the data minus the anomalies I mentioned above.
I will try the other solution now... i have a teensy board as well.

@LTMNO
Copy link
Author

LTMNO commented Jul 17, 2018

Thanks... Teensy passthru working well... but the ArduinoProMini solution with MikeB was working... just some of the Id's that were off... could I not just adjust the Id's for your script to work?

Regardless, I am up and running.... ;-) The UI looks amazing! Donation on the way...

@yaapu
Copy link
Owner

yaapu commented Jul 17, 2018

MikeB uses a different protocol that has become obsolete with opentx 2.2

@LTMNO
Copy link
Author

LTMNO commented Jul 17, 2018 via email

@LTMNO
Copy link
Author

LTMNO commented Jul 18, 2018

We seem to be in business... after getting the passthru on the teensy to work, I did experience an intermittent problem where nothing showed up on the screen. I just left it for a bit a few minutes and then it picked up... was strange but working now. You can see the RSSI and RxBt pulse on the Telem Screen but the others are a solid *...
The Passthru works in tandem with the Telemetry Rx/Tx so that is cool as you can use Tablet as well but the information in repetitive so your solution solves that need. ;-)

Only 13 sensor properties come thru.. not sure if that is the right number?

screen shot 2018-07-17 at 9 03 53 pm
img_1429
img_1432
img_1431
img_1430

@yaapu
Copy link
Owner

yaapu commented Jul 18, 2018

sensors are not needed, discovery is optional, only gps needs to be discovered. By looking at your screenshot I see you need to select the voltage source in menu, choose fc.

Thanks for your donation 😊

@LTMNO
Copy link
Author

LTMNO commented Jul 18, 2018

Thanks and yes the Voltage in that screenshot wasn't set right... its on FC. I am going to test flight today.. Cheers!

@LTMNO LTMNO closed this as completed Jul 18, 2018
@LTMNO
Copy link
Author

LTMNO commented Jul 18, 2018

Hello Alex, troubles in paradise unfortunately.... The script executes on my QX7S and runs, I get Batt, Arming/Disarm, GPS Lock, working... audibles too... but nothing else.
I know I am receiving data as the No Telemetry Prompt is not there... I just did 2 flights this afternoon, and I was getting msg prompts from the APM in you notification screen.. like AutoTune started and Successful and all... so that was cool.

But nothing else is coming in? Very Strange.
I am attaching the XLS Log... just remove the .xlsx from it to load.

DART450-2018-07-18.csv.xlsx

I don't believe it is on the Lua Script side as I have created another Telem Screen.. and the data doesn't come there either...

@LTMNO LTMNO reopened this Jul 18, 2018
@yaapu
Copy link
Owner

yaapu commented Jul 22, 2018

I agree with you that it is more related to apm 3.2.1 + eric's code.
All the testing that Eric has done with the help of many of us has been done on very recent ardupilot versions, your setup is something new for his project but should nevertheless work, mavlink is mavlink

@yaapu
Copy link
Owner

yaapu commented Aug 3, 2018

Hi Pino,
I close it for you closed the linked issue zs6buj/mav2pt#5

@yaapu yaapu closed this as completed Aug 3, 2018
@LTMNO
Copy link
Author

LTMNO commented Aug 3, 2018

Thank you, I have not determined if the Mah Used or % used works yet... I am going to take a flight within the next 1hr or so.
I will report back.

Thanks Alex.

@LTMNO
Copy link
Author

LTMNO commented Aug 4, 2018

Hey Alex, I did my flight finally today... all seems good... however, I am not getting CURR and FUEL to change. Seems like Fuel is always 99% and CURR never increases past 0.1
Now I understand the obvious question is are you getting it from the FC.
I am using APM 2.5 Power Module... there is no reason it wouldn't be sending that over.
I am using the Cels Sensor via the FrSky Voltage Sensor but that doesn't detect Current...
I guess I have to measure current off the Power Module to see if its working... its buried underneath the frame... going to be tricky... never had one not work.

anyway, just and update.

@yaapu
Copy link
Owner

yaapu commented Aug 4, 2018

I get them from the teensy that in turn gets them from mavlink, do you see correct values in MP?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants