mirror of
https://github.com/overte-org/overte.git
synced 2025-04-24 12:13:36 +02:00
And also, close the file descriptor and print a message.
This commit is contained in:
parent
f171b76f69
commit
55a010a1a0
1 changed files with 2 additions and 0 deletions
|
@ -226,6 +226,8 @@ void SerialInterface::readData(float deltaTime) {
|
|||
// ask the invensense for raw gyro data
|
||||
short accelData[3];
|
||||
if (mpu_get_accel_reg(accelData, 0)) {
|
||||
close(_serialDescriptor);
|
||||
qDebug("Disconnected SerialUSB.\n");
|
||||
_active = false;
|
||||
return; // disconnected
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue