[Scilab-users] Problem with GUI / SERIAL / REALTIME.
Robin Farine
robin.farine at gmail.com
Tue Aug 15 15:33:44 CEST 2017
On Tue, Aug 15, 2017 at 2:38 PM, Jonas <jonas.vieira.de.souza at gmail.com> wrote:
>
>
> Hi, I'm having a problem with GUI / SERIAL / REALTIME. . After the serial is open, I can not close the serial by pressing the graphic button I created for this.
[...]
> function open_serial()
> global serial;
> global is_connected;
> global is_disconnected;
>
> if is_connected == %F then
> is_connected = %T;
> is_disconnected = %F;
> serial = openserial( 2, "9600,n,8,1" );
>
> set( _connect_button, 'relief','sunken' );
> set( _disconnect_button, 'relief', 'raised');
> set( _label_status, 'string', 'connected' );
>
> while is_connected == %T & is_disconnected == %F then
> read_serial();
> end
Just guessing but isn't Scilab single-threaded, busy looping in
"open_serial()" and therefore no longer handling your UI button
events?
More information about the users
mailing list