1
0
Fork 0

Be a little quieter at the default debug level.

This commit is contained in:
david 2004-02-07 21:37:35 +00:00
parent a80d0320d7
commit 633e0fde43
5 changed files with 11 additions and 11 deletions

View file

@ -163,7 +163,7 @@ bool FGAtlas::gen_message() {
atlas_sentence += patla_sum; atlas_sentence += patla_sum;
atlas_sentence += "\n"; atlas_sentence += "\n";
cout << atlas_sentence; // cout << atlas_sentence;
length = atlas_sentence.length(); length = atlas_sentence.length();
strncpy( buf, atlas_sentence.c_str(), length ); strncpy( buf, atlas_sentence.c_str(), length );
@ -544,20 +544,20 @@ bool FGAtlas::process() {
if ( get_direction() == SG_IO_OUT ) { if ( get_direction() == SG_IO_OUT ) {
gen_message(); gen_message();
if ( ! io->write( buf, length ) ) { 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; return false;
} }
} else if ( get_direction() == SG_IO_IN ) { } else if ( get_direction() == SG_IO_IN ) {
if ( (length = io->readline( buf, FG_MAX_MSG_SIZE )) > 0 ) { if ( (length = io->readline( buf, FG_MAX_MSG_SIZE )) > 0 ) {
parse_message(); parse_message();
} else { } else {
SG_LOG( SG_IO, SG_ALERT, "Error reading data." ); SG_LOG( SG_IO, SG_WARN, "Error reading data." );
return false; return false;
} }
if ( (length = io->readline( buf, FG_MAX_MSG_SIZE )) > 0 ) { if ( (length = io->readline( buf, FG_MAX_MSG_SIZE )) > 0 ) {
parse_message(); parse_message();
} else { } else {
SG_LOG( SG_IO, SG_ALERT, "Error reading data." ); SG_LOG( SG_IO, SG_WARN, "Error reading data." );
return false; return false;
} }
} }

View file

@ -392,7 +392,7 @@ bool FGGarmin::process() {
if ( get_direction() == SG_IO_OUT ) { if ( get_direction() == SG_IO_OUT ) {
gen_message(); gen_message();
if ( ! io->write( buf, length ) ) { 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; return false;
} }
} else if ( get_direction() == SG_IO_IN ) { } else if ( get_direction() == SG_IO_IN ) {

View file

@ -211,7 +211,7 @@ bool FGGeneric::process() {
if ( get_direction() == SG_IO_OUT ) { if ( get_direction() == SG_IO_OUT ) {
gen_message(); gen_message();
if ( ! io->write( buf, length ) ) { 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; return false;
} }
} else if ( get_direction() == SG_IO_IN ) { } else if ( get_direction() == SG_IO_IN ) {

View file

@ -165,7 +165,7 @@ bool FGNMEA::gen_message() {
nmea_sentence += gsa; nmea_sentence += gsa;
nmea_sentence += "\r\n"; nmea_sentence += "\r\n";
cout << nmea_sentence; // cout << nmea_sentence;
length = nmea_sentence.length(); length = nmea_sentence.length();
strncpy( buf, nmea_sentence.c_str(), length ); strncpy( buf, nmea_sentence.c_str(), length );
@ -496,20 +496,20 @@ bool FGNMEA::process() {
if ( get_direction() == SG_IO_OUT ) { if ( get_direction() == SG_IO_OUT ) {
gen_message(); gen_message();
if ( ! io->write( buf, length ) ) { 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; return false;
} }
} else if ( get_direction() == SG_IO_IN ) { } else if ( get_direction() == SG_IO_IN ) {
if ( (length = io->readline( buf, FG_MAX_MSG_SIZE )) > 0 ) { if ( (length = io->readline( buf, FG_MAX_MSG_SIZE )) > 0 ) {
parse_message(); parse_message();
} else { } else {
SG_LOG( SG_IO, SG_ALERT, "Error reading data." ); SG_LOG( SG_IO, SG_WARN, "Error reading data." );
return false; return false;
} }
if ( (length = io->readline( buf, FG_MAX_MSG_SIZE )) > 0 ) { if ( (length = io->readline( buf, FG_MAX_MSG_SIZE )) > 0 ) {
parse_message(); parse_message();
} else { } else {
SG_LOG( SG_IO, SG_ALERT, "Error reading data." ); SG_LOG( SG_IO, SG_WARN, "Error reading data." );
return false; return false;
} }
} }

View file

@ -225,7 +225,7 @@ bool FGOpenGC::process() {
collect_data( cur_fdm_state, &buf ); collect_data( cur_fdm_state, &buf );
//collect_data( &buf ); //collect_data( &buf );
if ( ! io->write( (char *)(& buf), length ) ) { if ( ! io->write( (char *)(& buf), length ) ) {
SG_LOG( SG_IO, SG_ALERT, "Error writing data." ); SG_LOG( SG_IO, SG_WARN, "Error writing data." );
return false; return false;
} }
} else if ( get_direction() == SG_IO_IN ) { } else if ( get_direction() == SG_IO_IN ) {