Merge pull request #2 from w-mj/master

check if data can be split
This commit was merged in pull request #2.
This commit is contained in:
2018-11-04 15:44:45 +08:00
committed by GitHub
+2
View File
@@ -92,8 +92,10 @@ void SerialController::handleRecv()
try {
qDebug()<<str;
QStringList sl = str.split("|");
if (sl.size() == 2) {
a = sl[0].toInt();
d = sl[1].toInt();
}
qDebug()<<a<<","<<d;
emit sendPos(a, d);
} catch(...) {