mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
OP-1383 minor improvment to original fix + better comment
This commit is contained in:
parent
ef785bd060
commit
859cb59df9
@ -53,8 +53,12 @@ bool TelemetryManager::isConnected()
|
||||
void TelemetryManager::start(QIODevice *dev)
|
||||
{
|
||||
device = dev;
|
||||
// take ownership of the device (the why is not clear?)
|
||||
device->moveToThread(Core::ICore::instance()->threadManager()->getRealTimeThread());
|
||||
// OP-1383
|
||||
// take ownership of the device by moving it to the TelemetryManager thread (see TelemetryManager constructor)
|
||||
// this removes the following runtime Qt warning and incidentally fixes GCS crashes:
|
||||
// QObject: Cannot create children for a parent that is in a different thread.
|
||||
// (Parent is QSerialPort(0x56af73f8), parent's thread is QThread(0x23f69ae8), current thread is QThread(0x2649cfd8)
|
||||
device->moveToThread(thread());
|
||||
emit myStart();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user