修复航线无法上传下载,以及优化转发

This commit is contained in:
2024-09-19 17:28:52 +08:00
parent a5fc50e704
commit 325d97a221
3 changed files with 18 additions and 7 deletions
+3 -3
View File
@@ -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
{
+14 -4
View File
@@ -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)
+1
View File
@@ -359,6 +359,7 @@ protected:
_showinfo info;
QPointer<QTimer> showInfoTimer = nullptr;
QThread showInfoThread;
private slots:
void showInfoTimerTimeout();