//
// 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$
#endif
#include <stdio.h> // FILE*, fopen(), fread(), fwrite(), et. al.
+#include <iostream> // for cout, endl
#include <simgear/debug/logstream.hxx>
#include <simgear/io/lowlevel.hxx> // endian tests
#include "ExternalPipe.hxx"
+using std::cout;
+using std::endl;
static const int MAX_BUF = 32768;
memcpy( buf + 3, cmd, len );
if ( cmd_type == '1' ) {
- cout << "writing '";
- for ( int i = 0; i < len + 3; ++i ) {
+ cout << "writing ";
+ cout << (int)hi << " ";
+ cout << (int)lo << " '";
+ for ( int i = 2; i < len + 3; ++i ) {
cout << buf[i];
}
cout << "' (" << cmd << ")" << endl;
cout << "Error reading data" << endl;
} else {
// cout << " read " << strlen(cmd) << " bytes" << endl;
+ // cout << cmd << endl;
}
// chop trailing newline
// node doesn't exist so create with requested type
node = fgGetNode( tokens[1].c_str(), true );
if ( tokens[2] == "bool" ) {
- node->setBoolValue(true);
+ node->setBoolValue(false);
} else if ( tokens[2] == "int" ) {
node->setIntValue(0);
} else if ( tokens[2] == "double" ) {