]> git.mxchange.org Git - simgear.git/blobdiff - Serial/testserial.cxx
Portability updates contributed by Bernie Bright.
[simgear.git] / Serial / testserial.cxx
index b563ac76ab1ad473151342ea52b420d84c5dd10f..c582c13c316dc916c230ccdc31bf0ca537bd202d 100644 (file)
@@ -1,10 +1,23 @@
 #include <string>
 
+#include <Debug/logstream.hxx>
+
 #include "serial.hxx"
 
 main () {
-    fgSERIAL port( "/dev/ttyS1", 4800);
+    fgSERIAL port;
     string value;
+    bool result;
+
+    fglog().setLogLevels( FG_ALL, FG_INFO );
+
+    cout << "start of main" << endl;
+
+    result = port.open_port("/dev/ttyS1");
+    cout << "opened port, result = " << result << endl;
+
+    result = port.set_baud(4800);
+    cout << "set baud, result = " << result << endl;
 
     port.write_port("ATDT 626-9800\n");