修复航线无法上传下载,以及优化转发
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "ThreadTemplet.h"
|
||||
#include "ThreadTemplet.h"
|
||||
|
||||
ThreadTemplet::ThreadTemplet(QObject *parent) : QObject(parent)
|
||||
{
|
||||
@@ -38,9 +38,9 @@ void ThreadTemplet::start()
|
||||
if(!thread->isRunning())
|
||||
{
|
||||
running_flag = true;
|
||||
thread->start();
|
||||
thread->start(QThread::IdlePriority);
|
||||
qDebug() << "thread start" << thread->isRunning();
|
||||
thread->setPriority(QThread::IdlePriority);
|
||||
// thread->setPriority(QThread::IdlePriority);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -241,17 +241,27 @@ MavLinkNode::MavLinkNode(QObject *parent) : ThreadTemplet(parent)
|
||||
m_heartbeat.type = 0;
|
||||
|
||||
|
||||
showInfoTimer = new QTimer;
|
||||
showInfoTimer->setInterval(200);
|
||||
connect(showInfoTimer, &QTimer::timeout, this, &MavLinkNode::showInfoTimerTimeout, Qt::DirectConnection);
|
||||
|
||||
showInfoTimer->start();
|
||||
|
||||
|
||||
connect(&showInfoThread, &QThread::started, this, [this]()
|
||||
{
|
||||
showInfoTimer = new QTimer;
|
||||
showInfoTimer->setInterval(200);
|
||||
connect(showInfoTimer, &QTimer::timeout, this, &MavLinkNode::showInfoTimerTimeout, Qt::DirectConnection);
|
||||
showInfoTimer->start();
|
||||
}, Qt::DirectConnection);
|
||||
|
||||
showInfoThread.start();
|
||||
|
||||
}
|
||||
|
||||
MavLinkNode::~MavLinkNode()
|
||||
{
|
||||
//CreateCSV();
|
||||
|
||||
showInfoThread.quit();
|
||||
|
||||
CloseCSV();
|
||||
|
||||
if (mavLogFile)
|
||||
|
||||
@@ -359,6 +359,7 @@ protected:
|
||||
_showinfo info;
|
||||
|
||||
QPointer<QTimer> showInfoTimer = nullptr;
|
||||
QThread showInfoThread;
|
||||
|
||||
private slots:
|
||||
void showInfoTimerTimeout();
|
||||
|
||||
Reference in New Issue
Block a user