update
This commit is contained in:
1 parent
ba43cfb3a9
commit
9f19001fdb
4 files changed
+626
-24
No files matched your search
@@ -87,11 +87,13 @@ void SerialController::handleRecv()
|
||||
{
|
||||
QByteArray data = serial->readAll();
|
||||
QString str = data;
|
||||
double a, d;
|
||||
int a, d;
|
||||
try {
|
||||
qDebug()<<str;
|
||||
QStringList sl = str.split("|");
|
||||
a = sl[0].toInt();
|
||||
d = sl[0].toInt();
|
||||
d = sl[1].toInt();
|
||||
qDebug()<<a<<","<<d;
|
||||
emit sendPos(a, d);
|
||||
} catch(...) {
|
||||
;
|
||||
|
||||
Reference in new issue
Block a user