summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/io_serial.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-console/io_serial.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/io_serial.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/io_serial.cpp b/noncore/apps/opie-console/io_serial.cpp
index 0540d9e..03e92dd 100644
--- a/noncore/apps/opie-console/io_serial.cpp
+++ b/noncore/apps/opie-console/io_serial.cpp
@@ -1,11 +1,13 @@
#include <fcntl.h>
#include <termios.h>
#include <errno.h>
#include <unistd.h>
+#include <stdio.h>
+
#include "io_serial.h"
IOSerial::IOSerial(const Profile &config) : IOLayer(config) {
m_read = 0l;
m_error = 0l;
m_fd = 0;
@@ -161,12 +163,17 @@ void IOSerial::dataArrived() {
int len = read(m_fd, array.data(), 4096);
if (len == 0)
close();
if (len < 0)
return;
+ qWarning("got from layer");
+ for (int i = 0; i < len; i++ ) {
+ printf("%c", array[i] );
+ }
+ printf("\n");
array.resize( len );
emit received(array);
}
QString IOSerial::identifier() const {
return "serial";