Page 12 of 12

Re: Script Language

Posted: Fri Nov 13, 2020 9:27 am
by spinorkit
There seems to be a limit of 52 chars on strings used this way?

Re: Script Language

Posted: Fri Nov 13, 2020 12:51 pm
by MikeB
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

Re: Script Language

Posted: Sat Nov 14, 2020 1:02 am
by spinorkit
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

Re: Script Language

Posted: Sat Nov 14, 2020 9:55 am
by MikeB
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

Re: Script Language

Posted: Sat Nov 14, 2020 10:17 am
by LiM3
I can also confirm that 223A6 works correctly on my 9XR-PRO.

Re: Script Language

Posted: Sat Nov 14, 2020 9:25 pm
by spinorkit
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.

Re: Script Language

Posted: Sat Nov 14, 2020 9:26 pm
by MikeB
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

Re: Script Language

Posted: Sat Nov 14, 2020 9:46 pm
by spinorkit
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?

Re: Script Language

Posted: Sat Nov 14, 2020 11:58 pm
by spinorkit
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.

Re: Script Language

Posted: Sun Nov 15, 2020 12:12 am
by spinorkit
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?

Re: Script Language

Posted: Sun Nov 15, 2020 10:14 am
by spinorkit
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

Re: Script Language

Posted: Sun Nov 15, 2020 12:10 pm
by MikeB
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

Re: Script Language

Posted: Thu Nov 19, 2020 8:04 am
by spinorkit
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