]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/atlas.cxx
Add generic input support
[flightgear.git] / src / Network / atlas.cxx
index 2df07d557fdd714f4d5accc7e517b5d255f9b445..3301c55cfd7ea2b572a099c367ad569d4be5b18d 100644 (file)
@@ -163,7 +163,7 @@ bool FGAtlas::gen_message() {
     atlas_sentence += patla_sum;
     atlas_sentence += "\n";
 
-    cout << atlas_sentence;
+    //    cout << atlas_sentence;
 
     length = atlas_sentence.length();
     strncpy( buf, atlas_sentence.c_str(), length );
@@ -544,20 +544,20 @@ bool FGAtlas::process() {
     if ( get_direction() == SG_IO_OUT ) {
        gen_message();
        if ( ! io->write( buf, length ) ) {
-           SG_LOG( SG_IO, SG_ALERT, "Error writing data." );
+           SG_LOG( SG_IO, SG_WARN, "Error writing data." );
            return false;
        }
     } else if ( get_direction() == SG_IO_IN ) {
        if ( (length = io->readline( buf, FG_MAX_MSG_SIZE )) > 0 ) {
            parse_message();
        } else {
-           SG_LOG( SG_IO, SG_ALERT, "Error reading data." );
+           SG_LOG( SG_IO, SG_WARN, "Error reading data." );
            return false;
        }
        if ( (length = io->readline( buf, FG_MAX_MSG_SIZE )) > 0 ) {
            parse_message();
        } else {
-           SG_LOG( SG_IO, SG_ALERT, "Error reading data." );
+           SG_LOG( SG_IO, SG_WARN, "Error reading data." );
            return false;
        }
     }
@@ -568,6 +568,7 @@ bool FGAtlas::process() {
 
 // close the channel
 bool FGAtlas::close() {
+    SG_LOG( SG_IO, SG_INFO, "closing FGAtlas" );   
     SGIOChannel *io = get_io_channel();
 
     set_enabled( false );