添加管控软件和相机的通讯
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "ui_MainWindow.h"
|
||||
#include "AppSettings.h"
|
||||
#include <QCoreApplication>
|
||||
#include <QScopeGuard>
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
VisionGuidePanel::VisionGuidePanel(Ui::MainWindowClass& u, VisionGuideMatcher* m, QObject* parent)
|
||||
@@ -108,6 +109,9 @@ void VisionGuidePanel::syncParams()
|
||||
|
||||
void VisionGuidePanel::onStepSeg()
|
||||
{
|
||||
if(m_busy||m_resourceBlocked)return;
|
||||
auto release=qScopeGuard([this]{m_busy=false;updateStepButtons();emit busyChanged(false);});
|
||||
m_busy=true;emit busyChanged(true);
|
||||
if (m_frame.isNull() || !m_roi.isValid()) return;
|
||||
emit logMessage(QString::fromUtf8("═ VisionGuide Step1: 自动分割 ═"));
|
||||
ui.progressAlgoStep->setValue(10);
|
||||
@@ -133,6 +137,9 @@ void VisionGuidePanel::onStepSeg()
|
||||
|
||||
void VisionGuidePanel::onStepPose()
|
||||
{
|
||||
if(m_busy||m_resourceBlocked)return;
|
||||
auto release=qScopeGuard([this]{m_busy=false;updateStepButtons();emit busyChanged(false);});
|
||||
m_busy=true;emit busyChanged(true);
|
||||
if (m_frame.isNull() || !m_roi.isValid() || !m_hal->isReady(m_side)) return;
|
||||
QString sideStr = (m_side == CAM_LEFT) ? QString::fromUtf8("左") : QString::fromUtf8("右");
|
||||
emit logMessage(QString::fromUtf8("═ VisionGuide Step2: 位姿测量 (%1相机) ═").arg(sideStr));
|
||||
@@ -168,6 +175,9 @@ void VisionGuidePanel::onStepPose()
|
||||
|
||||
void VisionGuidePanel::onStepDebug()
|
||||
{
|
||||
if(m_busy||m_resourceBlocked)return;
|
||||
auto release=qScopeGuard([this]{m_busy=false;updateStepButtons();emit busyChanged(false);});
|
||||
m_busy=true;emit busyChanged(true);
|
||||
if (m_frame.isNull() || !m_roi.isValid() || !m_hal->isReady(m_side)) return;
|
||||
QString sideStr = (m_side == CAM_LEFT) ? QString::fromUtf8("左") : QString::fromUtf8("右");
|
||||
emit logMessage(QString::fromUtf8("═ VisionGuide Step3: 参数调试 (%1相机) ═").arg(sideStr));
|
||||
@@ -207,5 +217,5 @@ void VisionGuidePanel::onStepDebug()
|
||||
void VisionGuidePanel::onVisionGuideLog(const QString& msg) { emit logMessage(msg); }
|
||||
void VisionGuidePanel::onProgress(int pct, const QString&) {
|
||||
ui.progressAlgoStep->setValue(pct);
|
||||
QCoreApplication::processEvents();
|
||||
if(m_busy)QCoreApplication::processEvents();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user