add:
山地所贡嘎山2:(1)右下角添加控制is11的界面(2)添加轮播看板显示is11的光谱;
This commit is contained in:
@ -100,3 +100,18 @@ void AppSettings::setDepthCameraDataFolder(const QString& path)
|
||||
{
|
||||
m_settings.setValue("General/DepthCameraDataFolder", path);
|
||||
}
|
||||
|
||||
QString AppSettings::FiberImagerDataFolder() const
|
||||
{
|
||||
QString path = m_settings.value("General/FiberImagerDataFolder").toString();
|
||||
if (path.isEmpty())
|
||||
{
|
||||
return QCoreApplication::applicationDirPath() + "/CapturedFiberImagerData/";
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
void AppSettings::setFiberImagerDataFolder(const QString& path)
|
||||
{
|
||||
m_settings.setValue("General/FiberImagerDataFolder", path);
|
||||
}
|
||||
|
||||
@ -34,6 +34,9 @@ public:
|
||||
// 深度相机数据保存路径
|
||||
QString depthCameraDataFolder() const;
|
||||
void setDepthCameraDataFolder(const QString& path);
|
||||
|
||||
QString FiberImagerDataFolder() const;
|
||||
void setFiberImagerDataFolder(const QString& path);
|
||||
// 在此处添加更多参数的 getter/setter ...
|
||||
|
||||
private:
|
||||
|
||||
@ -10,8 +10,8 @@ FodisWindow::FodisWindow(QWidget* parent)
|
||||
m_JinspFiberImagerOperation->moveToThread(m_FiberImagerThread);
|
||||
m_FiberImagerThread->start();
|
||||
|
||||
connect(ui.open_btn, &QPushButton::clicked, this, &FodisWindow::openDepthCamera);
|
||||
connect(ui.close_btn, &QPushButton::clicked, this, &FodisWindow::closeDepthCamera);
|
||||
connect(ui.open_btn, &QPushButton::clicked, this, &FodisWindow::openFiberImager);
|
||||
connect(ui.close_btn, &QPushButton::clicked, this, &FodisWindow::closeFiberImager);
|
||||
|
||||
connect(this, &FodisWindow::openFiberImagerSignal, m_JinspFiberImagerOperation, &JinspFiberImager::OpenFiberImagerAndRecord);
|
||||
|
||||
@ -25,6 +25,8 @@ FodisWindow::FodisWindow(QWidget* parent)
|
||||
|
||||
// <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD> AppSettings <20>ָ<EFBFBD><D6B8><EFBFBD>ʹ<EFBFBD><CAB9>Ĭ<EFBFBD>ϣ<EFBFBD>
|
||||
ui.dataFolderLineEdit->setText(AppSettings::instance().depthCameraDataFolder());
|
||||
|
||||
setDataFolder(AppSettings::instance().FiberImagerDataFolder());
|
||||
}
|
||||
|
||||
FodisWindow::~FodisWindow()
|
||||
@ -49,7 +51,7 @@ void FodisWindow::setDataFolder(QString dir)
|
||||
if (!dir.isEmpty())
|
||||
{
|
||||
ui.dataFolderLineEdit->setText(dir);
|
||||
AppSettings::instance().setDepthCameraDataFolder(dir);
|
||||
AppSettings::instance().setFiberImagerDataFolder(dir);
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,7 +60,7 @@ void FodisWindow::setCaptureInterval(int captureIntervalSeconds)
|
||||
m_JinspFiberImagerOperation->setCaptureInterval(captureIntervalSeconds);
|
||||
}
|
||||
|
||||
void FodisWindow::openDepthCamera()
|
||||
void FodisWindow::openFiberImager()
|
||||
{
|
||||
if (!m_JinspFiberImagerOperation->getRecordStatus())
|
||||
{
|
||||
@ -74,7 +76,7 @@ void FodisWindow::onCamOpened()
|
||||
ui.open_btn->setText(QString::fromLocal8Bit("<EFBFBD>Ѵ<EFBFBD><EFBFBD><EFBFBD>"));
|
||||
}
|
||||
|
||||
void FodisWindow::closeDepthCamera()
|
||||
void FodisWindow::closeFiberImager()
|
||||
{
|
||||
m_JinspFiberImagerOperation->disconnectFiberSpectrometer();
|
||||
}
|
||||
|
||||
@ -30,9 +30,9 @@ public:
|
||||
void setCaptureInterval(int captureIntervalSeconds);
|
||||
|
||||
public Q_SLOTS:
|
||||
void openDepthCamera();
|
||||
void openFiberImager();
|
||||
void onCamOpened();
|
||||
void closeDepthCamera();
|
||||
void closeFiberImager();
|
||||
void onCamClosed();
|
||||
|
||||
void onSelectDataFolder();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Created by 73505 on 2023/5/7.
|
||||
//
|
||||
|
||||
@ -12,9 +12,6 @@ JinspFiberImager::JinspFiberImager(bool bIsUSBMode, std::string ucPortNumber, st
|
||||
|
||||
m_record = false;
|
||||
|
||||
m_captureTimer = new QTimer(this);
|
||||
connect(m_captureTimer, &QTimer::timeout, this, &JinspFiberImager::recordSpectral);
|
||||
|
||||
m_captureIntervalMilliseconds = 5 * 1000;
|
||||
}
|
||||
|
||||
@ -64,10 +61,6 @@ void JinspFiberImager::connectFiberSpectrometer(QString& SN, QString& pixelCount
|
||||
|
||||
void JinspFiberImager::disconnectFiberSpectrometer()
|
||||
{
|
||||
m_FiberSpectrometer->Close();
|
||||
|
||||
m_captureTimer->stop();
|
||||
|
||||
m_record = false;
|
||||
}
|
||||
|
||||
@ -294,19 +287,15 @@ void JinspFiberImager::OpenFiberImagerAndRecord()
|
||||
//曝光
|
||||
autoExpose();
|
||||
|
||||
//定时采集
|
||||
|
||||
if (m_captureTimer && !m_captureTimer->isActive())
|
||||
//采集
|
||||
m_record = true;
|
||||
while (m_record)
|
||||
{
|
||||
m_captureTimer->start(m_captureIntervalMilliseconds);
|
||||
recordTarget(1, AppSettings::instance().FiberImagerDataFolder());
|
||||
|
||||
QThread::msleep(m_captureIntervalMilliseconds);
|
||||
}
|
||||
|
||||
m_record = true;
|
||||
}
|
||||
|
||||
void JinspFiberImager::recordSpectral()
|
||||
{
|
||||
//recordDark("D:\\0tmp\\is11");
|
||||
|
||||
recordTarget(1, "D:\\0tmp\\is11");
|
||||
std::cout << "close.........." << std::endl;
|
||||
m_FiberSpectrometer->Close();
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Created by 73505 on 2023/5/7.
|
||||
//
|
||||
#pragma once
|
||||
@ -12,6 +12,7 @@
|
||||
#include "JinspSpectralmeterControl.h"
|
||||
#include "FiberSpectrometerOperationBase.h"
|
||||
#include "utility_tc.h"
|
||||
#include "AppSettings.h"
|
||||
|
||||
class JinspFiberImager :public QObject,public FiberSpectrometerOperationBase
|
||||
{
|
||||
@ -51,7 +52,6 @@ private:
|
||||
|
||||
bool m_record;
|
||||
int m_captureIntervalMilliseconds;
|
||||
QTimer* m_captureTimer; // <20><><EFBFBD>ն<EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
|
||||
// ZZ_U32 m_MaxValueOfFiberSpectrometer;
|
||||
|
||||
@ -61,7 +61,6 @@ public slots:
|
||||
void autoExpose();
|
||||
|
||||
void OpenFiberImagerAndRecord();
|
||||
void recordSpectral();
|
||||
|
||||
signals:
|
||||
void sendExposureTimeSignal(int exposureTime);
|
||||
|
||||
@ -62,7 +62,7 @@ int JinspSpectralmeterControl::Initialize(bool bIsUSBMode, std::string ucPortNum
|
||||
|
||||
void JinspSpectralmeterControl::Close()
|
||||
{
|
||||
|
||||
m_pSerialPort->close();
|
||||
}
|
||||
|
||||
int JinspSpectralmeterControl::SingleShot(DataFrame& dfData)
|
||||
|
||||
Reference in New Issue
Block a user