Script Language
Re: Script Language
There seems to be a limit of 52 chars on strings used this way?
- MikeB
- 9x Developer
- Posts: 17853
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Script Language
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
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!
The difficult we do immediately,
The impossible takes a little longer!
Re: Script Language
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
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
- MikeB
- 9x Developer
- Posts: 17853
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Script Language
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
Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: Script Language
I can also confirm that 223A6 works correctly on my 9XR-PRO.
Re: Script Language
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.
- MikeB
- 9x Developer
- Posts: 17853
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Script Language
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
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!
The difficult we do immediately,
The impossible takes a little longer!
Re: Script Language
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
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?
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
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
https://github.com/spinorkit/ExpressLRS ... x/ELRS.bas
- MikeB
- 9x Developer
- Posts: 17853
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Script Language
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
Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: Script Language
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