Skip to content

Commit

Permalink
Program should handle unexpected stoppage of GVRET devices now.
Browse files Browse the repository at this point in the history
  • Loading branch information
collin80 committed Feb 17, 2019
1 parent 0153677 commit 8ee9805
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion connections/gvretserial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ void GVRetSerial::disconnectDevice() {
{
if (serial->isOpen())
{
serial->clear();
//serial->clear();
serial->close();

}
Expand Down Expand Up @@ -496,9 +496,11 @@ void GVRetSerial::serialError(QSerialPort::SerialPortError err)
break;
case QSerialPort::WriteError:
errMessage = "Write error on serial port";
piStop();
break;
case QSerialPort::ReadError:
errMessage = "Read error on serial port";
piStop();
break;
case QSerialPort::ResourceError:
errMessage = "Serial port seems to have disappeared.";
Expand All @@ -512,6 +514,7 @@ void GVRetSerial::serialError(QSerialPort::SerialPortError err)
case QSerialPort::UnknownError:
errMessage = "Beats me what happened to the serial port.";
killConnection = true;
piStop();
break;
case QSerialPort::TimeoutError:
errMessage = "Timeout error on serial port";
Expand Down

0 comments on commit 8ee9805

Please sign in to comment.