
1. 分离空间维(水平)和光谱维(垂直)的bin1和bin2有效窗口的参数:configfile.cpp和ximeaimager.cpp都需要修改相应代码; 2. 为了减少光谱仪的热量累积,加入了usb开电、断电功能,udpserver.cpp需要增加相应开电、断电代码: 3. 使用了云一峰的新板子,linux识别的惯导串口号改变:sbgrecorder.cpp;
44 lines
933 B
C++
44 lines
933 B
C++
//
|
|
// Created by tangchao on 2022/6/28.
|
|
//
|
|
|
|
#ifndef XIMEAIMAGERECORDER_CONFIGFILE_H
|
|
#define XIMEAIMAGERECORDER_CONFIGFILE_H
|
|
|
|
#include <iostream>
|
|
#include <iomanip>
|
|
#include <cstdlib>
|
|
#include <libconfig.h++>
|
|
|
|
#include <QFileInfo>
|
|
#include <QString>
|
|
#include <QCoreApplication>
|
|
#include <QDir>
|
|
|
|
using namespace std;
|
|
using namespace libconfig;
|
|
|
|
class Configfile
|
|
{
|
|
|
|
public:
|
|
Configfile();
|
|
void setConfigfilePath(string configfilePath);
|
|
bool isConfigfileExist();
|
|
bool parseConfigfile();
|
|
|
|
bool getSpectralBin(int &spectralBin);
|
|
bool getspatialBin(int &spatialBin);
|
|
bool getEffectiveWindow(int &width, int &offsetx, int &height, int &offsety);
|
|
bool getEffectiveWindowRoi(int &width, int &offsetx);
|
|
bool getGainOffset(float &gain, float &offset);
|
|
|
|
bool createConfigFile();
|
|
bool updateConfigFile();
|
|
|
|
private:
|
|
string m_configfilePath;
|
|
Config cfg;
|
|
};
|
|
#endif //XIMEAIMAGERECORDER_CONFIGFILE_H
|