1、在界面上实现选择相机类型的功能; 2、创建了一个光谱仪操作的纯虚基类(ImagerOperationBase)并实现了大部分的操作,具体类型的光谱仪应继承此类并实现纯虚函数; 3、添加了 resonon 的 nir 320 相机,修改 resonon 的 pica l 相机的实现:继承 ImagerOperationBase; 4、重构类 QMotorDoubleSlider,提高其通用性,所有马达相关的 slider 都使用此类; 5、适配 resonon nir 320 显微镜使用的 2 轴线性平台,有些特殊的马达参数设置(setMotorParamMicroscope 函数)绑定了 nir 的相机类型参数; 6、修改:将线性平台的量程信息保存在cfg配置文件中,并修改配置文件读写类来读写此量程信息;
53 lines
1.2 KiB
C++
53 lines
1.2 KiB
C++
//
|
|
// Created by tangchao on 2023/3/25.
|
|
//
|
|
|
|
#ifndef XIMEAIMAGERECORDER_CONFIGFILE_H
|
|
#define XIMEAIMAGERECORDER_CONFIGFILE_H
|
|
|
|
#include <iostream>
|
|
#include <iomanip>
|
|
#include <cstdlib>
|
|
#include <libconfig.h++>
|
|
#include <string>
|
|
|
|
#include <QFileInfo>
|
|
#include <QString>
|
|
#include <QCoreApplication>
|
|
#include <QDir>
|
|
|
|
#include "utility_tc.h"
|
|
|
|
using namespace std;
|
|
using namespace libconfig;
|
|
|
|
class Configfile
|
|
{
|
|
|
|
public:
|
|
Configfile();
|
|
void setConfigfilePath(string configfilePath);
|
|
bool isConfigfileExist();
|
|
bool parseConfigfile();
|
|
|
|
bool getSN(string& SN);
|
|
|
|
bool getPositionRestriction(int& max, int& min);
|
|
bool getTuningStepSize(int& coarse, int& fine);
|
|
bool getFitParams(float& fa, float& fb);
|
|
bool getAutoFocusRange(int& max, int& min);
|
|
|
|
bool getXMotorParm(float& StepAnglemar, float& Lead, int& SubdivisionMultiples, float& ScaleFactor, float& MaxRange);
|
|
bool getYMotorParm(float& StepAnglemar, float& Lead, int& SubdivisionMultiples, float& ScaleFactor, float& MaxRange);
|
|
bool setMaxRange(float maxRange, QString x_y);
|
|
bool writeConfig2File();
|
|
|
|
bool createConfigFile();
|
|
bool updateConfigFile();
|
|
|
|
private:
|
|
string m_configfilePath;
|
|
Config cfg;
|
|
};
|
|
#endif //XIMEAIMAGERECORDER_CONFIGFILE_H
|