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

Compiled OTX-ETX_BW-LCD (bw128x64) won't run in TX12 #208

Open
Rodrigo-NH opened this issue Jul 15, 2023 · 5 comments
Open

Compiled OTX-ETX_BW-LCD (bw128x64) won't run in TX12 #208

Rodrigo-NH opened this issue Jul 15, 2023 · 5 comments

Comments

@Rodrigo-NH
Copy link

Rodrigo-NH commented Jul 15, 2023

Trying https://github.com/yaapu/FrskyTelemetryScript/releases/tag/OTX-ETX_BW-LCD_ver_2.0.0_beta1 and doesn't work on my Radiomaster TX12. It opens the screens (to get to setup screen is tricky though, I can access it eventualy), but never gets telemetry data (or get some initial frames getting past the "no telemetry" blinking pane, but still showing no telemetry status after all)

Trying to bug hunt but can't have the scripts compiled right. It compiles on EdgeTX simulator but then when trying to run the .luac in the radio I get:

"Syntax error
yaapu7.luac
imcompatible precompiled chunk"

Trying to have the .luac compiled directly in the radio I get:

"Script panic
not enough memory"

I'm able to compile if I start replicating the code (using only code parts in support to the function using crossfireTelemetryPop() 'crossfirePop')
What I see in the radio in my replicated code is execution never get past the

message buffer loop part
It can be a bug (or just something missing in my replication). I'm confused about how msgBuffer is either a local and a global variable and which one are being evaluated in the functions (im just starting with LUA)

I was able to work around this in my replicated code and have all the messages displayed in a screen, but of course it doesn't mean much if I cannot try the original code.

I think it's worth mentioning:
My TX12 radio got a alternative uC (64k type instead of the usual 128k) because of the chip shortage. It's also some clone uC (CKS CKS32F103C8T6). But I guess the 128k version uses a clone too.
Reference: https://radiomasterrc.freshdesk.com/support/solutions/articles/64000267203

This is not a problem for MULTI-module as they offer pre compiled firmware for the 64k version.

@yaapu
Copy link
Owner

yaapu commented Jul 24, 2023

damn, 64k will never be enough sorry, it really is impossible, I'm very tight on 128K.

@Rodrigo-NH
Copy link
Author

Rodrigo-NH commented Jul 25, 2023

I think I made a mistake by adding that extra info (unnecessary noise and not well explained also) as the 64k chip is the multi-module one, not the radio one. So probably not related to this issue.

The strange part is it compiles in EdgeTX the PC emulator but gives me the "imcompatible precompiled chunk" when trying to run in the radio.

I need try investigating this more (maybe a issue with EdgeTX not yaapu)

@Rodrigo-NH Rodrigo-NH changed the title Can't compile OTX-ETX_BW-LCD (bw128x64) Compiled OTX-ETX_BW-LCD (bw128x64) won't run in the radio Jul 25, 2023
@yaapu
Copy link
Owner

yaapu commented Jul 25, 2023

I think I've read something about 32 vs 64 numbers in the lua runtime/compiler on edgetx, can't remember where though

@Rodrigo-NH
Copy link
Author

Rodrigo-NH commented Aug 9, 2023

Here probably -> https://discuss.ardupilot.org/t/an-open-source-frsky-telemetry-script-for-the-horus-x10-x12-and-taranis-x9d-x9e-and-qx7-radios/26443/1604
So this is probably EdgeTX/edgetx#1611

Summing it up: - Lua compiled in emulator can't run in the radio - Radio is too small (memory etc) to compile it by itself

@Rodrigo-NH Rodrigo-NH changed the title Compiled OTX-ETX_BW-LCD (bw128x64) won't run in the radio Compiled OTX-ETX_BW-LCD (bw128x64) won't run in TX12 Aug 9, 2023
@Rodrigo-NH
Copy link
Author

Hi,
I was working for a version for me so I can have telemetry while this blocker exist. Also my impression is the telemetry screens are too heavy for small cpu/ram radios like TX12.

Initially I wondered about forking this project to continue with something different, other direction, but I think it makes sense if ask you first: Do you think it may be a good idea adding another option to this project? Like 'bw128x64-small' or 'bw128x64-alternative' or anything for a name.
I can try adapting from the original 'bw128x64' and make a pull request later if so.

I started adding basic views, a screen including attitude indicator, Vspeed indicator, home arrow and some readings. And another screen that shows ardupilot messages. It's working in progress as I want to add other indicators like compass and work in the screens layout/functionality.
Thanks Yaapu

view

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