rlugli
Sat, 03 Dec 2022 22:43:19 GMT
In ScanaStudio 5.0.9-Beta I configured the UART script (V1.55) for decoding 8 bit serial stream at 115200 bauds.
I modified the original script and added ScanaStudio method to retrieve and display the value of GUI element "nbits" in two different entry-point functions. I added the same two lines of code at the beginning of the two functions:
---
function on_eval_gui_trigger()
{
numBits = Number(ScanaStudio.gui_get_value("nbits")) + 5;
ScanaStudio.console_info_msg("NBITS-> " + numBits);
...
}
---
---
function on_build_trigger()
{
numBits = Number(ScanaStudio.gui_get_value("nbits")) + 5;
ScanaStudio.console_info_msg("NBITS-> " + numBits);
...
}
---
I was expecting to read two times the same value of 8 in the log window but instead I get the following in the log window:
[Cattura](//muut.com/u/ikalogic/s1/:ikalogic:APnh:cattura.jpg.jpg)
The first call returns 5 while the second returns the correct value 8.
Any idea?
Kind regards.
Roberto