diff options
Diffstat (limited to 'plugins/common/serialport.hpp')
-rw-r--r-- | plugins/common/serialport.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/common/serialport.hpp b/plugins/common/serialport.hpp index 1d5038e6..8577fb06 100644 --- a/plugins/common/serialport.hpp +++ b/plugins/common/serialport.hpp @@ -21,7 +21,7 @@ private: public: SerialPort() - :fd(0), speed(B9600) + :speed(B9600), fd(0) { } @@ -35,7 +35,7 @@ public: } SerialPort(std::string _tty) - :tty(_tty), fd(0) + :fd(0), tty(_tty) { speed = B9600; } @@ -95,7 +95,7 @@ public: char buff; std::string result; int bytesread = 0; - while( bytesread = ::read(fd, &buff, 1) > 0 ) + while((bytesread = ::read(fd, &buff, 1)) > 0 ) { result += buff; } |