[BUG][UNIX][FIX] SerialPort input problems
Ned Konz
ned at bike-nomad.com
Fri Mar 22 00:08:09 UTC 2002
On Thursday 21 March 2002 02:54 pm, Kevin Fisher wrote:
> Well, after a bit of sleuthing about I think that there may be a problem
> with the SerialPort plugin...but only in one direction.
What, you want to read too?
> With the old 3.1 VM, the keys I pressed on the dumb terminal were read
> by Squeak just fine...I got a nice ByteArray of my key presses.
>
> However, with the sourceforge VM, I get nothing at all.
>
> So, are there any thoughts on this? I hope its not something as silly as
> me initializing the SerialPort wrong. :)
Well, it would help if we enabled the receiver. It worked when I put the
initialization back to what it had been (why was this changed?):
$ cvs diff -uwb squeak/platforms/unix/plugins/SerialPlugin/sqUnixSerial.c
Index: squeak/platforms/unix/plugins/SerialPlugin/sqUnixSerial.c
===================================================================
RCS file:
/cvsroot/squeak/squeak/platforms/unix/plugins/SerialPlugin/sqUnixSerial.c,v
retrieving revision 1.1.1.1
diff -u -w -b -r1.1.1.1 sqUnixSerial.c
--- squeak/platforms/unix/plugins/SerialPlugin/sqUnixSerial.c 24 Oct 2001
23:14:15 -0000 1.1.1.1
+++ squeak/platforms/unix/plugins/SerialPlugin/sqUnixSerial.c 22 Mar 2002
00:06:24 -0000
@@ -334,12 +334,12 @@
/* tcflag_t c_oflag output modes */
/* defaultTermios.c_oflag = 0; */
/* tcflag_t c_cflag control modes */
- /* defaultTermios.c_cflag = 0; */
+ defaultTermios.c_cflag = CREAD;
/* tcflag_t c_lflag local modes */
/* defaultTermios.c_lflag = 0; */
/* cc_t c_cc[NCCS] control chars */
- defaultTermios.c_cc[VTIME] = 5;
- defaultTermios.c_cc[VMIN] = 1;
+ defaultTermios.c_cc[VTIME] = 0;
+ defaultTermios.c_cc[VMIN] = 0;
success(true);
return 1;
--
Ned Konz
currently: Stanwood, WA
email: ned at bike-nomad.com
homepage: http://bike-nomad.com
More information about the Squeak-dev
mailing list
|