Bug fix. Symptom: 100% CPU usage master
authordherring <dherring@c4713191-9d10-0410-88e3-c3bdc45b6a85>
Wed, 26 Apr 2006 16:28:51 +0000 (16:28 +0000)
committerdherring <dherring@c4713191-9d10-0410-88e3-c3bdc45b6a85>
Wed, 26 Apr 2006 16:28:51 +0000 (16:28 +0000)
Solution:  Throttled the timer which polls the serial port.

SerialPort.cpp

index 85a3572..f991fda 100644 (file)
@@ -117,7 +117,7 @@ void SerialPort::openPort()
        // open the port\r
        if(serial->open())\r
        {\r
-               timer->start();\r
+               timer->start(1);\r
                emit(portOpened());\r
        }\r
 }\r
@@ -125,6 +125,7 @@ void SerialPort::openPort()
 void SerialPort::closePort()\r
 {\r
        serial->close();\r
+       timer->stop();\r
        emit(portClosed());\r
 }\r
 \r