新增 + 修改

1. 分离空间维(水平)和光谱维(垂直)的bin1和bin2有效窗口的参数:configfile.cpp和ximeaimager.cpp都需要修改相应代码;
2. 为了减少光谱仪的热量累积,加入了usb开电、断电功能,udpserver.cpp需要增加相应开电、断电代码:
3. 使用了云一峰的新板子,linux识别的惯导串口号改变:sbgrecorder.cpp;
This commit is contained in:
tangchao0503
2022-10-13 16:30:40 +08:00
parent 374a48022b
commit 87a35f5dd4
6 changed files with 123 additions and 54 deletions

View File

@ -37,14 +37,16 @@ void XimeaImager::openImger()
//std::cout<<"XimeaImager::openImger111111111111111111111:正在打开相机!"<<std::endl;
m_imager.connect();
bool ret;
bool ret, ret1, ret2;
int bin=0;
ret = m_configfile.getBin(bin);
if (ret)
int spatialBin;
int spectralBin;
ret1 = m_configfile.getspatialBin(spatialBin);
ret2 = m_configfile.getSpectralBin(spectralBin);
if (ret1 & ret2)
{
bool haha = m_imager.setSpectralBin(bin);
bool haha2 = m_imager.setSpatialBin(bin);
bool haha = m_imager.setSpectralBin(spectralBin);
bool haha2 = m_imager.setSpatialBin(spatialBin);
}
float gain, offset;//用于生成头文件中的波长信息
@ -132,7 +134,7 @@ void XimeaImager::setFramerate(double framerate)
{
m_imager.set_framerate(framerate);
int maxExposureTimeInUs=1/framerate*1000000*0.8;
int maxExposureTimeInUs=1/framerate*1000000*0.01;
setExposureTime(maxExposureTimeInUs);
// setExposureTime(1000);