Curtis L. Olson wrote :
> I don't fully understand either.  When I specified "text\r\n", the 
> serial port analyzer showed I was actually sending "text\r\r\n" from 
> unix.  When I changed this to "text\n" then the output was "text\r\n".  
> So someplace, the \n is getting expanded to \r\n under unix at least ... 
> strange ...
>   

With the patch below, LF are no longer expanded to CRLF :

[EMAIL PROTECTED]:~/fgfs/SimGear$ cvs diff -u simgear/serial/serial.cxx
Index: simgear/serial/serial.cxx
===================================================================
RCS file: /var/cvs/SimGear-0.3/SimGear/simgear/serial/serial.cxx,v
retrieving revision 1.10
diff -u -r1.10 serial.cxx
--- simgear/serial/serial.cxx   8 Mar 2006 18:16:09 -0000       1.10
+++ simgear/serial/serial.cxx   26 Aug 2006 13:14:33 -0000
@@ -122,6 +122,9 @@

     // cout << "config.c_iflag = " << config.c_iflag << endl;

+    // disable LF expanded to CR-LF
+    config.c_oflag &= ~(ONLCR);
+
     // disable software flow control
     config.c_iflag &= ~(IXON | IXOFF | IXANY);



I suggest to apply it and add the required \r in the messages. That way,
Linux and Windows behavior are the same.

-Fred

-- 
Frédéric Bouvier
http://frfoto.free.fr         Photo gallery - album photo
http://www.fotolia.fr/p/2278  Other photo gallery
http://fgsd.sourceforge.net/  FlightGear Scenery Designer



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to