Changeset - a20eb6fea911
[Not reviewed]
default
0 1 0
Hasan Yavuz Ă–ZDERYA - 11 years ago 2015-03-07 17:18:26
hy@ozderya.net
update port list on resource error
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
mainwindow.cpp
Show inline comments
 
@@ -169,24 +169,25 @@ void MainWindow::onPortError(QSerialPort
 
{
 
    switch(error)
 
    {
 
        case QSerialPort::NoError :
 
            break;
 
        case QSerialPort::ResourceError :
 
            qDebug() << "Port error: resource unavaliable; most likely device removed.";
 
            if (serialPort.isOpen())
 
            {
 
                qDebug() << "Closing port on resource error: " << serialPort.portName();
 
                togglePort();
 
            }
 
            loadPortList();
 
            break;
 
        default:
 
            qDebug() << "Unhandled port error: " << error;
 
            break;
 
    }
 

	
 
}
 

	
 
void MainWindow::addData(double data)
 
{
 
    // shift data array and place new data at the end
 
    for (int i = 0; i < dataArray.size()-1; i++)
0 comments (0 inline, 0 general)