]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/sg_serial.cxx
- new FSF addresses
[simgear.git] / simgear / io / sg_serial.cxx
index 63d7a7abfd66d8bdb8df21b21c045bef34b0ddc8..c9b8865f76a7d83cbc2983242cae4b83780537c1 100644 (file)
@@ -2,7 +2,7 @@
 //
 // Written by Curtis Olson, started November 1999.
 //
-// Copyright (C) 1999  Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 1999  Curtis L. Olson - http://www.flightgear.org/~curt
 //
 // This program is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
@@ -16,7 +16,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
@@ -51,14 +51,14 @@ bool SGSerial::open( const SGProtocolDir d ) {
     set_dir( d );
 
     if ( ! port.open_port( device ) ) {
-       FG_LOG( FG_IO, FG_ALERT, "Error opening device: " << device );
+       SG_LOG( SG_IO, SG_ALERT, "Error opening device: " << device );
        return false;
     }
 
     // cout << "fd = " << port.fd << endl;
 
     if ( ! port.set_baud( atoi( baud.c_str() ) ) ) {
-       FG_LOG( FG_IO, FG_ALERT, "Error setting baud: " << baud );
+       SG_LOG( SG_IO, SG_ALERT, "Error setting baud: " << baud );
        return false;
     }
 
@@ -116,7 +116,7 @@ int SGSerial::readline( char *buf, int length ) {
     // copy to external buffer
     strncpy( buf, save_buf, result );
     buf[result] = '\0';
-    FG_LOG( FG_IO, FG_INFO, "fg_serial line = " << buf );
+    SG_LOG( SG_IO, SG_INFO, "fg_serial line = " << buf );
 
     // shift save buffer
     for ( i = result; i < save_len; ++i ) {
@@ -133,7 +133,7 @@ int SGSerial::write( const char *buf, const int length ) {
     int result = port.write_port( buf, length );
 
     if ( result != length ) {
-       FG_LOG( FG_IO, FG_ALERT, "Error writing data: " << device );
+       SG_LOG( SG_IO, SG_WARN, "Error writing data: " << device );
     }
 
     return result;