Script Language

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
spinorkit
Posts: 22
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: Script Language

Post by spinorkit » Fri Nov 13, 2020 9:27 am

There seems to be a limit of 52 chars on strings used this way?


User avatar
MikeB
9x Developer
Posts: 17274
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Script Language

Post by MikeB » Fri Nov 13, 2020 12:51 pm

The limit was supposed to be 254 characters, but I've just seen a bug that limits strings to about 40.
I have a change that increases the limit to 96, and also properly reports an error of "String too long". This change has to go in to both interpreter.exe and the radio firmware. I'll post an updated interpreter.exe in a few minutes(done), and updated radio firmware a bit later today.

The source code is in the file "parser.cpp" on Github here: https://github.com/MikeBland/mbtx/tree/ ... rsky9x/src.
The same source file is used for both the radio and interpreter.exe.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

spinorkit
Posts: 22
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: Script Language

Post by spinorkit » Sat Nov 14, 2020 1:02 am

Thanks Mike.
I tried the new interpreter and that worked fine with the long strings I need.
Unfortunately, when I flash my old 9xr pro (MOD: REVB-X) with the ersky9xr_rom223A6.bin the radio appears to reboot continuously, replaying the voice announcement continually. I also tried the ersky9xs version of that firmware, with the same result.
So I have reverted to the R222 version from 06.03.2020 I have been using. For now I can work around the string problem by splitting them in two.
Kit

User avatar
MikeB
9x Developer
Posts: 17274
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Script Language

Post by MikeB » Sat Nov 14, 2020 9:55 am

I've just checked my 9XR-PRO with 223A6 and it works correctly, odd if you are getting a continuous reboot. As this may be caused by a radio or model setting, please read your EEPROM from the radio, put it in a .zip file and send it to me in a PM. I'll try it on my 'PRO.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

LiM3
Posts: 6
Joined: Thu Mar 22, 2018 8:13 pm
Country: -

Re: Script Language

Post by LiM3 » Sat Nov 14, 2020 10:17 am

I can also confirm that 223A6 works correctly on my 9XR-PRO.


spinorkit
Posts: 22
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: Script Language

Post by spinorkit » Sat Nov 14, 2020 9:25 pm

LiM3 wrote:
Sat Nov 14, 2020 10:17 am
I can also confirm that 223A6 works correctly on my 9XR-PRO.
Thanks Lim3. BTW I am (slowly) starting to make progress on the basic script to control ELRS using the 9xr pro. I have it receiving the ELRS parameters and it is now displaying the air rate. Next I need to display the rest of the parameters and allow them to be set.

User avatar
MikeB
9x Developer
Posts: 17274
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Script Language

Post by MikeB » Sat Nov 14, 2020 9:26 pm

I've put your EEPROM onto my 'PRO and it runs OK.
Could you try 223A2 through to 223A5 and see if any of these reboot?

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

spinorkit
Posts: 22
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: Script Language

Post by spinorkit » Sat Nov 14, 2020 9:46 pm

MikeB wrote:
Sat Nov 14, 2020 9:26 pm
I've put your EEPROM onto my 'PRO and it runs OK.
Could you try 223A2 through to 223A5 and see if any of these reboot?

Mike
Thanks Mike, will do (I have to go out and do the grocery shopping now though).
Do you think it could be something on the SD card?

spinorkit
Posts: 22
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: Script Language

Post by spinorkit » Sat Nov 14, 2020 11:58 pm

I tried ersky9xs_rom223A2 and it has the reboot problem. I took out the r9m module (with all my wires connected to it) and the problem still occurs.

spinorkit
Posts: 22
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: Script Language

Post by spinorkit » Sun Nov 15, 2020 12:12 am

Mike. so sorry to waste your time. The ersky9xr_rom223A6 is now working. I thought I had flashed the r version of that but maybe it was the s version both times.
Would you expect the s version to have that reboot behaviour on the 'PRO?
BTW, how do I tell if my 9xr pro has the small rom? Try and read the SAM chip's name variant? Do all 9xr pros have the more than 256k of flash?

spinorkit
Posts: 22
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: Script Language

Post by spinorkit » Sun Nov 15, 2020 10:14 am

I have put a first cut of a basic script to set the parameters for ELRS (for the R9M on a 9xr pro) here:
https://github.com/spinorkit/ExpressLRS ... x/ELRS.bas

User avatar
MikeB
9x Developer
Posts: 17274
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Script Language

Post by MikeB » Sun Nov 15, 2020 12:10 pm

I thought the 's' version did run (sort of) on the 'PRO, but haven't checked recently. All 'PROs have 512k of flash. You may check the chip ID, it is displayed on the "BOOT REASON" statistics menu.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

spinorkit
Posts: 22
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: Script Language

Post by spinorkit » Thu Nov 19, 2020 8:04 am

I have added a new ELRS2.bas script that seems to work ok with the master-dev version of ELRS, i.e. the "new lua" version, here: https://github.com/spinorkit/ExpressLRS ... /ELRS2.bas


Post Reply

Return to “erskyTx (was ersky9x)”