mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-21 12:09:43 +08:00
更新支持使用asd测定的积分球标准能量曲线
This commit is contained in:
@ -29,10 +29,10 @@ set(TARGET ximeaImageRecorder)
|
|||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
find_package(Qt5 REQUIRED ${QT})
|
find_package(Qt5 REQUIRED ${QT})
|
||||||
|
|
||||||
#include_directories(/home/iris-xport/projects/ocean/seabreeze-3.0.11/SeaBreeze/include/)
|
include_directories(/home/iris-xport/projects/ocean/seabreeze-3.0.11/SeaBreeze/include/)
|
||||||
#LINK_DIRECTORIES(/home/iris-xport/projects/ocean/seabreeze-3.0.11/SeaBreeze/lib/)
|
LINK_DIRECTORIES(/home/iris-xport/projects/ocean/seabreeze-3.0.11/SeaBreeze/lib/)
|
||||||
include_directories(/home/pi/SeaBrease/include/)
|
#include_directories(/home/pi/SeaBrease/include/)
|
||||||
LINK_DIRECTORIES(/home/pi/SeaBrease/lib/)
|
#LINK_DIRECTORIES(/home/pi/SeaBrease/lib/)
|
||||||
|
|
||||||
include_directories(.)#包含头文件
|
include_directories(.)#包含头文件
|
||||||
include_directories(/usr/include/eigen3)#包含头文件,安装eigen:sudo apt-get install libeigen3-dev
|
include_directories(/usr/include/eigen3)#包含头文件,安装eigen:sudo apt-get install libeigen3-dev
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "ZZ_Math.h"
|
#include "ZZ_Math.h"
|
||||||
#include <QSerialPort>
|
#include <QSerialPort>
|
||||||
#include <QtEndian>
|
#include <QtEndian>
|
||||||
|
#include <QDebug>
|
||||||
#include "IrisFiberSpectrometerBase.h"
|
#include "IrisFiberSpectrometerBase.h"
|
||||||
|
|
||||||
using namespace ZZ_MISCDEF;
|
using namespace ZZ_MISCDEF;
|
||||||
@ -87,6 +88,7 @@ private:
|
|||||||
int GetExposureTime_Init();
|
int GetExposureTime_Init();
|
||||||
int SendCommand(QByteArray qbCommand);
|
int SendCommand(QByteArray qbCommand);
|
||||||
int RecvData(QByteArray &qbData);
|
int RecvData(QByteArray &qbData);
|
||||||
|
int RecvData_ShortLag(QByteArray &qbData);
|
||||||
int ParseData(QByteArray &qbData);
|
int ParseData(QByteArray &qbData);
|
||||||
public slots:
|
public slots:
|
||||||
int Init_Self();
|
int Init_Self();
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
//#include "pch.h"
|
//#include "pch.h"
|
||||||
#include "Header_Files/ATPControl_Serial_QT.h"
|
#include "Header_Files/ATPControl_Serial_QT.h"
|
||||||
//#include "ZZ_Math_HDRONLY.h"
|
//#include "ZZ_Math_HDRONLY.h"
|
||||||
#include <QDebug>
|
|
||||||
|
|
||||||
ZZ_ATPControl_Serial_Qt::ZZ_ATPControl_Serial_Qt(QObject* parent /*= nullptr*/)
|
ZZ_ATPControl_Serial_Qt::ZZ_ATPControl_Serial_Qt(QObject* parent /*= nullptr*/)
|
||||||
{
|
{
|
||||||
@ -73,17 +72,18 @@ int ZZ_ATPControl_Serial_Qt::Initialize(bool bIsUSBMode, std::string ucPortNumbe
|
|||||||
|
|
||||||
GetDeviceInfo(m_diDeviceInfo);
|
GetDeviceInfo(m_diDeviceInfo);
|
||||||
GetExposureTime_Init();
|
GetExposureTime_Init();
|
||||||
//
|
|
||||||
// std::string::size_type szPostion = m_diDeviceInfo.strSN.find(strDeviceName);
|
|
||||||
// if (szPostion == std::string::npos)
|
std::string::size_type szPostion = m_diDeviceInfo.strSN.find(strDeviceName);
|
||||||
// {
|
if (szPostion == std::string::npos)
|
||||||
// qDebug() << "Err:FS serial number not match.Exit Code:3";
|
{
|
||||||
// return 3;
|
qDebug() << "Err:FS serial number not match.Exit Code:3";
|
||||||
// }
|
return 3;
|
||||||
// else
|
}
|
||||||
// {
|
else
|
||||||
// return 0;
|
{
|
||||||
// }
|
return 0;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,6 +197,9 @@ int ZZ_ATPControl_Serial_Qt::GetDeviceAttribute(DeviceAttribute& Attr)
|
|||||||
m_daDeviceAttr.iMaxIntegrationTimeInMS = (ZZ_U8)qbRecv[1] + (ZZ_U8)qbRecv[0] * 256;
|
m_daDeviceAttr.iMaxIntegrationTimeInMS = (ZZ_U8)qbRecv[1] + (ZZ_U8)qbRecv[0] * 256;
|
||||||
|
|
||||||
|
|
||||||
|
int iTempExpTime = 0;
|
||||||
|
GetExposureTime(iTempExpTime);
|
||||||
|
|
||||||
iRes = SetExposureTime(m_daDeviceAttr.iMinIntegrationTimeInMS);
|
iRes = SetExposureTime(m_daDeviceAttr.iMinIntegrationTimeInMS);
|
||||||
if (iRes != 0)
|
if (iRes != 0)
|
||||||
{
|
{
|
||||||
@ -210,6 +213,8 @@ int ZZ_ATPControl_Serial_Qt::GetDeviceAttribute(DeviceAttribute& Attr)
|
|||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetExposureTime(iTempExpTime);
|
||||||
|
|
||||||
|
|
||||||
qbSend.clear();
|
qbSend.clear();
|
||||||
qbRecv.clear();
|
qbRecv.clear();
|
||||||
@ -321,11 +326,11 @@ int ZZ_ATPControl_Serial_Qt::RecvData(QByteArray& qbData)
|
|||||||
int iCounter = 0;
|
int iCounter = 0;
|
||||||
while (qbData.size() < 4)
|
while (qbData.size() < 4)
|
||||||
{
|
{
|
||||||
m_pSerialPort->waitForReadyRead(1000);
|
m_pSerialPort->waitForReadyRead(600);
|
||||||
QByteArray qbTemp = m_pSerialPort->readAll();
|
QByteArray qbTemp = m_pSerialPort->readAll();
|
||||||
qbData.append(qbTemp);
|
qbData.append(qbTemp);
|
||||||
|
|
||||||
if (iCounter > 150)
|
if (iCounter > 25)
|
||||||
{
|
{
|
||||||
qDebug() << "Err:RecvData Failed,Not Enough Data.Exit Code:1" << qbData.size();
|
qDebug() << "Err:RecvData Failed,Not Enough Data.Exit Code:1" << qbData.size();
|
||||||
return 1;
|
return 1;
|
||||||
@ -377,6 +382,70 @@ int ZZ_ATPControl_Serial_Qt::RecvData(QByteArray& qbData)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ZZ_ATPControl_Serial_Qt::RecvData_ShortLag(QByteArray &qbData)
|
||||||
|
{
|
||||||
|
qbData.clear();
|
||||||
|
qbData = m_pSerialPort->readAll();
|
||||||
|
|
||||||
|
int iCounter = 0;
|
||||||
|
while (qbData.size() < 4)
|
||||||
|
{
|
||||||
|
m_pSerialPort->waitForReadyRead(100);
|
||||||
|
QByteArray qbTemp = m_pSerialPort->readAll();
|
||||||
|
qbData.append(qbTemp);
|
||||||
|
|
||||||
|
if (iCounter > 6)
|
||||||
|
{
|
||||||
|
qDebug() << "Err:RecvData Failed,Not Enough Data.Exit Code:1" << qbData.size();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
iCounter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((ZZ_U8)qbData[0] != (ZZ_U8)0xaa || (ZZ_U8)qbData[1] != (ZZ_U8)0x55)
|
||||||
|
{
|
||||||
|
qDebug() << "Err:RecvData Failed,Wrong Header.Exit Code:2" << qbData.size();
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
iCounter = 0;
|
||||||
|
int iLength = qbData[2] * 256 + qbData[3] + 2;
|
||||||
|
while (qbData.size() < iLength)
|
||||||
|
{
|
||||||
|
m_pSerialPort->waitForReadyRead(100);
|
||||||
|
qbData.append(m_pSerialPort->readAll());
|
||||||
|
|
||||||
|
if (iCounter > 6)
|
||||||
|
{
|
||||||
|
qDebug() << "Err:RecvData Failed,Incomplete Data.Exit Code:3" << qbData.size();
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
iCounter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (qbData.size() > iLength)
|
||||||
|
{
|
||||||
|
qbData.remove(iLength - 1, qbData.size() - iLength);
|
||||||
|
}
|
||||||
|
int iCheckSumLength = iLength - 3;
|
||||||
|
ZZ_U16 usCheckSum = 0;
|
||||||
|
for (int i = 0; i < iCheckSumLength; i++)
|
||||||
|
{
|
||||||
|
usCheckSum += qbData[i + 2];
|
||||||
|
}
|
||||||
|
usCheckSum = usCheckSum % 256;
|
||||||
|
ZZ_U8 ucTemp = qbData[qbData.size() - 1];
|
||||||
|
if ((ZZ_U8)usCheckSum != ucTemp)
|
||||||
|
{
|
||||||
|
qDebug() << "Err:RecvData Failed,Incorrect Check Sum.Exit Code:4" << "Total Recv:" << qbData.size() << "Check Sum:" << usCheckSum << "Not Equal To" << ucTemp;
|
||||||
|
//qbData.clear();
|
||||||
|
//return 4;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int ZZ_ATPControl_Serial_Qt::ParseData(QByteArray &qbData)
|
int ZZ_ATPControl_Serial_Qt::ParseData(QByteArray &qbData)
|
||||||
{
|
{
|
||||||
if (qbData.size() < 6)
|
if (qbData.size() < 6)
|
||||||
@ -397,138 +466,6 @@ int ZZ_ATPControl_Serial_Qt::Init_Self()
|
|||||||
|
|
||||||
int ZZ_ATPControl_Serial_Qt::PerformAutoExposure(float fMinScaleFactor, float fMaxScaleFactor, float &fPredictedExposureTime)
|
int ZZ_ATPControl_Serial_Qt::PerformAutoExposure(float fMinScaleFactor, float fMaxScaleFactor, float &fPredictedExposureTime)
|
||||||
{
|
{
|
||||||
// using namespace ZZ_MATH;
|
|
||||||
// int iDeviceDepth = 65535;
|
|
||||||
//
|
|
||||||
// bool bFlagIsOverTrying = false;
|
|
||||||
// bool bFlagIsLowerMinExposureTime = false;
|
|
||||||
// bool bFlagIsOverMaxExposureTime = false;
|
|
||||||
// bool bFlagIsAutoExposureOK = false;
|
|
||||||
// bool bFlagIsAutoExposureFailed = false;
|
|
||||||
//
|
|
||||||
// bool bIsValueOverflow = false;
|
|
||||||
// bool bIsLastValueOverflow = false;
|
|
||||||
//
|
|
||||||
// float fExposureTime = 0;
|
|
||||||
// float fTempExposureTime = 0;
|
|
||||||
// double fLastExposureTime = 0.1;
|
|
||||||
// int iRepeatCount = 0;
|
|
||||||
//
|
|
||||||
// int iRes = SetExposureTime(2000);//need change to load from files
|
|
||||||
// if (iRes != 0)
|
|
||||||
// {
|
|
||||||
// qDebug() << "Err:PerformAutoExposure Failed.Exit Code:1";
|
|
||||||
// return 1;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// while (!bFlagIsAutoExposureOK && !bFlagIsAutoExposureFailed)
|
|
||||||
// {
|
|
||||||
// DataFrame dfTemp;
|
|
||||||
//
|
|
||||||
// if (iRepeatCount++ > 30)
|
|
||||||
// {
|
|
||||||
// bFlagIsAutoExposureFailed = true;
|
|
||||||
// bFlagIsOverTrying = true;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// fExposureTime = (float)m_daDeviceAttr.iMinIntegrationTimeInMS;
|
|
||||||
// fTempExposureTime = fExposureTime;
|
|
||||||
//
|
|
||||||
// iRes = SingleShot(dfTemp);
|
|
||||||
// if (iRes != 0)
|
|
||||||
// {
|
|
||||||
// qDebug() << "Err:PerformAutoExposure Failed.Exit Code:2";
|
|
||||||
// return 2;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// HeapSort(dfTemp.lData, m_daDeviceAttr.iPixels);
|
|
||||||
//
|
|
||||||
// double dSum = 0;
|
|
||||||
// int iCount = m_daDeviceAttr.iPixels / 100;
|
|
||||||
// for (int i = 0; i < iCount; i++)
|
|
||||||
// {
|
|
||||||
// dSum += dfTemp.lData[i];
|
|
||||||
// }
|
|
||||||
// double dTemp = dSum / iCount;
|
|
||||||
//
|
|
||||||
// if (dTemp >= iDeviceDepth * 0.99)
|
|
||||||
// {
|
|
||||||
// bIsValueOverflow = true;
|
|
||||||
// if (!bIsLastValueOverflow)
|
|
||||||
// {
|
|
||||||
// fExposureTime = (float)(fLastExposureTime + fExposureTime) / 2;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// fExposureTime = fExposureTime / 2;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// else if (iDeviceDepth * fMaxScaleFactor >= dTemp && dTemp >= iDeviceDepth * fMinScaleFactor)
|
|
||||||
// {
|
|
||||||
// bFlagIsAutoExposureOK = 1;
|
|
||||||
// }
|
|
||||||
// else if (dTemp > iDeviceDepth * fMaxScaleFactor)
|
|
||||||
// {
|
|
||||||
// bIsValueOverflow = true;
|
|
||||||
// if (!bIsLastValueOverflow)
|
|
||||||
// {
|
|
||||||
// fExposureTime = (float)(fLastExposureTime + fExposureTime) / 2;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// fExposureTime = fExposureTime * 3 / 4;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// else if (dTemp < iDeviceDepth * fMinScaleFactor)
|
|
||||||
// {
|
|
||||||
// bIsValueOverflow = false;
|
|
||||||
// if (bIsLastValueOverflow)
|
|
||||||
// {
|
|
||||||
// fExposureTime = (float)(fLastExposureTime + fExposureTime) / 2;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// double dFactor;
|
|
||||||
// dFactor = dTemp / (iDeviceDepth * fMaxScaleFactor);
|
|
||||||
// fExposureTime = (float)(fExposureTime / dFactor);
|
|
||||||
// }
|
|
||||||
// if (/*fExposureTime > 100 || */fExposureTime < 10)
|
|
||||||
// {
|
|
||||||
// bFlagIsAutoExposureOK = false;
|
|
||||||
// bFlagIsAutoExposureFailed = true;
|
|
||||||
// bFlagIsLowerMinExposureTime = true;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// bIsLastValueOverflow = bIsValueOverflow;
|
|
||||||
// fLastExposureTime = fTempExposureTime;
|
|
||||||
//
|
|
||||||
// if (fExposureTime > 13000)
|
|
||||||
// {
|
|
||||||
// bFlagIsAutoExposureOK = false;
|
|
||||||
// bFlagIsAutoExposureFailed = true;
|
|
||||||
// fPredictedExposureTime = 13000;
|
|
||||||
// iRes = SetExposureTime(13000);
|
|
||||||
// if (iRes != 0)
|
|
||||||
// {
|
|
||||||
// qDebug() << "Err:PerformAutoExposure Failed.Exit Code:3";
|
|
||||||
// return 3;
|
|
||||||
// }
|
|
||||||
// bFlagIsOverMaxExposureTime = true;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// iRes = SetExposureTime((int)fExposureTime);
|
|
||||||
// if (iRes != 0)
|
|
||||||
// {
|
|
||||||
// qDebug() << "Err:PerformAutoExposure Failed.Exit Code:4";
|
|
||||||
// return 3;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// fPredictedExposureTime = fExposureTime;
|
|
||||||
// return 0;
|
|
||||||
|
|
||||||
int m_iThreadID=0;
|
int m_iThreadID=0;
|
||||||
// qDebug() << "--------------------------Starting PerformAutoExposure" << " Thread ID:" << m_iThreadID;
|
// qDebug() << "--------------------------Starting PerformAutoExposure" << " Thread ID:" << m_iThreadID;
|
||||||
using namespace ZZ_MATH;
|
using namespace ZZ_MATH;
|
||||||
@ -687,9 +624,6 @@ int ZZ_ATPControl_Serial_Qt::PerformAutoExposure(float fMinScaleFactor, float fM
|
|||||||
//emit SignalAcqFinished(m_iThreadID, 1);
|
//emit SignalAcqFinished(m_iThreadID, 1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -782,8 +716,9 @@ int ZZ_ATPControl_Serial_Qt::SingleShot(DataFrame& dfData)
|
|||||||
qbSend.resize(3);
|
qbSend.resize(3);
|
||||||
// qbSend[1] = 0x00;
|
// qbSend[1] = 0x00;
|
||||||
// qbSend[2] = 0x01;
|
// qbSend[2] = 0x01;
|
||||||
qbSend[1] = m_iExposureTime >> 8;;
|
int iTemp=m_iExposureTime;
|
||||||
qbSend[2] = m_iExposureTime & 0xFF;
|
qbSend[1] = iTemp >> 8;;
|
||||||
|
qbSend[2] = iTemp & 0xFF;
|
||||||
int iRes = SendCommand(qbSend);
|
int iRes = SendCommand(qbSend);
|
||||||
if (iRes != 0)
|
if (iRes != 0)
|
||||||
{
|
{
|
||||||
@ -826,6 +761,12 @@ int ZZ_ATPControl_Serial_Qt::SingleShot(DataFrame& dfData)
|
|||||||
// dfData.lData[i] = usData[i];
|
// dfData.lData[i] = usData[i];
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
float fTemp;
|
||||||
|
GetDeviceTemperature(fTemp);
|
||||||
|
|
||||||
|
dfData.usExposureTimeInMS = m_iExposureTime;
|
||||||
|
dfData.fTemperature = fTemp;
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -895,7 +836,7 @@ int ZZ_ATPControl_Serial_Qt::GetDeviceTemperature(float& fTemperature)
|
|||||||
qDebug() << "Err:GetDeviceTemperature Failed.Exit Code:1";
|
qDebug() << "Err:GetDeviceTemperature Failed.Exit Code:1";
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
iRes = RecvData(qbRecv);
|
iRes = RecvData_ShortLag(qbRecv);
|
||||||
if (iRes != 0)
|
if (iRes != 0)
|
||||||
{
|
{
|
||||||
qDebug() << "Err:GetDeviceTemperature Failed.Exit Code:2";
|
qDebug() << "Err:GetDeviceTemperature Failed.Exit Code:2";
|
||||||
|
@ -186,7 +186,7 @@ void CalibrationAlgorithm::readAndResample_StandardLightFile(QString filePath, i
|
|||||||
// outfile2 << m_dStandardLightDataBase << std::endl;
|
// outfile2 << m_dStandardLightDataBase << std::endl;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// outfile2 << deviceAttribute.fWaveLengthInNM[i] << "," << dTemp << std::endl;
|
// outfile2 << deviceAttribute.fWaveLengthInNM[i] << "," << m_dStandardLightDataResampled[i] << std::endl;
|
||||||
// }
|
// }
|
||||||
// outfile2.close();
|
// outfile2.close();
|
||||||
}
|
}
|
||||||
@ -228,14 +228,14 @@ void CalibrationAlgorithm::produceCalfile(QString calFilePath, DeviceAttribute d
|
|||||||
fclose(calFileHandle);
|
fclose(calFileHandle);
|
||||||
|
|
||||||
|
|
||||||
// //д<>뵽CSV<53>ļ<EFBFBD>
|
//д<>뵽CSV<53>ļ<EFBFBD>
|
||||||
// QString calFile_csv = calFilePath.split(".")[0] + ".csv";
|
QString calFile_csv = calFilePath.split(".")[0] + ".csv";
|
||||||
// std::ofstream outfile(calFile_csv.toStdString().c_str());
|
std::ofstream outfile(calFile_csv.toStdString().c_str());
|
||||||
// for (int i = 0; i < deviceAttribute.iPixels; i++)
|
for (int i = 0; i < deviceAttribute.iPixels; i++)
|
||||||
// {
|
{
|
||||||
// outfile << deviceAttribute.fWaveLengthInNM[i] << "," << m_gain[i] << std::endl;
|
outfile << deviceAttribute.fWaveLengthInNM[i] << "," << m_gain[i] << std::endl;
|
||||||
// }
|
}
|
||||||
// outfile.close();
|
outfile.close();
|
||||||
|
|
||||||
delete[] m_gain;
|
delete[] m_gain;
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,10 @@ int main(int argc, char *argv[])
|
|||||||
case CommandLineOk:
|
case CommandLineOk:
|
||||||
break;
|
break;
|
||||||
case CommandLineError:
|
case CommandLineError:
|
||||||
fputs(qPrintable(errorMessage), stderr);
|
errorMessage = "<br><b style=\"color:red\">" + errorMessage + "s!</b>";
|
||||||
|
logout(errorMessage);
|
||||||
|
|
||||||
|
// fputs(qPrintable(errorMessage), stderr);
|
||||||
fputs("\n\n", stderr);
|
fputs("\n\n", stderr);
|
||||||
fputs(qPrintable(parser.helpText()), stderr);
|
fputs(qPrintable(parser.helpText()), stderr);
|
||||||
return 1;
|
return 1;
|
||||||
@ -78,12 +81,14 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƕ<EFBFBD><C7B6><EFBFBD>
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƕ<EFBFBD><C7B6><EFBFBD>
|
||||||
FiberSpectrometerOperationBase * m_FiberSpectrometer;
|
FiberSpectrometerOperationBase * m_FiberSpectrometer;
|
||||||
switch (query.deviceType)
|
switch (query.deviceType)
|
||||||
{
|
{
|
||||||
case OPTOSKY:
|
case OPTOSKY:
|
||||||
m_FiberSpectrometer = new ATPFiberImager(false,"ttyUSB0","ocean_optics");
|
m_FiberSpectrometer = new ATPFiberImager(false,query.serialPort.toStdString(),"ocean_optics");
|
||||||
break;
|
break;
|
||||||
case OceanOptics:
|
case OceanOptics:
|
||||||
m_FiberSpectrometer = new OceanOpticsFiberImager();
|
m_FiberSpectrometer = new OceanOpticsFiberImager();
|
||||||
@ -342,13 +347,15 @@ CommandLineParseResult parseCommandLine2(QCommandLineParser &parser, TcQuery *qu
|
|||||||
QString selector = parser.value(standardLightFileSelector);
|
QString selector = parser.value(standardLightFileSelector);
|
||||||
// QString standardLightFilePath_tmp = QDir::cleanPath(QDir::rootPath() + QDir::separator() + "standardLightFile" + QDir::separator() + selector);
|
// QString standardLightFilePath_tmp = QDir::cleanPath(QDir::rootPath() + QDir::separator() + "standardLightFile" + QDir::separator() + selector);
|
||||||
|
|
||||||
QString tmp = "/home/data/Setting/standardLightFile";
|
QString tmp = "/home/data/Setting/StandardLightFile";
|
||||||
QString standardLightFilePath_tmp = tmp + QDir::separator() + selector;
|
QString standardLightFilePath_tmp = tmp + QDir::separator() + selector;
|
||||||
|
|
||||||
|
string xx=standardLightFilePath_tmp.toStdString();
|
||||||
|
|
||||||
//<2F>ж϶<D0B6><CFB6><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
//<2F>ж϶<D0B6><CFB6><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
||||||
if (!isFileExist(standardLightFilePath_tmp))
|
if (!isFileExist(standardLightFilePath_tmp))
|
||||||
{
|
{
|
||||||
*errorMessage = "No standard light file set.";
|
*errorMessage = "Standard light file '" + selector + "' does not exist!";
|
||||||
return CommandLineError;
|
return CommandLineError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ void OceanOpticsFiberImager::recordTarget(int recordTimes, QString path)
|
|||||||
// QString fileName = path + "/" + currentTime + "_" + QString::fromStdString(deviceInfo.strSN) + "_integratingSphereSpectral.csv";
|
// QString fileName = path + "/" + currentTime + "_" + QString::fromStdString(deviceInfo.strSN) + "_integratingSphereSpectral.csv";
|
||||||
// std::ofstream outfile(fileName.toStdString().c_str());
|
// std::ofstream outfile(fileName.toStdString().c_str());
|
||||||
//
|
//
|
||||||
// for (int i = 0; i < attribute.iPixels; i++)
|
// for (int i = 0; i < attribute.iPixels; i++)//
|
||||||
// {
|
// {
|
||||||
// if (i==0)
|
// if (i==0)
|
||||||
// {
|
// {
|
||||||
|
Reference in New Issue
Block a user