mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2026-05-04 20:13:48 +08:00
Compare commits
164 Commits
zhangzhuo
...
eb713ff9a3
| Author | SHA1 | Date | |
|---|---|---|---|
| eb713ff9a3 | |||
| c99ba84638 | |||
| 29b40826a0 | |||
| c6faf2d8d4 | |||
| ad0c4149e6 | |||
| a7a2e559ef | |||
| fe80b88677 | |||
| 527c23e30e | |||
| 6f65684ddb | |||
| 4ebbea7bc9 | |||
| d6dadec3cc | |||
| 0b250c8970 | |||
| ae65847576 | |||
| cabffe0709 | |||
| 08b44aec8d | |||
| e84f8d32b5 | |||
| f04f058b9c | |||
| 3bff0c266a | |||
| bd46759395 | |||
| 181ff9e9c6 | |||
| 084edcac53 | |||
| ce8857811b | |||
| a388377ea3 | |||
| e588ed55b0 | |||
| f07a3ba783 | |||
| 37e998dcce | |||
| 54e89bb81f | |||
| a0b93df2f7 | |||
| 5ad21e71bd | |||
| 5947968c1b | |||
| d466c1a53c | |||
| d929c7f0e4 | |||
| b06596ac92 | |||
| a605b1a6e6 | |||
| 5e0402a424 | |||
| 0ff26a98b7 | |||
| 02eded270d | |||
| ba66f60f63 | |||
| 8a04cf630e | |||
| 9f30a61568 | |||
| 10f57947cf | |||
| 6cac8bde4f | |||
| e699a415f9 | |||
| 6c2afc1fc1 | |||
| 71a28e0304 | |||
| 24fb72e0bc | |||
| a2f4f425ec | |||
| f660397697 | |||
| df7b38da2f | |||
| 017d69fdeb | |||
| 90e9c23596 | |||
| 40fa2301b9 | |||
| 0cc5ab6210 | |||
| ff48d5ac0e | |||
| 0aee19931f | |||
| 1ddee80516 | |||
| f2bd257609 | |||
| 13a729dcbd | |||
| e1699fd179 | |||
| e4beb219a4 | |||
| de2feb9fe0 | |||
| ffcdc03dcd | |||
| 7eb50adf8f | |||
| bf9c70810c | |||
| 70a3c251e3 | |||
| ad43c0031e | |||
| eac09d5e8e | |||
| 6efc883425 | |||
| ea69f3efcb | |||
| 2b5cffcd85 | |||
| 797a8014d0 | |||
| 87392bebac | |||
| cc494f3894 | |||
| b85484e401 | |||
| d3833caa8c | |||
| 95425e754a | |||
| 366bac7a2c | |||
| 51575f9e99 | |||
| 02bc0feb96 | |||
| c96c634250 | |||
| 1b51cec57c | |||
| 7a08496869 | |||
| 80e4ce0b00 | |||
| 2b9de45d6a | |||
| 8ddbd93020 | |||
| 2dea0bff35 | |||
| 25ce84e882 | |||
| e7132df842 | |||
| b5771ca64f | |||
| 92fe58d0c3 | |||
| 70fde7f131 | |||
| d836695571 | |||
| ed9a854e8b | |||
| b5065db641 | |||
| 309acb1afd | |||
| a41649f8eb | |||
| 50db7e6aa4 | |||
| db164c6e9e | |||
| f7b1bc3c58 | |||
| 9cf224113c | |||
| 2a205d142a | |||
| c5d551345c | |||
| 70d9474ff3 | |||
| ec4b0496e4 | |||
| dd2fe42256 | |||
| 09890f18a0 | |||
| 2a6ff870b9 | |||
| a21a74c125 | |||
| 17eece11a4 | |||
| 9c4a54f935 | |||
| 4bc9780269 | |||
| 9277b1aedd | |||
| 021123d384 | |||
| 2d14e467cd | |||
| 1c4ce952f5 | |||
| f9d7b0fd46 | |||
| f128e35000 | |||
| 5b0ecc5d02 | |||
| 088f2dfd8e | |||
| a7aba25b67 | |||
| b470876cfe | |||
| 600f415b56 | |||
| a670a01bc8 | |||
| de3316c248 | |||
| 77877ae28e | |||
| 88eb43ec91 | |||
| 8ae261b190 | |||
| 714de8a00a | |||
| 6ce5b62c58 | |||
| 63fe91de2c | |||
| 5a0a7989e9 | |||
| 6d08e4e049 | |||
| 9e6c17b265 | |||
| bbb70e611a | |||
| f4eea468d2 | |||
| f0ecbb8710 | |||
| 5b44f94a64 | |||
| 04318e7c26 | |||
| 96c9a58288 | |||
| fd5859e21e | |||
| df059ea72d | |||
| 2f4b1b5a71 | |||
| 3f620a2243 | |||
| b66820bdd3 | |||
| ad31346a9c | |||
| b76cbf600b | |||
| 31be2399b9 | |||
| fd97dc4a83 | |||
| 9ca4b432d0 | |||
| 59ad213ae5 | |||
| f8670a0d33 | |||
| c22459c135 | |||
| fd10d275ab | |||
| bebef6bef6 | |||
| 8d73aba000 | |||
| f818b02ff9 | |||
| e5feafd975 | |||
| 1731d03668 | |||
| 7b1349c8c7 | |||
| 80c1ee5dfe | |||
| 2557b45518 | |||
| 89bba3bd3e | |||
| 17a6fc89ec | |||
| 4818cc1088 |
13
.gitignore
vendored
13
.gitignore
vendored
@ -6,3 +6,16 @@
|
||||
/.vs
|
||||
/build_d
|
||||
/html/.idea
|
||||
/out
|
||||
/cmake-build-debug/
|
||||
/.idea
|
||||
/othersoft/shuttercali/project/LocationCali/build/
|
||||
/Data/2022_01_11
|
||||
/othersoft/movingliner/build
|
||||
/othersoft/calibration_console/.idea/
|
||||
/othersoft/calibration_console/build/
|
||||
/othersoft/shuttercali/project/LocationCali/cmake-build-debug
|
||||
/othersoft/calibration_console/cmake-build-debug/
|
||||
/othersoft/movingliner/cmake-build-debug/
|
||||
/othersoft/movingliner/cmake-build-debug-toweris2/
|
||||
/othersoft/movingliner/cmake-build-release/
|
||||
|
||||
42
CMakeLists.txt
Normal file
42
CMakeLists.txt
Normal file
@ -0,0 +1,42 @@
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
|
||||
project(TowerOptoSifAndSpectral)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(QT Core Network WebSockets SerialPort Widgets)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
find_package(Qt5 REQUIRED ${QT})
|
||||
|
||||
|
||||
file(GLOB_RECURSE HDR_LIST "source/*.h")
|
||||
file(GLOB_RECURSE SRC_LIST "source/*.cpp")
|
||||
|
||||
include_directories("source")
|
||||
include_directories("source/FS")
|
||||
include_directories("source/Logger")
|
||||
include_directories("source/ZZ_SDK")
|
||||
include_directories("source/Settings")
|
||||
include_directories("source/CaptureThread")
|
||||
include_directories("source/LinearShutter")
|
||||
include_directories("source/OSIF/include")
|
||||
include_directories("source/Misc_Detector")
|
||||
include_directories("source/Uploader")
|
||||
|
||||
link_directories("source/OSIF/DLib")
|
||||
link_directories("/home/pi/SeaBrease/lib")
|
||||
add_executable( TowerOptoSifAndSpectral
|
||||
main.cpp
|
||||
${HDR_LIST}
|
||||
${SRC_LIST}
|
||||
)
|
||||
IF (WIN32)
|
||||
target_link_libraries(TowerOptoSifAndSpectral SeaBreeze)
|
||||
ELSE ()
|
||||
target_link_libraries(TowerOptoSifAndSpectral seabreeze usb stdc++ m)
|
||||
ENDIF ()
|
||||
qt5_use_modules(TowerOptoSifAndSpectral ${QT})
|
||||
set_target_properties(TowerOptoSifAndSpectral PROPERTIES AUTOMOC ON)
|
||||
|
||||
|
||||
@ -1,30 +1,53 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux-GCC-Debug",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "Debug",
|
||||
"cmakeExecutable": "/zz/cmake-3.29.3/bin/cmake",
|
||||
"remoteCopySourcesExclusionList": [ ".vs", ".git", "out" ],
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": "",
|
||||
"inheritEnvironments": [ "linux_arm" ],
|
||||
"remoteMachineName": "-1273990714;172.16.0.61 (username=root, port=22, authentication=Password)",
|
||||
"remoteCMakeListsRoot": "/home/pi/SIF0/src",
|
||||
"remoteBuildRoot": "/home/pi/SIF0/out/build_d/${name}",
|
||||
"remoteInstallRoot": "/home/pi/SIF0/out/install/${name}",
|
||||
"remoteCopySources": true,
|
||||
"rsyncCommandArgs": "-t --delete --delete-excluded",
|
||||
"remoteCopyBuildOutput": true,
|
||||
"remoteCopySourcesMethod": "rsync",
|
||||
"remoteCopyUseCompilerDefaults": false
|
||||
},
|
||||
{
|
||||
"name": "x64-Debug",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "Debug",
|
||||
"inheritEnvironments": [
|
||||
"msvc_x64_x64"
|
||||
],
|
||||
"buildRoot": "${workspaceRoot}/build_d",
|
||||
"installRoot": "${workspaceRoot}/build_d",
|
||||
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"buildCommandArgs": "-v",
|
||||
"ctestCommandArgs": ""
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": "",
|
||||
"inheritEnvironments": [ "msvc_x64_x64" ]
|
||||
},
|
||||
{
|
||||
"name": "x64-Release",
|
||||
"generator": "Ninja",
|
||||
"name": "Linux-GCC-R",
|
||||
"generator": "Unix Makefiles",
|
||||
"configurationType": "Release",
|
||||
"inheritEnvironments": [
|
||||
"msvc_x64_x64"
|
||||
],
|
||||
"buildRoot": "${workspaceRoot}/build_r",
|
||||
"installRoot": "${workspaceRoot}/build_r",
|
||||
"cmakeCommandArgs": "",
|
||||
"buildCommandArgs": "-v",
|
||||
"ctestCommandArgs": ""
|
||||
"cmakeExecutable": "/opt/cmake/bin/cmake",
|
||||
"remoteCopySourcesExclusionList": [ ".vs", ".git", "out" ],
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": "",
|
||||
"inheritEnvironments": [ "linux_arm" ],
|
||||
"intelliSenseMode": "linux-gcc-x64",
|
||||
"remoteMachineName": "-1784524891;172.16.0.71 (username=root, port=22, authentication=Password)",
|
||||
"remoteCMakeListsRoot": "/home/pi/SIF0/src_r",
|
||||
"remoteBuildRoot": "/home/pi/SIF0/out/build_r/${name}",
|
||||
"remoteInstallRoot": "/home/pi/SIF0/out/install_r/${name}",
|
||||
"remoteCopySources": true,
|
||||
"rsyncCommandArgs": "-t --delete --delete-excluded",
|
||||
"remoteCopyBuildOutput": true,
|
||||
"remoteCopySourcesMethod": "rsync"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,10 +1,10 @@
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(TowerOptoSifAndSpectral)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(QT Core Network WebSockets SerialPort Widgets)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
find_package(Qt5 REQUIRED ${QT})
|
||||
|
||||
@ -24,16 +24,18 @@ include_directories("source/Misc_Detector")
|
||||
include_directories("source/Uploader")
|
||||
|
||||
link_directories("source/OSIF/DLib")
|
||||
|
||||
link_directories("/home/pi/SeaBrease/lib")
|
||||
add_executable( TowerOptoSifAndSpectral
|
||||
main.cpp
|
||||
${HDR_LIST}
|
||||
${SRC_LIST}
|
||||
)
|
||||
IF (WIN32)
|
||||
target_link_libraries(TowerOptoSifAndSpectral SeaBreeze)
|
||||
ELSE ()
|
||||
target_link_libraries(TowerOptoSifAndSpectral seabreeze usb stdc++ m)
|
||||
ENDIF ()
|
||||
qt5_use_modules(TowerOptoSifAndSpectral ${QT})
|
||||
|
||||
|
||||
set_target_properties(TowerOptoSifAndSpectral PROPERTIES AUTOMOC ON)
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
[DEVICE INFO]
|
||||
TotalSpectrometer=1
|
||||
[FS1]
|
||||
Model=IS1
|
||||
Model=ISIF
|
||||
Port=COM7
|
||||
UID=21351029
|
||||
AEMax=0.85
|
||||
|
||||
@ -1 +1 @@
|
||||
{"BeginTime":"8:00","IntervalTime":"10","EndTime":"18:00","Location":"beijing","GPS_Longtitude":"117","GPS_Latitude":"118","GPS_Altitude":"50","GPS_North":"on","InstallationTime":"2021-11-18","ISIFCalibrationTime":"2021-11-26","IS1CalibrationTime":"2021-11-19","NameOfMaintenanceStaff":"renlixin","PhoneNumberOfMaintenanceStaff":"110110110","DownloadUserID":"newuser","DownlaodAddress":"http:\/\/www.iris-rs.cn","SIFUpCalFile":"dat1","SIFDownCalFile1":"dat2","SIFDownCalFile2":"dat2","SIFDownCalFile3":"dat3","IS1UpCalFile":"dat1","IS1DownCalFile1":"sdaf","IS1DownCalFile2":"dat2","IS1DownCalFile3":"asdf","HTTPServer":"192.168.2.1"}
|
||||
{"BeginTime":"08:00","IntervalTime":"02","EndTime":"23:00","Dev_SN":"0000001","Location":"beijing","GPS_North":"on","GPS_Longtitude":"117","GPS_Latitude":"41","GPS_Altitude":"100","InstallationTime":"2021-12-24","ISIFCalibrationTime":"2021-12-24","IS1CalibrationTime":"2021-12-24","NameOfMaintenanceStaff":"renlixin","PhoneNumberOfMaintenanceStaff":"1110010010","DownloadUserID":"xin","DownlaodAddress":"http:\/\/www.iris-rs.cn","HTTPServer":"http:\/\/82.156.1.111","OSIFAlpha_CaliFileMainName":""}
|
||||
@ -3,41 +3,36 @@
|
||||
参会人员:任立新 韩善龍 张卓
|
||||
|
||||
1. **文件名称定义**
|
||||
|
||||
英文地名_起始时间_结束时间 精确到秒 时间 年_月_日_时_分_秒
|
||||
|
||||
英文地名_起始时间_结束时间 精确到秒 时间 年_月_日_时_分_秒
|
||||
|
||||
2. **路径定义**
|
||||
|
||||
|
||||
```
|
||||
总路径 /home/data
|
||||
/Setting
|
||||
/Data
|
||||
/2021_10_15
|
||||
/Beijing_2021_10_15_15_31_00_2021_10_15_15_31_50.csv
|
||||
/2021_10_16
|
||||
/Log
|
||||
其他
|
||||
|
||||
/Setting
|
||||
/Data
|
||||
/2021_10_15
|
||||
/Beijing_2021_10_15_15_31_00_2021_10_15_15_31_50.csv
|
||||
/2021_10_16
|
||||
/Log
|
||||
其他
|
||||
```
|
||||
|
||||
|
||||
|
||||
3. **数据内容确定**
|
||||
|
||||
|
||||
```
|
||||
按照《SIF加地物光谱仪本地数据存储格式说明.pdf》存储
|
||||
```
|
||||
|
||||
|
||||
|
||||
4. **shutter切换顺序**
|
||||
|
||||
|
||||
```
|
||||
U1->D1->D2->D3 U1是向上光纤 D1、D2、D3由用户定义
|
||||
```
|
||||
|
||||
5. **自动曝光上限及方式**
|
||||
|
||||
|
||||
```
|
||||
上限:40秒
|
||||
IS1曝光完成后 等待ISIF自动曝光
|
||||
@ -45,14 +40,14 @@
|
||||
```
|
||||
|
||||
6. **数据采集流程**
|
||||
|
||||
|
||||
```
|
||||
自动曝光->暗电流->采集数据
|
||||
执行过程中 IS1需要等待ISIF往常当前步骤 在执行下一操作
|
||||
```
|
||||
|
||||
7. **异常报警**
|
||||
|
||||
|
||||
```
|
||||
以下情况需要推送异常
|
||||
1、不返回数据
|
||||
@ -63,18 +58,13 @@
|
||||
```
|
||||
|
||||
8. **采集时间间隔**
|
||||
|
||||
|
||||
```
|
||||
采用间隔法 采集间隔最小30分钟
|
||||
```
|
||||
|
||||
9. **添加温湿度传感器**
|
||||
|
||||
|
||||
```
|
||||
添加温湿度传感器
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
117
document/20211123 研发会议记录.md
Normal file
117
document/20211123 研发会议记录.md
Normal file
@ -0,0 +1,117 @@
|
||||
# 20211123 研发会议记录
|
||||
|
||||
*参会人员:任立新 韩善龍 张卓 唐超*
|
||||
|
||||
##### 名称确认
|
||||
|
||||
海洋光学系列
|
||||
|
||||
1. OSIF_α :QEPro
|
||||
|
||||
2. OSIF_β :QE6500
|
||||
|
||||
奥普天成
|
||||
|
||||
1. ISIF : ATP6500
|
||||
|
||||
2. IS1 : ATP1010
|
||||
|
||||
3. IS2 : ATP5020
|
||||
|
||||
应用平台
|
||||
|
||||
1. 塔上平台
|
||||
|
||||
2. 便携式
|
||||
|
||||
快门
|
||||
|
||||
1. 双通道光闸
|
||||
|
||||
2. 多通道光闸
|
||||
|
||||
光纤
|
||||
|
||||
1. 一分二熔接光纤
|
||||
- 50:50
|
||||
|
||||
- 75:25
|
||||
|
||||
- 90:10
|
||||
2. 单芯光纤
|
||||
- 200um
|
||||
- 400um
|
||||
- 1000um
|
||||
|
||||
|
||||
##### 项目基本情况介绍
|
||||
|
||||
两个系统
|
||||
|
||||
- ISIF+IS1+多通道光闸+光纤+塔上系统
|
||||
- OSIF++多通道光闸+光纤+塔上系统
|
||||
|
||||
张负责ISIF+IS1系统及控制的实现
|
||||
|
||||
唐负责OSIF基础类的编写
|
||||
|
||||
##### 4
|
||||
|
||||
0为暗背景
|
||||
|
||||
1为向上
|
||||
|
||||
##### 唐超与张卓初步确认了传感基类的具体接口 会后深入讨论
|
||||
|
||||
```c++
|
||||
class CIrisFSBase
|
||||
{
|
||||
public:
|
||||
//CIrisFSBase();
|
||||
//virtual ~CIrisFSBase()= 0;
|
||||
public:
|
||||
//初始化设备
|
||||
//此处string为指明连接哪个ocean光谱仪的参数,可自行更换为其他c/c++标准类型
|
||||
//0为无错误,不同错误请返回不同值
|
||||
virtual int Initialize(bool bIsUSBMode,ZZ_U8 ucPortNumber,std::string) = 0;
|
||||
|
||||
//关闭设备
|
||||
virtual void Close() = 0;
|
||||
|
||||
//单次数据采集
|
||||
virtual int SingleShot(DataFrame &dfData) = 0;
|
||||
|
||||
//设置曝光时间
|
||||
virtual int SetExposureTime(int iExposureTimeInMS) = 0;
|
||||
|
||||
//获取曝光时间设置
|
||||
virtual int GetExposureTime(int &iExposureTimeInMS) = 0;
|
||||
|
||||
//设置目标温度
|
||||
virtual int SetDeviceTemperature(float fTemperature) = 0;
|
||||
|
||||
//获取温度设置
|
||||
virtual int GetDeviceTemperature(float &fTemperature) = 0;
|
||||
|
||||
//获取设备信息
|
||||
virtual int GetDeviceInfo(DeviceInfo &Info) = 0;
|
||||
|
||||
//获取设备特征数据
|
||||
virtual int GetDeviceAttribute(DeviceAttribute &Attr) = 0;
|
||||
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### 张卓重新规划下整体框架
|
||||
|
||||
##### 快门控制从传感器Class移除,放置到控制Class中
|
||||
|
||||
##### 不实现便携式SIF逻辑
|
||||
|
||||
##### 不实现双通道shutter
|
||||
|
||||
##### 光纤名称改为0,1,2,3,
|
||||
|
||||
|
||||
@ -6,29 +6,29 @@
|
||||
|
||||
数据分为数据区域与数据描述区
|
||||
|
||||
# 一 数据描述区
|
||||
# 一 数据描述区
|
||||
|
||||
即元数据 元数据(Metadata),又称中介数据、中继数据,为描述数据的数据(data about data),主要是描述数据属性。本设备元数据主要包含以下六部分内容
|
||||
|
||||
**红色为配置文件给出 蓝色存疑**
|
||||
|
||||
## 1.1、环境信息
|
||||
## 1.1、环境信息
|
||||
|
||||
包括自然环境与人工环境
|
||||
|
||||
### 自然环境信息
|
||||
### 自然环境信息
|
||||
|
||||
**时间信息**:主要记录数据开始采集时间,时间信息统一采用UTC时间 格林威治时间。世界统一时间、世界标准时间、国际协调时间、世界协调时间,UTC协调世界时即格林威治平太阳时间,是指格林威治所在地的标准时间,也是表示地球自转速率的一种形式,UTC基于国际原子时间,通过不规则的加入闰秒来抵消地球自转变慢的影响,是世界上调节时钟和时间的主要时间标准。其中年月日中间以下划线“_”(英文输入法 ASCII 95)分割。其中年用4位数表示,月和日均两位,如下所示
|
||||
|
||||
XXXX_XX_XX
|
||||
XXXX_XX_XX
|
||||
|
||||
时间采取24小时制,时间中间以冒号“:”分割,均以两位填充,不足两位补零格式如下
|
||||
|
||||
XX:XX:XX
|
||||
XX:XX:XX
|
||||
|
||||
年与时间中间以空格分开最终格式如下所示
|
||||
|
||||
XXXX_XX_XX XX:XX:XX
|
||||
XXXX_XX_XX XX:XX:XX
|
||||
|
||||
**<font color='red'>地点:</font>**设备所处的行政范围 具体到乡。一个设备应该对应唯一地点,一个地点可以对应多个设备
|
||||
|
||||
@ -72,8 +72,6 @@
|
||||
|
||||
**<font color='red'>定标文件下载路径</font>**:云服务的路径
|
||||
|
||||
|
||||
|
||||
*注意:上述顺序不代表数据存储数据,数据以键 值进行存储,在读取时应进行键值判断。*
|
||||
|
||||
## 1.2、ISIF设备信息
|
||||
@ -110,7 +108,7 @@
|
||||
|
||||
**....** : ....
|
||||
|
||||
## 1.3、ISIF波长数据
|
||||
## 1.3、ISIF波长数据
|
||||
|
||||
**ISIF设备的波长文件:**波长数据,采用两位有效数字
|
||||
|
||||
@ -148,38 +146,36 @@
|
||||
|
||||
**....** : ....
|
||||
|
||||
## 1.5、IS1波长数据
|
||||
## 1.5、IS1波长数据
|
||||
|
||||
**光谱设备的波长文件** :波长数据,采用两位有效数字
|
||||
|
||||
# 二 数据区
|
||||
# 二 数据区
|
||||
|
||||
<font color='red'>规则:</font>
|
||||
|
||||
1. <font color='red'>数据名称定义如下 ISIF_UP1、ISIF_D1、ISIF_D2、ISIF_D3、IS1_UP1、IS1_D1、IS1_D2、IS1_D3</font>
|
||||
1. 光纤明明为P1,P2,P3,P4
|
||||
2. <font color='red'>数据存储按行来 一行数据存储</font>
|
||||
3. <font color='red'>单行数据中第一列为数据名称 名称按第一条规则定义</font>
|
||||
4. <font color='red'>第二列数据为数据状态表示 valid有效 invalid表示无效</font>
|
||||
5. <font color='red'>单行数据中从第三列开始为数据 数据采用整形存储</font>
|
||||
|
||||
|
||||
|
||||
## 三 数据展示
|
||||
|
||||
```csv
|
||||
TotalSpectrometer,2
|
||||
environmental factor,Date,XXXX_XX_XX XX:XX:XX,Location,Beijing_Haidian
|
||||
ISIFInfo,ISIF_SN,10085,Shutter1,100
|
||||
Device1_Info,Modle,ISIF,SN,10085,......
|
||||
wavelenth,300.00,301.00,.........
|
||||
IS1Info,IS1_SN,10085,Shutter1,100
|
||||
Device2_Info,Modle,IS1,SN,10085,......
|
||||
wavelenth,300.00,301.00,.........
|
||||
Data_header
|
||||
ISIF_U1,valid,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
ISIF_D1,valid,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
ISIF_D2,valid,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
ISIF_D3,valid,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
IS1_UP1,valid,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
IS1_D1,valid,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
IS1_D2,valid,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
IS1_D3,valid,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
Data_Start
|
||||
Device1_P1,valid,shuttertime,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
Device1_P2,valid,shuttertime,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
Device1_P3,valid,shuttertime,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
Device1_P4,valid,shuttertime,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
Device2_P1,valid,shuttertime,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
Device2_P2,valid,shuttertime,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
Device2_P3,valid,shuttertime,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
Device2_P4,valid,shuttertime,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data,data
|
||||
```
|
||||
|
||||
|
||||
@ -6,25 +6,39 @@
|
||||
<link rel="stylesheet" type="text/css" href="/css/config.css">
|
||||
</head>
|
||||
<body class="body" >
|
||||
<div>
|
||||
<h1 class="title1">Sif And Spectral</h1>
|
||||
</div>
|
||||
<div style="margin-left:auto;margin-right:auto;width:80%;" >
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td width="100px">程序运行状态</td>
|
||||
<td width="50px" id="statid"></td>
|
||||
<td ></td>
|
||||
<td><input type="button" value="重启" onclick="rebootclicked()"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<form action="/php/config.php" method="POST" >
|
||||
<div style="margin-left:auto;margin-right:auto;width:80%;" >
|
||||
<div>
|
||||
<h1 class="title1">Sif And Spectral</h1>
|
||||
</div>
|
||||
|
||||
<div class="mainframe" >
|
||||
<table class="linetb">
|
||||
<tr>
|
||||
<td><h2>Control Setting</h2></td>
|
||||
<td><h2>控制设置</h2></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div align="center">
|
||||
<table class="linetb" >
|
||||
|
||||
<tr style="width:80%">
|
||||
<td style="width:33%">Begin Time
|
||||
|
||||
<td style="width:33%">开始时间
|
||||
<input type="time" id="BeginTime" name="BeginTime" class="TextInput"></td>
|
||||
<td style="width:33%">Interval Time
|
||||
<td style="width:33%">时间间隔
|
||||
<input type="number" id="IntervalTime" name="IntervalTime" class="TextInput"></td>
|
||||
<td style="width:33%">End Time
|
||||
<td style="width:33%">停止时间
|
||||
<input type="time" id="EndTime" class="TextInput" name="EndTime"></td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -32,18 +46,21 @@
|
||||
<p></p>
|
||||
<p></p>
|
||||
<div>
|
||||
<h2>Data Header</h2>
|
||||
<h2>描述信息</h2>
|
||||
</div>
|
||||
<div align="center">
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
|
||||
<td>设备序列号 <input class="TextInput" id="Dev_SN" name="Dev_SN" value="1000000"></td>
|
||||
<td>地点 <input class="TextInput" name="Location" id="Location"></td>
|
||||
<td>GPS_Longtitude <input type="text" class="TextInput" name="GPS_Longtitude" id="GPS_Longtitude"></td>
|
||||
<td>GPS_Latitude <input type="text" class="TextInput" name="GPS_Latitude" id="GPS_Latitude"> </td>
|
||||
<td>北半球 <input type="checkbox" name="GPS_North" id="GPS_North"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GPS_Atitude <input type="text" class="TextInput" name="GPS_Atitude" id="GPS_Atitude"> </td>
|
||||
<td>Is North Earth <input type="checkbox" name="GPS_North" id="GPS_North"> </td>
|
||||
<td>GPS经度 <input type="text" class="TextInput" name="GPS_Longtitude" id="GPS_Longtitude"></td>
|
||||
<td>GPS经度 <input type="text" class="TextInput" name="GPS_Latitude" id="GPS_Latitude"> </td>
|
||||
<td>GPS高程 <input type="text" class="TextInput" name="GPS_Atitude" id="GPS_Atitude"> </td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<p></p>
|
||||
@ -64,35 +81,8 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h2>ISIF设备信息</h2>
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td>向上定标文件名 <input type="text" id="SIFupCaliFile" name="SIFupCaliFile"></td>
|
||||
<div id="devinfo">
|
||||
|
||||
<td>向下定标文件名1 <input type="text" id="SIFdownCaliFile1" name="SIFdownCaliFile1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>向下定标文件名2 <input type="text" id="SIFdownCaliFile2" name="SIFdownCaliFile2"></td>
|
||||
<td>向下定标文件名3 <input type="text" id="SIFdownCaliFile3" name="SIFdownCaliFile3"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h2>IS1设备信息</h2>
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td>向上定标文件名 <input type="text" id="IS1upCaliFile" name="IS1upCaliFile"></td>
|
||||
|
||||
<td>向下定标文件名1 <input type="text" id="IS1downCaliFile1" name="IS1downCaliFile1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>向下定标文件名2 <input type="text" id="IS1downCaliFile2" name="IS1downCaliFile2"></td>
|
||||
<td>向下定标文件名3 <input type="text" id="IS1downCaliFile3" name="IS1downCaliFile3"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
59
html/config/LocationCali.php
Normal file
59
html/config/LocationCali.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
//var_dump($_GET);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$sensor=$_GET['sensor'];
|
||||
$number=$_GET['positionnumber'];
|
||||
$shuter=$_GET['shutterTime'];
|
||||
|
||||
set_time_limit(0);
|
||||
ob_end_clean();//清空(擦除)缓冲区并关闭输出缓冲
|
||||
ob_implicit_flush(1);//将打开或关闭绝对(隐式)刷送。绝对(隐式)刷送将导致在每次输出调用后有一次刷送操作,以便不再需要对 flush() 的显式调用
|
||||
system("sudo gpio mode 1 out");
|
||||
system("sudo gpio write 1 1");
|
||||
system("sudo killall Mywathdog.sh");
|
||||
system("sudo killall TowerOptoSifAndSpectral");
|
||||
system("sudo pkill shutter_calibrate");
|
||||
|
||||
|
||||
$cmd = 'sudo /home/pi/bin/shutter_calibrate '.$sensor." ".$number.' '.$shuter;
|
||||
echo $cmd.'<br>';
|
||||
|
||||
while(@ ob_end_flush());
|
||||
|
||||
$proc = popen($cmd, 'r');
|
||||
|
||||
|
||||
while(!feof($proc)){
|
||||
echo fread($proc, 4096);
|
||||
@ flush();
|
||||
}
|
||||
echo "<br>";
|
||||
echo "finish";
|
||||
|
||||
echo '<a href=/config/position.html>回到首页</a>';
|
||||
|
||||
$file=fopen('/home/data/test.csv','r');
|
||||
|
||||
while ($data = fgetcsv($file)) { //每次读取CSV里面的一行内容
|
||||
//print_r($data); //此为一个数组,要获得每一个数据,访问数组下标即可
|
||||
$goods_list[] = $data;
|
||||
}
|
||||
|
||||
//var_dump($goods_list[0]);
|
||||
$hang=count($goods_list);
|
||||
$x=$goods_list[0][2];
|
||||
$y=$goods_list[0][1];;
|
||||
for($i=1;$i<$hang;$i++)
|
||||
{
|
||||
$x=$x.','.$goods_list[$i][2];
|
||||
$y=$y.','.$goods_list[$i][1];
|
||||
}
|
||||
echo '<div id="main" style="width: 600px;height:400px;"></div> ';
|
||||
|
||||
echo ' <script src="/config/js/echarts.js"></script>';
|
||||
echo '<script>var xx=['.$x.']; var yy=['.$y.']; </script>';
|
||||
echo '<script src="/config/js/printercaliresult.js"></script>';
|
||||
98
html/config/calibrate.php
Normal file
98
html/config/calibrate.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
$position=$_GET["p"];
|
||||
$sensorType=$_GET["sensor"];
|
||||
$nite=$_GET['nite'];
|
||||
if ($position==0)
|
||||
{
|
||||
echo "error";
|
||||
return;
|
||||
}
|
||||
set_time_limit(0);
|
||||
ob_end_clean();//清空(擦除)缓冲区并关闭输出缓冲
|
||||
ob_implicit_flush(1);//将打开或关闭绝对(隐式)刷送。绝对(隐式)刷送将导致在每次输出调用后有一次刷送操作,以便不再需要对 flush() 的显式调用
|
||||
//echo shell_exec("D:\\03MyGit\\linux\\movingliner\\cmake-build-debug-mingw\\movingliner.exe");
|
||||
echo "application beging<br>";
|
||||
//$cmd = 'ping 127.0.0.1';
|
||||
$ini=parse_ini_file("/home/data/Setting/DeviceSettings.ini",true);
|
||||
|
||||
$numberofsensor=intval($ini['DEVICE INFO']['TotalSpectrometer']);
|
||||
$numberofFS=0;
|
||||
for($i=0;$i<$numberofsensor;$i++){
|
||||
$tempsens=$ini['FS'.($i+1)]['Model'];
|
||||
if ($sensorType==$tempsens)
|
||||
{
|
||||
$numberofFS=$i+1;
|
||||
break;
|
||||
}
|
||||
if ($i==$numberofsensor-1)
|
||||
{
|
||||
echo "cannot find the sensor";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
system("sudo killall Mywathdog.sh");
|
||||
system("sudo killall TowerOptoSifAndSpectral");
|
||||
system("sudo pkill ocean_optics_calibration_console");
|
||||
system("sudo gpio write 1 1");
|
||||
$cmd="";
|
||||
|
||||
|
||||
|
||||
|
||||
if ($position==1)
|
||||
{
|
||||
if($sensorType=="OSIFAlpha"||$sensorType=="OSIFBeta")
|
||||
{
|
||||
$cmd = 'sudo /home/pi/bin/ocean_optics_calibration_console --deviceType OceanOptics -t 30 -slfs IrrLamp.txt --cfon FSN'.$sensorType.$position.'.data --position '.$position.' --integratingSphereDetectorValue '.$nite;
|
||||
}
|
||||
else{
|
||||
$port=$ini['FS'.($i+1)]['Port'];
|
||||
getonestring($port,'/');
|
||||
getonestring($port,'/');
|
||||
$cmd = 'sudo /home/pi/bin/ocean_optics_calibration_console --deviceType OPTOSKY --serialPort '.$port.' -t 30 -slfs IrrLamp.txt --cfon FSN'.$sensorType.$position.'.data --position '.$position.' --integratingSphereDetectorValue '.$nite;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if($sensorType=="OSIFAlpha"||$sensorType=="OSIFBeta")
|
||||
{
|
||||
$cmd = 'sudo /home/pi/bin/ocean_optics_calibration_console --deviceType OceanOptics -t 30 -slfs RadLamp.txt --cfon FSN'.$sensorType.$position.'.data --position '.$position.' --integratingSphereDetectorValue '.$nite;
|
||||
}else{
|
||||
$port=$ini['FS'.($i+1)]['Port'];
|
||||
getonestring($port,'/');
|
||||
getonestring($port,'/');
|
||||
$cmd = 'sudo /home/pi/bin/ocean_optics_calibration_console --deviceType OPTOSKY --serialPort '.$port.' -t 30 -slfs RadLamp.txt --cfon FSN'.$sensorType.$position.'.data --position '.$position.' --integratingSphereDetectorValue '.$nite;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo $cmd;
|
||||
|
||||
while(@ ob_end_flush());
|
||||
|
||||
$proc = popen($cmd, 'r');
|
||||
|
||||
|
||||
while(!feof($proc)){
|
||||
echo fread($proc, 4096);
|
||||
@ flush();
|
||||
}
|
||||
echo 'FINISH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ';
|
||||
echo '<a href=/config/position.html>回到首页</a>';
|
||||
|
||||
function getonestring(&$bytes,$fenge)
|
||||
{
|
||||
$pattern = '{^.*?'.$fenge.'}';
|
||||
$lenth=strlen($fenge);
|
||||
preg_match($pattern, $bytes, $aa, PREG_OFFSET_CAPTURE);
|
||||
$bytes = substr($bytes, strlen($aa[0][0]));
|
||||
$bb = substr($aa[0][0], 0, -$lenth);
|
||||
return $bb;
|
||||
}
|
||||
95096
html/config/js/echarts.js
Normal file
95096
html/config/js/echarts.js
Normal file
File diff suppressed because it is too large
Load Diff
30
html/config/js/printercaliresult.js
Normal file
30
html/config/js/printercaliresult.js
Normal file
@ -0,0 +1,30 @@
|
||||
var chartDom = document.getElementById('main');
|
||||
var myChart = echarts.init(chartDom);
|
||||
// 指定图表的配置项和数据
|
||||
var option = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: [1,2,3,4,5,6]
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
tooltip:{
|
||||
trigger:'axis'
|
||||
},
|
||||
dataZoom:[{
|
||||
type:"inside" //详细配置可见echarts官网
|
||||
}],
|
||||
series: [
|
||||
{
|
||||
name: 'DN',
|
||||
data: [150, 230, 224, 218, 135, 147, 260],
|
||||
type: 'line'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
option.xAxis.data=xx;
|
||||
option.series[0].data=yy;
|
||||
option
|
||||
myChart.setOption(option);
|
||||
66
html/config/location.php
Normal file
66
html/config/location.php
Normal file
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
$a=$_GET["p"];
|
||||
|
||||
if ($a==0)
|
||||
{
|
||||
echo "error";
|
||||
return;
|
||||
}
|
||||
set_time_limit(0);
|
||||
ob_end_clean();//清空(擦除)缓冲区并关闭输出缓冲
|
||||
ob_implicit_flush(1);//将打开或关闭绝对(隐式)刷送。绝对(隐式)刷送将导致在每次输出调用后有一次刷送操作,以便不再需要对 flush() 的显式调用
|
||||
//echo shell_exec("D:\\03MyGit\\linux\\movingliner\\cmake-build-debug-mingw\\movingliner.exe");
|
||||
//$cmd = 'ping 127.0.0.1';
|
||||
//sy""
|
||||
system("sudo killall Mywathdog.sh");
|
||||
system("sudo killall TowerOptoSifAndSpectral");
|
||||
system("sudo pkill movingliner");
|
||||
Echo $a;
|
||||
$cmd = 'sudo /home/pi/bin/movingliner '.$a;
|
||||
|
||||
while(@ ob_end_flush());
|
||||
|
||||
$proc = popen($cmd, 'r');
|
||||
|
||||
|
||||
while(!feof($proc)){
|
||||
echo fread($proc, 4096);
|
||||
@ flush();
|
||||
}
|
||||
|
||||
|
||||
echo '<form action="/config/calibrate.php" method="get" target="_blank">';
|
||||
|
||||
echo '设备<input id="sensor" name="sensor" type="text" list="typelist" placeholder="请选择">
|
||||
|
||||
<datalist id="typelist">
|
||||
<option>IS1</option>
|
||||
<option>IS2</option>
|
||||
<option>ISIF</option>
|
||||
<option>OSIFAlpha</option>
|
||||
<option>OSIFBeta</option>
|
||||
</datalist>';
|
||||
echo '尼特 <input type="number" name="nite" id="nite"/>';
|
||||
echo '<input id="p" name="p" type="hidden" value="'.$a.'">';
|
||||
echo '<input type="submit" value="定标">';
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
||||
echo '<a href=/config/position.html>回到首页</a>';
|
||||
|
||||
/*
|
||||
$i = 100;
|
||||
while ($i<1000) {
|
||||
++$i;
|
||||
//部分浏览器需要内容达到一定长度了才输出
|
||||
if ($i === 103) {
|
||||
echo"<p>hello word".$i."</p>";;
|
||||
} else {
|
||||
echo"<p>hello word".$i."</p>";;
|
||||
}
|
||||
sleep(1);
|
||||
|
||||
}
|
||||
*/
|
||||
66
html/config/position.html
Normal file
66
html/config/position.html
Normal file
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="/config/location.php?p=1">位置1</a>
|
||||
<a href="/config/location.php?p=2">位置2</a>
|
||||
<a href="/config/location.php?p=3">位置3</a>
|
||||
<a href="/config/location.php?p=4">位置4</a>
|
||||
<a href="/config/location.php?p=5">位置5</a>
|
||||
<a href="/config/location.php?p=12">位置try</a>
|
||||
|
||||
<form action="LocationCali.php" method="get">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
位置自动计算:
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>设备<input id="sensor" name="sensor" type="text" list="typelist" placeholder="请选择">
|
||||
|
||||
<datalist id="typelist">
|
||||
<option>IS1</option>
|
||||
<option>IS2</option>
|
||||
<option>ISIF</option>
|
||||
<option>OSIFAlpha</option>
|
||||
<option>OSIFBeta</option>
|
||||
</datalist>
|
||||
</td>
|
||||
<td>
|
||||
预估位置数量
|
||||
<input id="positionnumber" name="positionnumber" type="number" list="positionnumbertypelist" placeholder="请选择">
|
||||
|
||||
<datalist id="positionnumbertypelist">
|
||||
<option>1</option>
|
||||
<option>2</option>
|
||||
<option>3</option>
|
||||
<option>4</option>
|
||||
<option>5</option>
|
||||
<option>6</option>
|
||||
<option>7</option>
|
||||
<option>8</option>
|
||||
<option>9</option>
|
||||
<option>10</option>
|
||||
</datalist>
|
||||
</td>
|
||||
<td>
|
||||
曝光事件
|
||||
<input id="shutterTime" name="shutterTime" type="number" value="10">ms
|
||||
</td>
|
||||
<td>
|
||||
<input type="submit" value="开始">
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
100
html/index.html
Normal file
100
html/index.html
Normal file
@ -0,0 +1,100 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<link rel="stylesheet" type="text/css" href="/css/config.css">
|
||||
</head>
|
||||
<body class="body" >
|
||||
<div>
|
||||
<h1 class="title1">Sif And Spectral</h1>
|
||||
</div>
|
||||
<div style="margin-left:auto;margin-right:auto;width:80%;" >
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td width="100px">程序运行状态</td>
|
||||
<td width="50px" id="statid"></td>
|
||||
<td ></td>
|
||||
<td><input type="button" value="重启" onclick="rebootclicked()"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<form action="/php/config.php" method="POST" >
|
||||
<div style="margin-left:auto;margin-right:auto;width:80%;" >
|
||||
|
||||
<div class="mainframe" >
|
||||
<table class="linetb">
|
||||
<tr>
|
||||
<td><h2>控制设置</h2></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div align="center">
|
||||
<table class="linetb" >
|
||||
|
||||
<tr style="width:80%">
|
||||
|
||||
<td style="width:33%">开始时间
|
||||
<input type="time" id="BeginTime" name="BeginTime" class="TextInput"></td>
|
||||
<td style="width:33%">时间间隔
|
||||
<input type="number" id="IntervalTime" name="IntervalTime" class="TextInput"></td>
|
||||
<td style="width:33%">停止时间
|
||||
<input type="time" id="EndTime" class="TextInput" name="EndTime"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<div>
|
||||
<h2>描述信息</h2>
|
||||
</div>
|
||||
<div align="center">
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
|
||||
<td>设备序列号 <input class="TextInput" id="Dev_SN" name="Dev_SN" value="1000000"></td>
|
||||
<td>地点 <input class="TextInput" name="Location" id="Location"></td>
|
||||
<td>北半球 <input type="checkbox" name="GPS_North" id="GPS_North"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GPS经度 <input type="text" class="TextInput" name="GPS_Longtitude" id="GPS_Longtitude"></td>
|
||||
<td>GPS维度 <input type="text" class="TextInput" name="GPS_Latitude" id="GPS_Latitude"> </td>
|
||||
<td>GPS高程 <input type="text" class="TextInput" name="GPS_Altitude" id="GPS_Altitude"> </td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<p></p>
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td>安装时间 <input type="date" name="InstallationTime" id="InstallationTime"></td>
|
||||
<td>ISIF定标时间 <input type="date" name="ISIFCalibrationTime" id="ISIFCalibrationTime"> </td>
|
||||
<td>IS1定标时间 <input type="date" name="IS1CalibrationTime" id="IS1CalibrationTime"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>设备维护人员 <input type="text" class="TextInput" name="NameOfMaintenanceStaff" id="NameOfMaintenanceStaff"></td>
|
||||
<td>维护人员电话 <input type="number" name="PhoneNumberOfMaintenanceStaff" id="PhoneNumberOfMaintenanceStaff" style="width: 100px" ></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>远程资源用户ID <input type="text" name="DownloadUserID" class="TextInput" id="DownloadUserID"></td>
|
||||
<td>定标文件下载路径<input type="url" name="DownlaodAddress" id="DownlaodAddress"></td>
|
||||
<td>远程服务器<input type="url" name="HTTPServer" id="HTTPServer"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div id="devinfo">
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2></h2>
|
||||
<input type="submit" value="提交" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript" src="/javascript/comment.js"></script>
|
||||
<script type="text/javascript" src="/javascript/config.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -17,9 +17,45 @@ function getConfigRentrun(reson)
|
||||
|
||||
}
|
||||
}
|
||||
function getDevinfoRetrun(retrun)
|
||||
{
|
||||
var div=document.getElementById('devinfo');
|
||||
div.innerHTML=retrun;
|
||||
init()
|
||||
}
|
||||
function getstataRetrun(retrun){
|
||||
var div=document.getElementById('statid');
|
||||
div.innerHTML=retrun;
|
||||
}
|
||||
|
||||
|
||||
var datad;
|
||||
function init()
|
||||
{
|
||||
httpget("/php/GetConfig.php",datad,getConfigRentrun)
|
||||
|
||||
}
|
||||
window.onload=init;
|
||||
|
||||
function getinit()
|
||||
{
|
||||
httpget("/php/GetIniFile.php",datad,getDevinfoRetrun)
|
||||
httpget("/php/GetSata.php",datad,getstataRetrun)
|
||||
}
|
||||
|
||||
function rebootclicked()
|
||||
{
|
||||
|
||||
httpget("/php/reboot.php",datad,getrebootRentrun)
|
||||
var div=document.getElementById('statid');
|
||||
div.innerHTML="";
|
||||
|
||||
}
|
||||
function getrebootRentrun(ret)
|
||||
{
|
||||
alert(ret)
|
||||
|
||||
setTimeout(() => {
|
||||
location.reload()
|
||||
}, 100);
|
||||
}
|
||||
window.onload=getinit;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
header("Content-type:application/json");
|
||||
$a=file_get_contents("config.json");
|
||||
$a=file_get_contents("/home/data/Setting/config.json");
|
||||
echo $a;
|
||||
|
||||
17
html/php/GetIniFile.php
Normal file
17
html/php/GetIniFile.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$a=parse_ini_file("/home/data/Setting/DeviceSettings.ini",true);
|
||||
|
||||
$numberofsensor=intval($a['DEVICE INFO']['TotalSpectrometer']);
|
||||
$b=array_values($a);
|
||||
|
||||
echo '<h2>设备信息</h2>';
|
||||
echo '设备数量 '.$numberofsensor.'';
|
||||
echo '<table>';
|
||||
for ($i=0;$i<$numberofsensor;$i++)
|
||||
{
|
||||
echo '<tr>';
|
||||
echo '<td>'.$b[$i+1]['Model'].'_定标文件主名称'.'</td>';
|
||||
echo '<td><input type="text" id="'.$b[$i+1]['Model'].'_CaliFileMainName'.'" name="'.$b[$i+1]['Model'].'_CaliFileMainName'.'"></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</table>';
|
||||
10
html/php/GetSata.php
Normal file
10
html/php/GetSata.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
exec("ps -ef | grep TowerOptoSifAndSpectral | grep -v grep",$output,$return);
|
||||
//var_dump( $output);
|
||||
if ( count($output)>0)
|
||||
{
|
||||
echo '<div style="width: 40px;height: 20px;background: green"></div>';
|
||||
}else{
|
||||
echo '<div style="width: 40px;height: 20px;background: red"></div>';
|
||||
}
|
||||
@ -1 +1 @@
|
||||
{"BeginTime":"16:43","IntervalTime":"500","EndTime":"16:45","Location":"beijing","GPS_Longtitude":"117","GPS_Latitude":"118","GPS_Atitude":"50","GPS_North":"on","InstallTime":"2021-11-18","ISIFCalibrationTime":"2021-11-26","IS1CalibrationTime":"2021-11-19","NameOfMaintenance":"renlixin","PhoneOfMaintenance":"110110110","DownloadUserID":"newuser","DownlaodAddress":"http:\/\/www.iris-rs.cn","SIFupCaliFile":"dat1","SIFdownCaliFile1":"dat2","SIFdownCaliFile2":"dat2","SIFdownCaliFile3":"dat3","IS1upCaliFile":"dat1","IS1downCaliFile1":"sdaf","IS1downCaliFile2":"dat2","IS1downCaliFile3":"asdf"}
|
||||
{"BeginTime":"","IntervalTime":"","EndTime":"","Dev_SN":"1000000","Location":"","GPS_Longtitude":"","GPS_Latitude":"","GPS_Atitude":"","InstallTime":"","ISIFCalibrationTime":"","IS1CalibrationTime":"","NameOfMaintenance":"","PhoneOfMaintenance":"","DownloadUserID":"","DownlaodAddress":""}
|
||||
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
|
||||
file_put_contents("config.json",json_encode($_POST));
|
||||
var_dump($_POST);
|
||||
exec("sudo touch /home/data/Setting/config.json");
|
||||
exec("sudo chmod 777 /home/data/Setting/config.json");
|
||||
file_put_contents("/home/data/Setting/config.json",json_encode($_POST));
|
||||
echo "提交成功";
|
||||
8
html/php/reboot.php
Normal file
8
html/php/reboot.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
ignore_user_abort(true);
|
||||
set_time_limit(0);
|
||||
echo system("sudo killall Mywathdog.sh");
|
||||
echo system("sudo killall TowerOptoSifAndSpectral");
|
||||
echo system("sudo ./reboot.sh &");
|
||||
echo "系统已重启";
|
||||
//var_dump($output);
|
||||
3
html/php/reboot.sh
Normal file
3
html/php/reboot.sh
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
/root/Mywathdog.sh>>log.txt &
|
||||
|
||||
0
install.sh
Normal file
0
install.sh
Normal file
62
main.cpp
62
main.cpp
@ -7,8 +7,8 @@
|
||||
#include "Scheduler.h"
|
||||
#include "GY39Controller.h"
|
||||
#include "MainDataUploader.h"
|
||||
#include "VSMD12XMovementTest.h"
|
||||
using namespace std;
|
||||
#pragma once
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@ -18,9 +18,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
QCoreApplication a(argc, argv);
|
||||
|
||||
|
||||
system("gpio mode 1 output");//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ų<EFBFBD>ʼ<EFBFBD><CABC>
|
||||
qDebug() << "gpio mode 1 output......" << endl;
|
||||
//////////////////////////////////////////////////////////////////////////for test
|
||||
//MovementTest m_testVSMD12X;
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//system("gpio mode 1 output");//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ų<EFBFBD>ʼ<EFBFBD><CABC>
|
||||
//qDebug() << "gpio mode 1 output......" << endl;
|
||||
//
|
||||
//ZZ_ATPControl_Serial_Qt test;
|
||||
//test.Initialize(0, "/dev/ttyS1", "2223344");
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////
|
||||
GY39Controller m_ctrlHumitureDetector;
|
||||
@ -49,9 +54,32 @@ int main(int argc, char *argv[])
|
||||
QT_LOG::ZZ_InitLogger("/home/data/Log/");
|
||||
//////////////////////////////////////////////////////////////////////////config
|
||||
///turn on power supply
|
||||
system("gpio write 1 1");//<2F>豸<EFBFBD>ϵ<EFBFBD>
|
||||
qDebug() << "gpio write 1 1......" << endl;
|
||||
|
||||
//////add support to dual channel
|
||||
int iRet0 = 0,iRet1 = 0,iRet2 = 0,iRet3 = 0;
|
||||
iRet0 = system("gpio mode 1 out");
|
||||
iRet1 = system("gpio mode 4 out");
|
||||
iRet2 = system("gpio mode 5 out");
|
||||
iRet3 = system("gpio write 1 1");//上电
|
||||
|
||||
qDebug() << "gpio 1;4;5; ready"<<" Ret:"<< iRet0<< iRet1<< iRet2<< endl;
|
||||
qDebug() << "gpio write 1 1......" <<" Ret:"<< iRet3<< endl;
|
||||
|
||||
// QString qstrCMD_A, qstrCMD_B, qstrCMD_Temp;
|
||||
// qstrCMD_Temp = QString::fromStdString("4");
|
||||
// qDebug() << qstrCMD_Temp << endl;
|
||||
// qstrCMD_A = "gpio write " + qstrCMD_Temp + " 0";
|
||||
//
|
||||
// qstrCMD_Temp = QString::fromStdString("5");
|
||||
// qDebug() << qstrCMD_Temp << endl;
|
||||
// qstrCMD_B = "gpio write " + qstrCMD_Temp + " 0";
|
||||
//
|
||||
// qDebug() << qstrCMD_A << endl;
|
||||
// qDebug() << qstrCMD_B << endl;
|
||||
// system(qstrCMD_A.toLatin1());
|
||||
// system(qstrCMD_B.toLatin1());
|
||||
|
||||
QThread::msleep(5000);
|
||||
bRes = m_scConfiggerLoader.Initialize();
|
||||
if (bRes)
|
||||
{
|
||||
@ -61,18 +89,21 @@ int main(int argc, char *argv[])
|
||||
m_scConfiggerLoader.GetParams(m_struRuntimeParams, m_struEC, m_struMEC, m_struHumitureDI);
|
||||
|
||||
m_sTimer.SetAcqTimeParams(m_struRuntimeParams.atsParams);
|
||||
m_dfpSaver.SetEnvironmentContex(m_struEC);
|
||||
m_dfpSaver.SetManmadeEnviromentalContext(m_struMEC);
|
||||
|
||||
m_mduUploader.SetContext(m_struEC, m_struMEC);
|
||||
m_mduUploader.Initialize();
|
||||
//m_ctrlHumitureDetector.Initialize(m_struHumitureDI.qstrInterfaceName.toStdString());
|
||||
//m_mduUploader.SetContext(m_struEC, m_struMEC);
|
||||
//m_mduUploader.Initialize();
|
||||
m_ctrlHumitureDetector.Initialize(m_struHumitureDI.qstrInterfaceName.toStdString());
|
||||
//////////////////////////////////////////////////////////////////////////prepare
|
||||
m_sTimer.Preheating();
|
||||
//m_ctrlHumitureDetector.GetHumiture_retry(m_fChassisTemp, m_fChassisHum);
|
||||
//m_sTimer.Preheating();
|
||||
m_ctrlHumitureDetector.GetHumiture_retry(m_fChassisTemp, m_fChassisHum);
|
||||
m_ctrlHumitureDetector.GetHumiture_retry(m_fChassisTemp, m_fChassisHum);
|
||||
|
||||
m_struEC.qstrCaseTemperature= QString("%1").arg(m_fChassisTemp);
|
||||
m_struEC.qstrCaseHumidity = QString("%1").arg(m_fChassisHum);
|
||||
|
||||
m_dfpSaver.SetEnvironmentContex(m_struEC);
|
||||
m_dfpSaver.SetManmadeEnviromentalContext(m_struMEC);
|
||||
m_mduUploader.SetContext(m_struEC, m_struMEC);
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
QThread* m_pqDataGrabberThreadHolder = new QThread();
|
||||
QThread* m_pqTimerThreadHolder = new QThread();
|
||||
@ -98,9 +129,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
m_mdgGrabber.Init_Self();
|
||||
m_sTimer.SelfStart();
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////test
|
||||
// DataFileProcessor testdp;
|
||||
// ZZ_SysConfigger test;
|
||||
@ -185,8 +213,6 @@ int main(int argc, char *argv[])
|
||||
// qfCalFile.read((char*)OneFile.fWaveLength, sizeof(double)*OneFile.iPixels);
|
||||
// qfCalFile.read((char*)OneFile.dCal_Gain, sizeof(double)*OneFile.iPixels);
|
||||
// qfCalFile.read((char*)OneFile.dCal_Offset, sizeof(double)*OneFile.iPixels);
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
return a.exec();
|
||||
|
||||
52
othersoft/calibration_console/CMakeLists.txt
Normal file
52
othersoft/calibration_console/CMakeLists.txt
Normal file
@ -0,0 +1,52 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(ocean_optics_calibration_console)#ocean_optics_calibration_console
|
||||
|
||||
#编译32位的程序
|
||||
#option(USE_32BITS "Compile for 32bits processors(linux only)" OFF)
|
||||
#
|
||||
#
|
||||
#if(USE_32BITS)
|
||||
# message(STATUS "using 32bits")
|
||||
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
|
||||
#
|
||||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
|
||||
#else()
|
||||
#endif(USE_32BITS)
|
||||
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
SET(CMAKE_INSTALL_PREFIX < /home/pi/bin >)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
set(CMAKE_PREFIX_PATH "/home/iris-xport/Qt5.9.0/5.9/gcc_64/")#tc_add: https://blog.csdn.net/aiyun5666/article/details/101915628
|
||||
set(QT Core Network SerialPort)
|
||||
set(TEMPLATE app)
|
||||
set(TARGET ximeaImageRecorder)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
find_package(Qt5 REQUIRED ${QT})
|
||||
|
||||
#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/)
|
||||
include_directories(/home/pi/SeaBrease/include/)
|
||||
LINK_DIRECTORIES(/home/pi/SeaBrease/lib/)
|
||||
|
||||
include_directories(.)#包含头文件
|
||||
include_directories(/usr/include/eigen3)#包含头文件,安装eigen:sudo apt-get install libeigen3-dev
|
||||
|
||||
|
||||
file(GLOB_RECURSE SRC_h ./Header_Files/*.h)
|
||||
file(GLOB_RECURSE SRC_CPP ./Source_Files/*.cpp)
|
||||
|
||||
add_executable(${CMAKE_PROJECT_NAME} ${SRC_h} ${SRC_CPP})
|
||||
|
||||
|
||||
qt5_use_modules(${CMAKE_PROJECT_NAME} ${QT})
|
||||
|
||||
TARGET_LINK_LIBRARIES(${CMAKE_PROJECT_NAME}
|
||||
seabreeze
|
||||
usb
|
||||
)
|
||||
@ -0,0 +1,102 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//ATP<54><50><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
//#include "pch.h"
|
||||
|
||||
#include "ZZ_Types.h"
|
||||
#include "ZZ_Math.h"
|
||||
#include <QSerialPort>
|
||||
#include <QtEndian>
|
||||
#include <QDebug>
|
||||
#include "IrisFiberSpectrometerBase.h"
|
||||
|
||||
using namespace ZZ_MISCDEF;
|
||||
using namespace ZZ_MISCDEF::ATP;
|
||||
using namespace ZZ_MISCDEF::IRIS::FS;
|
||||
|
||||
class ZZ_ATPControl_Serial_Qt:public CIrisFSBase
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ZZ_ATPControl_Serial_Qt(QObject* parent = nullptr);
|
||||
virtual ~ZZ_ATPControl_Serial_Qt();
|
||||
|
||||
public:
|
||||
//do not call
|
||||
//int ReInit();
|
||||
//<2F><><EFBFBD>ò<EFBFBD><C3B2><EFBFBD><EFBFBD><EFBFBD>
|
||||
//int SetBaudRate(int iBaud);
|
||||
//<2F><>ʼ<EFBFBD><CABC><EFBFBD>豸
|
||||
int Initialize(bool bIsUSBMode, std::string ucPortNumber, std::string strDeviceName);
|
||||
|
||||
//<2F>ر<EFBFBD><D8B1>豸
|
||||
void Close();
|
||||
|
||||
//<2F><><EFBFBD>β<EFBFBD><CEB2>Բɼ<D4B2> <20><><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int SingleShot(int &iPixels);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲɼ<DDB2>
|
||||
int SingleShot(DataFrame &dfData);
|
||||
|
||||
//<2F><><EFBFBD>ΰ<EFBFBD><CEB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɼ<EFBFBD>
|
||||
//int SingleShotDark(ATPDataFrame &dfData);
|
||||
|
||||
//int SingleShotDeducted(ATPDataFrame &dfData);
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ع<EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
int SetExposureTime(int iExposureTimeInMS);
|
||||
|
||||
//<2F><>ȡ<EFBFBD>ع<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int GetExposureTime(int &iExposureTimeInMS);
|
||||
|
||||
//int GetWaveLength(float *pfWaveLength);
|
||||
|
||||
//<2F><>ȡ<EFBFBD>豸<EFBFBD><E8B1B8>Ϣ
|
||||
int GetDeviceInfo(DeviceInfo &Info);
|
||||
|
||||
//<2F><>ȡ<EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int GetDeviceAttribute(DeviceAttribute &Attr);
|
||||
|
||||
//int GetDeviceListInfo(); //use type name to enum
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>
|
||||
int SetDeviceTemperature(float fTemperature);
|
||||
|
||||
//<2F><>ȡ<EFBFBD>¶<EFBFBD>
|
||||
int GetDeviceTemperature(float &fTemperature);
|
||||
|
||||
//<2F>Զ<EFBFBD><D4B6>ع<EFBFBD>
|
||||
int PerformAutoExposure(float fMinScaleFactor, float fMaxScaleFactor, float &fPredictedExposureTime);
|
||||
private:
|
||||
int SetAvgTimes(int iTimes = 1);
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
#else //
|
||||
private:
|
||||
#endif
|
||||
//port
|
||||
int m_iBaudRate;
|
||||
QSerialPort *m_pSerialPort;
|
||||
|
||||
//ATP
|
||||
DeviceInfo m_diDeviceInfo;
|
||||
DeviceAttribute m_daDeviceAttr;
|
||||
|
||||
//Attr
|
||||
int m_iExposureTime;
|
||||
//////////////////////////////////////////////////////////////////////////shutter control stub code s
|
||||
//int SetExtShutter(int iShutterUP0, int iShutterDOWN1,int iShutterDOWN2,int iShutterDOWN3); //0:close 1:open
|
||||
//////////////////////////////////////////////////////////////////////////shutter control stub code e
|
||||
int GetExposureTime_Init();
|
||||
int SendCommand(QByteArray qbCommand);
|
||||
int RecvData(QByteArray &qbData);
|
||||
int RecvData_ShortLag(QByteArray &qbData);
|
||||
int ParseData(QByteArray &qbData);
|
||||
public slots:
|
||||
int Init_Self();
|
||||
signals:
|
||||
void SignalInit_Self();
|
||||
//private slots :
|
||||
//void ReadMessage();
|
||||
};
|
||||
@ -0,0 +1,61 @@
|
||||
//
|
||||
// Created by tangchao on 2022/1/11.
|
||||
//
|
||||
|
||||
#ifndef OCEAN_OPTICS_CALIBRATION_CONSOLE_FIBERSPECTROMETEROPERATIONBASE_H
|
||||
#define OCEAN_OPTICS_CALIBRATION_CONSOLE_FIBERSPECTROMETEROPERATIONBASE_H
|
||||
|
||||
|
||||
#include "ZZ_Types.h"
|
||||
|
||||
using namespace ZZ_MISCDEF;
|
||||
using namespace ZZ_MISCDEF::IRIS::FS;
|
||||
|
||||
class FiberSpectrometerOperationBase
|
||||
{
|
||||
|
||||
public:
|
||||
// FiberSpectrometerOperationBase();
|
||||
// ~FiberSpectrometerOperationBase();
|
||||
|
||||
virtual void connectFiberSpectrometer(QString& sn, QString& pixelCount, QString& wavelengthInfo) = 0;
|
||||
virtual void disconnectFiberSpectrometer() = 0;
|
||||
virtual void getDeviceAttribute(DeviceAttribute& deviceAttribute) = 0;
|
||||
virtual void getDeviceInfo(DeviceInfo& deviceInfo) = 0;
|
||||
|
||||
virtual void setExposureTime(int iExposureTimeInMS) = 0;
|
||||
|
||||
virtual void getExposureTime(int &iExposureTimeInMS) = 0;
|
||||
virtual void getDeviceTemperature(float &fTemperature) = 0;
|
||||
|
||||
virtual void singleShot(DataFrame &dfData) = 0;
|
||||
|
||||
// typedef struct coeffs
|
||||
// {
|
||||
// ZZ_U32 coeffsCounter;
|
||||
// double coeffs[100];
|
||||
// }coeffsFrame;
|
||||
virtual void getNonlinearityCoeffs(coeffsFrame &coeffs) = 0;
|
||||
|
||||
|
||||
// ZZ_S32 GetMaxValue(ZZ_S32 * dark, int number) = 0;
|
||||
|
||||
DataFrame m_IntegratingSphereData;
|
||||
DataFrame m_DarkData;
|
||||
protected:
|
||||
ZZ_U32 m_MaxValueOfFiberSpectrometer;
|
||||
private:
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void recordDark(QString path) = 0;
|
||||
virtual void recordTarget(int recordTimes, QString path) = 0;
|
||||
virtual void autoExpose() = 0;
|
||||
|
||||
signals:
|
||||
void sendExposureTimeSignal(int exposureTime);
|
||||
|
||||
};
|
||||
|
||||
#endif //OCEAN_OPTICS_CALIBRATION_CONSOLE_FIBERSPECTROMETEROPERATIONBASE_H
|
||||
@ -0,0 +1,43 @@
|
||||
#include "QObject"
|
||||
#include <string>
|
||||
#include "ZZ_Types.h"
|
||||
#pragma once
|
||||
using namespace ZZ_MISCDEF;
|
||||
using namespace ZZ_MISCDEF::IRIS::FS;
|
||||
|
||||
class CIrisFSBase:public QObject
|
||||
{
|
||||
public:
|
||||
//CIrisFSBase();
|
||||
//virtual ~CIrisFSBase()= 0;
|
||||
public:
|
||||
//<2F><>ʼ<EFBFBD><CABC><EFBFBD>豸
|
||||
//<2F>˴<EFBFBD>stringΪָ<CEAA><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĸ<EFBFBD>ocean<61><6E><EFBFBD><EFBFBD><EFBFBD>ǵIJ<C7B5><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>и<EFBFBD><D0B8><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>c/c++<2B><><EFBFBD><D7BC><EFBFBD><EFBFBD>
|
||||
//0Ϊ<30><EFBFBD><DEB4><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD>뷵<EFBFBD>ز<EFBFBD>ֵͬ
|
||||
virtual int Initialize(bool bIsUSBMode,std::string ucPortNumber,std::string strDeviceName) = 0;
|
||||
|
||||
//<2F>ر<EFBFBD><D8B1>豸
|
||||
virtual void Close() = 0;
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲɼ<DDB2>
|
||||
virtual int SingleShot(DataFrame &dfData) = 0;
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ع<EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
virtual int SetExposureTime(int iExposureTimeInMS) = 0;
|
||||
|
||||
//<2F><>ȡ<EFBFBD>ع<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
virtual int GetExposureTime(int &iExposureTimeInMS) = 0;
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD>¶<EFBFBD>
|
||||
virtual int SetDeviceTemperature(float fTemperature) = 0;
|
||||
|
||||
//<2F><>ȡ<EFBFBD>¶<EFBFBD><C2B6><EFBFBD><EFBFBD><EFBFBD>
|
||||
virtual int GetDeviceTemperature(float &fTemperature) = 0;
|
||||
|
||||
//<2F><>ȡ<EFBFBD>豸<EFBFBD><E8B1B8>Ϣ
|
||||
virtual int GetDeviceInfo(DeviceInfo &Info) = 0;
|
||||
|
||||
//<2F><>ȡ<EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
virtual int GetDeviceAttribute(DeviceAttribute &Attr) = 0;
|
||||
|
||||
};
|
||||
121
othersoft/calibration_console/Header_Files/ZZ_Math.h
Normal file
121
othersoft/calibration_console/Header_Files/ZZ_Math.h
Normal file
@ -0,0 +1,121 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#//#include "Dense"
|
||||
#include "Eigen/Dense"
|
||||
#include <unsupported/Eigen/Splines>
|
||||
#pragma once
|
||||
|
||||
namespace ZZ_MATH
|
||||
{
|
||||
template<typename T>
|
||||
void MinHeapify(T*arry, int size, int element)
|
||||
{
|
||||
int lchild = element * 2 + 1, rchild = lchild + 1;
|
||||
while (rchild < size)
|
||||
{
|
||||
if (arry[element] <= arry[lchild] && arry[element] <= arry[rchild])
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (arry[lchild] <= arry[rchild])
|
||||
{
|
||||
std::swap(arry[element], arry[lchild]);
|
||||
element = lchild;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::swap(arry[element], arry[rchild]);
|
||||
element = rchild;
|
||||
}
|
||||
lchild = element * 2 + 1;
|
||||
rchild = lchild + 1;
|
||||
}
|
||||
if (lchild < size&&arry[lchild] < arry[element])
|
||||
{
|
||||
std::swap(arry[lchild], arry[element]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void MaxHeapify(T*arry, int size, int element)
|
||||
{
|
||||
int lchild = element * 2 + 1, rchild = lchild + 1;
|
||||
while (rchild < size)
|
||||
{
|
||||
if (arry[element] >= arry[lchild] && arry[element] >= arry[rchild])
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (arry[lchild] >= arry[rchild])
|
||||
{
|
||||
std::swap(arry[element], arry[lchild]);
|
||||
element = lchild;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::swap(arry[element], arry[rchild]);
|
||||
element = rchild;
|
||||
}
|
||||
lchild = element * 2 + 1;
|
||||
rchild = lchild + 1;
|
||||
}
|
||||
if (lchild<size&&arry[lchild]>arry[element])
|
||||
{
|
||||
std::swap(arry[lchild], arry[element]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
void HeapSort(T*arry, int size)
|
||||
{
|
||||
int i;
|
||||
for (i = size - 1; i >= 0; i--)
|
||||
{
|
||||
MinHeapify(arry, size, i);
|
||||
}
|
||||
while (size > 0)
|
||||
{
|
||||
std::swap(arry[size - 1], arry[0]);
|
||||
|
||||
size--;
|
||||
MinHeapify(arry, size, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
namespace PolyFit
|
||||
{
|
||||
void Eigen_Polyfit(const std::vector<double> &xv, const std::vector<double> &yv, std::vector<double> &coeff, int order);
|
||||
double Eigen_Polyeval(std::vector<double> coeffs, double x);
|
||||
};
|
||||
|
||||
namespace SplineFit
|
||||
{
|
||||
using namespace Eigen;
|
||||
VectorXd Eigen_Normalize(const VectorXd &x);
|
||||
void Test(std::vector<double> const &x_vec, std::vector<double> const &y_vec);// do not call
|
||||
|
||||
|
||||
class SplineInterpolation
|
||||
{
|
||||
public:
|
||||
SplineInterpolation(Eigen::VectorXd const &x_vec,Eigen::VectorXd const &y_vec);
|
||||
double operator()(double x) const;
|
||||
|
||||
private:
|
||||
double x_min;
|
||||
double x_max;
|
||||
|
||||
double scaled_value(double x) const;
|
||||
Eigen::RowVectorXd scaled_values(Eigen::VectorXd const &x_vec) const;
|
||||
|
||||
Eigen::Spline<double, 1> spline_;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
357
othersoft/calibration_console/Header_Files/ZZ_Types.h
Normal file
357
othersoft/calibration_console/Header_Files/ZZ_Types.h
Normal file
@ -0,0 +1,357 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//<2F><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>ļ<EFBFBD>
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
#pragma pack(1)//<2F>ṹ<EFBFBD>尴<EFBFBD><E5B0B4>1<EFBFBD>ֽڶ<D6BD><DAB6><EFBFBD><EFBFBD>洢
|
||||
|
||||
#include <string>
|
||||
#include <QTime>
|
||||
|
||||
#define MAX_DEVICENUMBER_FS 2
|
||||
#define MAX_LINEARSHUTTER_POSITION 12
|
||||
#define ZZ_Enum2String(x) #x
|
||||
|
||||
namespace ZZ_MISCDEF
|
||||
{
|
||||
typedef unsigned char ZZ_U8;
|
||||
typedef unsigned short int ZZ_U16;
|
||||
typedef unsigned int ZZ_U32;
|
||||
typedef int ZZ_S32;
|
||||
|
||||
|
||||
namespace IRIS
|
||||
{
|
||||
//Fiber Spectrometer
|
||||
namespace FS
|
||||
{
|
||||
typedef struct tagDataFrame
|
||||
{
|
||||
ZZ_U32 usExposureTimeInMS;
|
||||
ZZ_S32 lData[4096];
|
||||
float fTemperature = 0;
|
||||
double dTimes = 0;
|
||||
}DataFrame;
|
||||
|
||||
typedef struct coeffs//tc<74><63><EFBFBD><EFBFBD>-----------------------
|
||||
{
|
||||
ZZ_U32 coeffsCounter;
|
||||
double coeffs[100];
|
||||
}coeffsFrame;
|
||||
|
||||
typedef struct tagDeviceInfo
|
||||
{
|
||||
std::string strPN;
|
||||
std::string strSN;
|
||||
}DeviceInfo;
|
||||
|
||||
typedef struct tagDeviceAttribute
|
||||
{
|
||||
int iPixels;
|
||||
int iMaxIntegrationTimeInMS;
|
||||
int iMinIntegrationTimeInMS;
|
||||
float fWaveLengthInNM[4096];
|
||||
|
||||
}DeviceAttribute;
|
||||
|
||||
// inline DataFrame GetIndex(DataFrame dfDark, DataFrame dfSignal)
|
||||
// {
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
enum DeviceModel
|
||||
{
|
||||
OSIFAlpha=0,
|
||||
OSIFBeta,
|
||||
ISIF,
|
||||
IS1,
|
||||
IS2
|
||||
};
|
||||
|
||||
|
||||
|
||||
inline std::string GetDeviceModelName(int iModel)
|
||||
{
|
||||
switch (iModel)
|
||||
{
|
||||
case DeviceModel::OSIFAlpha: return "OSIFAlpha"; break;
|
||||
case DeviceModel::OSIFBeta: return "OSIFBeta"; break;
|
||||
case DeviceModel::ISIF: return "ISIF"; break;
|
||||
case DeviceModel::IS1: return "IS1"; break;
|
||||
case DeviceModel::IS2: return "IS2"; break;
|
||||
default: return "error"; break;
|
||||
}
|
||||
}
|
||||
|
||||
inline int GetIndex(std::string strDeviceModelName)
|
||||
{
|
||||
if (strDeviceModelName == "OSIFAlpha")
|
||||
{
|
||||
return DeviceModel::OSIFAlpha;
|
||||
}
|
||||
else if (strDeviceModelName == "OSIFBeta")
|
||||
{
|
||||
return DeviceModel::OSIFBeta;
|
||||
}
|
||||
else if (strDeviceModelName == "ISIF")
|
||||
{
|
||||
return DeviceModel::ISIF;
|
||||
}
|
||||
else if (strDeviceModelName == "IS1")
|
||||
{
|
||||
return DeviceModel::IS1;
|
||||
}
|
||||
else if (strDeviceModelName == "IS2")
|
||||
{
|
||||
return DeviceModel::IS2;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//ATP????<3F><>???
|
||||
namespace ATP
|
||||
{
|
||||
const int MAX_SPECTRUM_SIZE = 4096;
|
||||
|
||||
const int GET_MODULECIRCUIT_TEMP = 0x01;
|
||||
const int GET_PN_NUMBER = 0x03;
|
||||
const int GET_SN_NUMBER = 0x04;
|
||||
const int GET_MANUFACTURE_DATA = 0x06;
|
||||
const int GET_MANUFACTURE_INFO = 0x09;
|
||||
const int GET_PIXEL_LENGTH = 0x0a;
|
||||
const int GET_TEC_TEMP = 0x13;
|
||||
const int SET_TEC_TEMP = 0x12;
|
||||
const int GET_OPTICS_TEMP = 0x35;
|
||||
const int GET_CIRCUITBOARD_TEMP = 0x36;
|
||||
const int SET_INTEGRATION_TIME = 0x14;
|
||||
const int GET_INTEGRATION_TIME = 0x41;
|
||||
const int GET_MAX_INTEGRATION_TIME = 0x42;
|
||||
const int GET_MIN_INTEGRATION_TIME = 0x43;
|
||||
const int ASYNC_COLLECT_DARK = 0x23;
|
||||
const int ASYNC_START_COLLECTION = 0x16;
|
||||
const int ASYNC_READ_DATA = 0x17;
|
||||
const int SET_AVERAGE_NUMBER = 0x28;
|
||||
const int SYNC_GET_DATA = 0x1e;
|
||||
const int SYNC_GET_DARK = 0x2f;
|
||||
const int EXTERNAL_TRIGGER_ENABLE = 0x1f;
|
||||
const int SET_XENON_LAMP_DELAY_TIME = 0x24;
|
||||
const int GET_WAVELENGTH_CALIBRATION_COEF = 0x55;
|
||||
const int GET_STAT_LAMPOUT = 0x60;
|
||||
const int SET_GPIO = 0x61;
|
||||
//const int SYNCHRONIZATION_GET_DARK = 0x23
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////device
|
||||
enum Model
|
||||
{
|
||||
ATP1010 = 0,
|
||||
ATP6500
|
||||
};
|
||||
|
||||
//???????<3F><>??
|
||||
typedef struct tagATPDataFrame
|
||||
{
|
||||
unsigned short usExposureTime;
|
||||
ZZ_U16 usData[4096];
|
||||
float fTemperature;
|
||||
double dTimes = 0;
|
||||
}ATPDataFrame;
|
||||
|
||||
//?<3F><><EFBFBD><EFBFBD>??????<3F><>??
|
||||
typedef struct tagATPDeviceInfo
|
||||
{
|
||||
std::string strPN;
|
||||
std::string strSN;
|
||||
}ATPDeviceInfo;
|
||||
|
||||
//?<3F><><EFBFBD><EFBFBD>????<3F><>?<3F><>??
|
||||
typedef struct tagATPDeviceAttribute
|
||||
{
|
||||
int iPixels;
|
||||
int iMaxIntegrationTime;
|
||||
int iMinIntegrationTime;
|
||||
float fWaveLength[4096];
|
||||
|
||||
}ATPDeviceAttribute;
|
||||
//////////////////////////////////////////////////////////////////////////config file
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//????????
|
||||
namespace ZZ_RUNPARAMS
|
||||
{
|
||||
typedef struct tagErrorInfo
|
||||
{
|
||||
int iDataTransferErr = -1000;
|
||||
float fTecTempErr = -1000;
|
||||
int iShutterErr = -1000;
|
||||
float fChassisTempErr = -1000;
|
||||
}ErrInfo;
|
||||
|
||||
typedef struct tagFiberSpecContext
|
||||
{
|
||||
ZZ_U8 ucDeviceNumber;
|
||||
ZZ_U8 ucDeviceModel[MAX_DEVICENUMBER_FS];
|
||||
std::string strInterface[MAX_DEVICENUMBER_FS];
|
||||
std::string strSN[MAX_DEVICENUMBER_FS];
|
||||
long lDepth[MAX_DEVICENUMBER_FS];
|
||||
float fMinFactor[MAX_DEVICENUMBER_FS];
|
||||
float fMaxFactor[MAX_DEVICENUMBER_FS];
|
||||
ZZ_U16 usPixels[MAX_DEVICENUMBER_FS];
|
||||
float fWavelength[MAX_DEVICENUMBER_FS][4096];
|
||||
}FSContext;
|
||||
|
||||
typedef struct tagLinearShutterContext
|
||||
{
|
||||
std::string strInterface;
|
||||
ZZ_U8 ucProtocolType;
|
||||
ZZ_U8 ucCmdID;
|
||||
}LSContext;
|
||||
|
||||
typedef struct tagAcquisitionTimeSettings
|
||||
{
|
||||
QTime qtStartTime;
|
||||
QTime qtStopTime;
|
||||
QTime qtInterval;
|
||||
}AcqTimeSettings;
|
||||
|
||||
typedef struct tagAcquisitionPositionSettings
|
||||
{
|
||||
int iTotalPosition;
|
||||
int iPosition[MAX_LINEARSHUTTER_POSITION];
|
||||
}AcqPosSettings;
|
||||
|
||||
typedef struct tagRunTimeGrabberParams
|
||||
{
|
||||
LSContext lscParam;
|
||||
FSContext fscParams;
|
||||
AcqTimeSettings atsParams;
|
||||
AcqPosSettings apsParams;
|
||||
}RunTimeGrabberParams;
|
||||
|
||||
typedef struct tagATPCalibrationSettings
|
||||
{
|
||||
//Up0 Down1,2,3
|
||||
QString qsISIF_CalibrationFilePath[4];
|
||||
QString qsIS1_CalibrationFilePath[4];
|
||||
}ATPCalibrationSettings;
|
||||
}
|
||||
|
||||
//?????????????<3F><>??
|
||||
namespace ZZ_DATAFILE
|
||||
{
|
||||
typedef struct tagEnvironmentalContext
|
||||
{
|
||||
QString qstrUTCDateTime;
|
||||
QString qstrLocation;
|
||||
QString qstrGPS_Longtitude;
|
||||
QString qstrGPS_Latitude;
|
||||
QString qstrGPS_Altitude;
|
||||
QString qstrGPS_North;
|
||||
QString qstrCaseTemperature;
|
||||
QString qstrCaseHumidity;
|
||||
QString qstrDEV_SN;
|
||||
}EContext;
|
||||
|
||||
typedef struct tagManmadeEnviromentalContext
|
||||
{
|
||||
QString qstrOriFileName;
|
||||
QString qstrInstallationTime;
|
||||
QString qstrISIFCalibrationTime;
|
||||
QString qstrIS1CalibrationTime;
|
||||
QString qstrNameOfMaintenanceStaff;
|
||||
QString qstrPhoneNumberOfMaintenanceStaff;
|
||||
QString qstrDownloadUserID;
|
||||
QString qstrDownlaodAddress;
|
||||
QString qstrHTTPServer;
|
||||
}MEContext;
|
||||
|
||||
|
||||
typedef struct tagIS1Information
|
||||
{
|
||||
QString qstrSN_ATP;
|
||||
QString qstrSN_IRIS;
|
||||
|
||||
QString qstrCalFile_U0;
|
||||
QString qstrCalFile_D1;
|
||||
QString qstrCalFile_D2;
|
||||
QString qstrCalFile_D3;
|
||||
|
||||
int iPixelCount;
|
||||
|
||||
int iExposureTimeInMS_U0;
|
||||
int iExposureTimeInMS_D1;
|
||||
int iExposureTimeInMS_D2;
|
||||
int iExposureTimeInMS_D3;
|
||||
|
||||
float fTemperature_U0;
|
||||
float fTemperature_D1;
|
||||
float fTemperature_D2;
|
||||
float fTemperature_D3;
|
||||
}IS1Info;
|
||||
|
||||
typedef struct tagISIFInformation
|
||||
{
|
||||
QString qstrSN_ATP;
|
||||
QString qstrSN_IRIS;
|
||||
|
||||
QString qstrCalFile_U0;
|
||||
QString qstrCalFile_D1;
|
||||
QString qstrCalFile_D2;
|
||||
QString qstrCalFile_D3;
|
||||
|
||||
int iPixelCount;
|
||||
|
||||
int iExposureTimeInMS_U0;
|
||||
int iExposureTimeInMS_D1;
|
||||
int iExposureTimeInMS_D2;
|
||||
int iExposureTimeInMS_D3;
|
||||
|
||||
float fTemperature_U0;
|
||||
float fTemperature_D1;
|
||||
float fTemperature_D2;
|
||||
float fTemperature_D3;
|
||||
}ISIFInfo;
|
||||
|
||||
typedef struct tagATPDataHeader
|
||||
{
|
||||
|
||||
|
||||
}ATPDataHeader;
|
||||
|
||||
typedef struct tagCalibrationFrame
|
||||
{
|
||||
ZZ_U32 uiExposureTimeInMS;
|
||||
float fTemperature;
|
||||
int iPixels;
|
||||
float fWaveLength[4096] = { 0 };
|
||||
double dCal_Gain[4096] = { 0 };
|
||||
double dCal_Offset[4096] = { 0 };
|
||||
}CalFrame;
|
||||
|
||||
typedef struct tagCalDataFrame
|
||||
{
|
||||
ZZ_U32 usExposureTimeInMS;
|
||||
float fTemperature = 0;
|
||||
int iPixels;
|
||||
float fData[4096];
|
||||
QString qstrGrabDate;
|
||||
}CalDataFrame;
|
||||
}
|
||||
|
||||
//misc detector
|
||||
namespace MISC_DETECTOR
|
||||
{
|
||||
typedef struct tagHumitureDeviceInfo
|
||||
{
|
||||
QString qstrInterfaceName;
|
||||
}HumitureDeviceInfo;
|
||||
}
|
||||
};
|
||||
#pragma pack()//<2F>ָ<EFBFBD>Ĭ<EFBFBD><C4AC><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD>루<EFBFBD><EBA3A8><EFBFBD><EFBFBD>8<EFBFBD>ֽڣ<D6BD>
|
||||
53
othersoft/calibration_console/Header_Files/atpFiberImager.h
Normal file
53
othersoft/calibration_console/Header_Files/atpFiberImager.h
Normal file
@ -0,0 +1,53 @@
|
||||
#pragma once
|
||||
#include <qthread.h>
|
||||
//#include <QFileDialog>
|
||||
#include <QDateTime>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "ATPControl_Serial_QT.h"
|
||||
#include "FiberSpectrometerOperationBase.h"
|
||||
|
||||
class ATPFiberImager :public QObject,public FiberSpectrometerOperationBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ATPFiberImager(bool bIsUSBMode, std::string ucPortNumber, std::string strDeviceName);
|
||||
~ATPFiberImager();
|
||||
|
||||
ZZ_ATPControl_Serial_Qt * m_FiberSpectrometer;
|
||||
|
||||
void connectFiberSpectrometer(QString& sn, QString& pixelCount, QString& wavelengthInfo);
|
||||
void disconnectFiberSpectrometer();
|
||||
void getDeviceAttribute(DeviceAttribute& deviceAttribute);
|
||||
void getDeviceInfo(DeviceInfo& deviceInfo);
|
||||
|
||||
void setExposureTime(int iExposureTimeInMS);
|
||||
|
||||
void getExposureTime(int &iExposureTimeInMS);//ok
|
||||
void getDeviceTemperature(float &fTemperature);//ok
|
||||
|
||||
void singleShot(DataFrame &dfData);
|
||||
|
||||
void getNonlinearityCoeffs(coeffsFrame &coeffs);
|
||||
|
||||
ZZ_S32 GetMaxValue(ZZ_S32 * dark, int number);
|
||||
|
||||
// DataFrame m_IntegratingSphereData;
|
||||
// DataFrame m_DarkData;
|
||||
protected:
|
||||
private:
|
||||
std::string mUcPortNumber;
|
||||
|
||||
// ZZ_U32 m_MaxValueOfFiberSpectrometer;
|
||||
|
||||
public slots:
|
||||
void recordDark(QString path);
|
||||
void recordTarget(int recordTimes, QString path);
|
||||
void autoExpose();
|
||||
|
||||
signals:
|
||||
void sendExposureTimeSignal(int exposureTime);
|
||||
};
|
||||
51
othersoft/calibration_console/Header_Files/calibration.h
Normal file
51
othersoft/calibration_console/Header_Files/calibration.h
Normal file
@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
#include <qthread.h>
|
||||
//#include <QFileDialog>
|
||||
#include <QFile>
|
||||
#include <QDataStream>
|
||||
#include <QFileInfo>
|
||||
#include <QDateTime>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "ZZ_Types.h"
|
||||
#include "ZZ_Math.h"
|
||||
//#include "Dense"
|
||||
#include "Eigen/Dense"
|
||||
#include "unsupported/Eigen/Splines"
|
||||
|
||||
using namespace ZZ_MISCDEF::IRIS::FS;
|
||||
|
||||
class CalibrationAlgorithm :public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CalibrationAlgorithm();
|
||||
~CalibrationAlgorithm();
|
||||
|
||||
void readAndResample_StandardLightFile(QString filePath, int integratingSphereDetectorValue, DeviceAttribute deviceAttribute, DeviceInfo deviceInfo);//
|
||||
|
||||
void produceCalfile(QString calFilePath, DeviceAttribute deviceAttribute, DataFrame integratingSphereData, DataFrame darkData);
|
||||
|
||||
|
||||
protected:
|
||||
private:
|
||||
double m_dStandardLightDataBase;//<2F><><EFBFBD><D7BC><EFBFBD>ļ<EFBFBD><C4BC>Ļ<EFBFBD><EFBFBD><D7BC><EFBFBD><EFBFBD>
|
||||
double * m_dStandardLightWavelength;
|
||||
double * m_dStandardLightData;
|
||||
|
||||
double * m_dStandardLightWavelengthResampled;
|
||||
double * m_dStandardLightDataResampled;
|
||||
|
||||
double * m_gain;
|
||||
double * m_offset;
|
||||
|
||||
public slots:
|
||||
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
};
|
||||
71
othersoft/calibration_console/Header_Files/library.h
Normal file
71
othersoft/calibration_console/Header_Files/library.h
Normal file
@ -0,0 +1,71 @@
|
||||
#ifndef OCEAN_LIB_LIBRARY_H
|
||||
#define OCEAN_LIB_LIBRARY_H
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
//#include <unistd.h>
|
||||
#include <chrono>
|
||||
|
||||
#include "api/SeaBreezeWrapper.h"
|
||||
|
||||
#include "IrisFiberSpectrometerBase.h"
|
||||
#include "api/seabreezeapi/SeaBreezeAPI.h"
|
||||
#include "api/seabreezeapi/NonlinearityCoeffsFeatureAdapter.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
class OceanOptics_lib :public CIrisFSBase
|
||||
{
|
||||
public:
|
||||
OceanOptics_lib();
|
||||
virtual ~OceanOptics_lib();
|
||||
public:
|
||||
//初始化设备
|
||||
//此处string为指明连接哪个ocean光谱仪的参数,可自行更换为其他c/c++标准类型
|
||||
//0为无错误,不同错误请返回不同值(不能确定:当不成功时SeaBreeze返回的错误代码error不为0 → 不敢将error直接返回)
|
||||
int Initialize(bool bIsUSBMode, std::string ucPortNumber, std::string strDeviceName);//ok
|
||||
int Initialize();//ok
|
||||
|
||||
//关闭设备
|
||||
void Close();//ok
|
||||
|
||||
//单次数据采集
|
||||
int SingleShot(DataFrame &dfData);
|
||||
|
||||
//设置曝光时间
|
||||
int SetExposureTime(int iExposureTimeInMS);//ok
|
||||
|
||||
//获取曝光时间设置
|
||||
int GetExposureTime(int &iExposureTimeInMS);//ok
|
||||
|
||||
//设置目标温度
|
||||
int SetDeviceTemperature(float fTemperature);//ok
|
||||
|
||||
//获取温度设置
|
||||
int GetDeviceTemperature(float &fTemperature);//ok
|
||||
|
||||
//获取设备信息
|
||||
int GetDeviceInfo(DeviceInfo &Info);//ok
|
||||
|
||||
//获取设备特征数据
|
||||
int GetDeviceAttribute(DeviceAttribute &Attr);//ok
|
||||
|
||||
//tc
|
||||
static const char* get_error_string(int error);
|
||||
void test_nonlinearity_coeffs_feature();
|
||||
private:
|
||||
int m_iSpectralmeterHandle;
|
||||
DeviceInfo m_deviceInfo;
|
||||
int m_iExposureTime;
|
||||
|
||||
bool isSuccess(char* resultStr);
|
||||
|
||||
string GetDeviceType(int index);
|
||||
string GetSerialNumber(int index);
|
||||
};
|
||||
|
||||
#endif //OCEAN_LIB_LIBRARY_H
|
||||
|
||||
|
||||
@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
#include <qthread.h>
|
||||
//#include <QFileDialog>
|
||||
#include <QDateTime>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "library.h"
|
||||
#include "FiberSpectrometerOperationBase.h"
|
||||
|
||||
class OceanOpticsFiberImager :public QObject,public FiberSpectrometerOperationBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
OceanOpticsFiberImager(double * nonlinearityCoeffs, int numberOfCoeffs);
|
||||
~OceanOpticsFiberImager();
|
||||
|
||||
OceanOptics_lib * m_FiberSpectrometer;
|
||||
|
||||
void connectFiberSpectrometer(QString& sn, QString& pixelCount, QString& wavelengthInfo);
|
||||
void disconnectFiberSpectrometer();
|
||||
void getDeviceAttribute(DeviceAttribute& deviceAttribute);
|
||||
void getDeviceInfo(DeviceInfo& deviceInfo);
|
||||
|
||||
void setExposureTime(int iExposureTimeInMS);
|
||||
|
||||
void getExposureTime(int &iExposureTimeInMS);//ok
|
||||
void getDeviceTemperature(float &fTemperature);//ok
|
||||
|
||||
void singleShot(DataFrame &dfData);
|
||||
|
||||
void getNonlinearityCoeffs(coeffsFrame &coeffs);
|
||||
|
||||
ZZ_S32 GetMaxValue(ZZ_S32 * dark, int number);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ζ<EFBFBD><CEB6><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
DeviceInfo m_deviceInfo;
|
||||
DeviceAttribute m_deviceAttribute;
|
||||
|
||||
// DataFrame m_IntegratingSphereData;
|
||||
// DataFrame m_DarkData;
|
||||
protected:
|
||||
private:
|
||||
double * m_nonlinearityCoeffs;
|
||||
int m_iNumberOfNonlinearityCoeffs;
|
||||
|
||||
// ZZ_U32 m_MaxValueOfFiberSpectrometer;
|
||||
|
||||
public slots:
|
||||
void recordDark(QString path);
|
||||
void recordTarget(int recordTimes, QString path);
|
||||
void autoExpose();
|
||||
|
||||
signals:
|
||||
void sendExposureTimeSignal(int exposureTime);
|
||||
};
|
||||
@ -0,0 +1,886 @@
|
||||
//#include "pch.h"
|
||||
#include "Header_Files/ATPControl_Serial_QT.h"
|
||||
//#include "ZZ_Math_HDRONLY.h"
|
||||
|
||||
ZZ_ATPControl_Serial_Qt::ZZ_ATPControl_Serial_Qt(QObject* parent /*= nullptr*/)
|
||||
{
|
||||
m_pSerialPort = new QSerialPort;
|
||||
m_iBaudRate = 115200;
|
||||
//emit SignalInit_Self();
|
||||
}
|
||||
|
||||
ZZ_ATPControl_Serial_Qt::~ZZ_ATPControl_Serial_Qt()//
|
||||
{
|
||||
if (m_pSerialPort != NULL)
|
||||
{
|
||||
delete m_pSerialPort;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// int ZZ_ATPControl_Serial_Qt::ReInit()
|
||||
// {
|
||||
// m_pSerialPort->close();
|
||||
// delete m_pSerialPort;
|
||||
//
|
||||
// m_pSerialPort = new QSerialPort;
|
||||
//
|
||||
// m_pSerialPort->setPortName("COM7");
|
||||
// m_pSerialPort->setReadBufferSize(512);
|
||||
// bool bRes = m_pSerialPort->setBaudRate(m_iBaudRate);
|
||||
// bRes = m_pSerialPort->open(QIODevice::ReadWrite);
|
||||
// }
|
||||
|
||||
// int ZZ_ATPControl_Serial_Qt::SetBaudRate(int iBaud)
|
||||
// {
|
||||
// m_iBaudRate = iBaud;
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::Initialize(bool bIsUSBMode, std::string ucPortNumber, std::string strDeviceName)
|
||||
{
|
||||
//connect(this, &ZZ_ATPControl_Serial_Qt::SignalInit_Self, this, &ZZ_ATPControl_Serial_Qt::Init_Self);
|
||||
//emit SignalInit_Self();
|
||||
|
||||
QString qstrPortName = QString::fromStdString(ucPortNumber);
|
||||
|
||||
m_pSerialPort->setPortName(qstrPortName);
|
||||
m_pSerialPort->setReadBufferSize(512);
|
||||
bool bRes = m_pSerialPort->setBaudRate(m_iBaudRate);
|
||||
if (!bRes)
|
||||
{
|
||||
qDebug() << "Err:setBaudRate Failed.Exit Code:1";
|
||||
//std::cout << "Err.setBaudRate Failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
bRes = m_pSerialPort->open(QIODevice::ReadWrite);
|
||||
if (!bRes)
|
||||
{
|
||||
qDebug() << "Err:open Failed.Exit Code:2";
|
||||
//std::cout << "Err.open Failed" << std::endl;
|
||||
return 2;
|
||||
}
|
||||
|
||||
// int testi;
|
||||
// GetDeviceAttribute(m_daDeviceAttr);
|
||||
// GetExposureTime(testi);
|
||||
// SetExposureTime(10000);
|
||||
// DataFrame test;
|
||||
// SingleShot(test);
|
||||
|
||||
GetDeviceInfo(m_diDeviceInfo);
|
||||
GetExposureTime_Init();
|
||||
SetAvgTimes(1);
|
||||
|
||||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ZZ_ATPControl_Serial_Qt::Close()
|
||||
{
|
||||
m_pSerialPort->close();
|
||||
}
|
||||
int ZZ_ATPControl_Serial_Qt::GetDeviceInfo(DeviceInfo &Info)
|
||||
{
|
||||
QByteArray qbSend, qbRecv;
|
||||
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(GET_PN_NUMBER);
|
||||
int iRes = SendCommand(qbSend);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceInfo Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = RecvData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceInfo Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceInfo Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
m_diDeviceInfo.strPN = qbRecv.data();
|
||||
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(GET_SN_NUMBER);
|
||||
iRes = SendCommand(qbSend);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceInfo Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = RecvData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceInfo Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceInfo Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
m_diDeviceInfo.strSN = qbRecv.data();
|
||||
|
||||
|
||||
Info = m_diDeviceInfo;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::GetDeviceAttribute(DeviceAttribute &Attr)
|
||||
{
|
||||
QByteArray qbSend, qbRecv;
|
||||
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(GET_MIN_INTEGRATION_TIME);
|
||||
int iRes = SendCommand(qbSend);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = RecvData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
m_daDeviceAttr.iMinIntegrationTimeInMS = (ZZ_U8)qbRecv[1] + (ZZ_U8)qbRecv[0] * 256;
|
||||
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(GET_MAX_INTEGRATION_TIME);
|
||||
iRes = SendCommand(qbSend);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = RecvData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
m_daDeviceAttr.iMaxIntegrationTimeInMS = (ZZ_U8)qbRecv[1] + (ZZ_U8)qbRecv[0] * 256;
|
||||
|
||||
///
|
||||
int iTempExpTime = 0;
|
||||
GetExposureTime(iTempExpTime);
|
||||
|
||||
iRes = SetExposureTime(m_daDeviceAttr.iMinIntegrationTimeInMS);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Call SetExposureTime error.Exit Code:2";
|
||||
//return 2;
|
||||
}
|
||||
iRes = SingleShot(m_daDeviceAttr.iPixels);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Call SingleShot error.Exit Code:3";
|
||||
return 3;
|
||||
}
|
||||
|
||||
SetExposureTime(iTempExpTime);
|
||||
///
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(GET_WAVELENGTH_CALIBRATION_COEF);
|
||||
qbSend.resize(3);
|
||||
qbSend[1] = 0x00;
|
||||
qbSend[2] = 0x01;
|
||||
iRes = SendCommand(qbSend);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = RecvData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
float fWaveLengthCoef[4];
|
||||
memcpy(fWaveLengthCoef, qbRecv.data() + 16, 4 * sizeof(float));
|
||||
for (int i = 0; i < m_daDeviceAttr.iPixels; i++)
|
||||
{
|
||||
m_daDeviceAttr.fWaveLengthInNM[i] = fWaveLengthCoef[0] * i*i*i + fWaveLengthCoef[1] * i*i + fWaveLengthCoef[2] * i + fWaveLengthCoef[3];
|
||||
}
|
||||
|
||||
Attr = m_daDeviceAttr;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::SetDeviceTemperature(float fTemperature)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::SetAvgTimes(int iTimes /*= 1*/)
|
||||
{
|
||||
QByteArray qbSend, qbRecv;
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(SET_AVERAGE_NUMBER);
|
||||
qbSend.resize(3);
|
||||
qbSend[1] = 0x00;
|
||||
qbSend[2] = 0x01;
|
||||
int iRes = SendCommand(qbSend);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:SetAvgTimes Failed.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = RecvData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:SetAvgTimes Failed.Exit Code:2";
|
||||
return 2;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:SetAvgTimes Failed.Exit Code:3";
|
||||
return 3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::GetExposureTime_Init()
|
||||
{
|
||||
QByteArray qbSend, qbRecv;
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(GET_INTEGRATION_TIME);
|
||||
qbSend.resize(3);
|
||||
qbSend[1] = 0x00;
|
||||
qbSend[2] = 0x01;
|
||||
int iRes = SendCommand(qbSend);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetExposureTime Failed.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = RecvData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetExposureTime Failed.Exit Code:2";
|
||||
return 2;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetExposureTime Failed.Exit Code:3";
|
||||
return 3;
|
||||
}
|
||||
|
||||
m_iExposureTime = (ZZ_U8)qbRecv[1] + (ZZ_U8)qbRecv[0] * 256;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::SendCommand(QByteArray qbCommand)
|
||||
{
|
||||
int iSize = qbCommand.size() + 3;
|
||||
QByteArray qbSend;
|
||||
qbSend.resize(4);
|
||||
qbSend[0] = (ZZ_U8)0xAA;
|
||||
qbSend[1] = 0x55;
|
||||
qbSend[2] = iSize / 256;
|
||||
qbSend[3] = iSize % 256;
|
||||
qbSend.append(qbCommand);
|
||||
|
||||
int iSum = 0;
|
||||
for (int i = 0; i < iSize - 1; i++)
|
||||
{
|
||||
iSum = iSum + qbSend[i + 2];
|
||||
}
|
||||
|
||||
qbSend.append(iSum % 256);
|
||||
|
||||
qint64 qi64Write = m_pSerialPort->write(qbSend);
|
||||
if (qi64Write != qbSend.size())
|
||||
{
|
||||
qDebug() << "Err:write Failed.Exit Code:1" << qi64Write;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::RecvData(QByteArray &qbData)
|
||||
{
|
||||
qbData.clear();
|
||||
qbData = m_pSerialPort->readAll();
|
||||
|
||||
int iCounter = 0;
|
||||
while (qbData.size() < 4)
|
||||
{
|
||||
m_pSerialPort->waitForReadyRead(5000);
|
||||
QByteArray qbTemp = m_pSerialPort->readAll();
|
||||
qbData.append(qbTemp);
|
||||
|
||||
if (iCounter > 150)
|
||||
{
|
||||
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(5000);
|
||||
qbData.append(m_pSerialPort->readAll());
|
||||
|
||||
if (iCounter > 200)
|
||||
{
|
||||
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::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_ShortLag 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_ShortLag 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_ShortLag 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_ShortLag 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)
|
||||
{
|
||||
if (qbData.size() < 6)
|
||||
{
|
||||
qDebug() << "Err:ParseData Failed,Not Enough Data.Exit Code:1" << qbData.size();
|
||||
return 1;
|
||||
}
|
||||
qbData.remove(0, 5);
|
||||
qbData.remove(qbData.size() - 1, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::Init_Self()
|
||||
{
|
||||
m_pSerialPort = new QSerialPort;
|
||||
return 0;
|
||||
}
|
||||
|
||||
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(m_daDeviceAttr.iMinIntegrationTimeInMS);//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;
|
||||
qDebug() << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>30<EFBFBD><EFBFBD>"<<endl;
|
||||
break;
|
||||
}
|
||||
|
||||
// fExposureTime = (float)m_daDeviceAttr.iMinIntegrationTimeInMS;
|
||||
int tc_tmp;
|
||||
GetExposureTime(tc_tmp);
|
||||
fExposureTime=tc_tmp;
|
||||
fTempExposureTime = fExposureTime;
|
||||
|
||||
iRes = SingleShot(dfTemp);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:PerformAutoExposure Failed.Exit Code:2"<<endl;
|
||||
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;
|
||||
qDebug() << "1111111111111111111111111111111" << dTemp << endl;
|
||||
|
||||
|
||||
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;
|
||||
continue;
|
||||
}
|
||||
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 < m_daDeviceAttr.iMinIntegrationTimeInMS)
|
||||
{
|
||||
bFlagIsAutoExposureOK = false;
|
||||
bFlagIsAutoExposureFailed = true;
|
||||
bFlagIsLowerMinExposureTime = true;
|
||||
|
||||
qDebug() << "lower-----------------------"<<endl;
|
||||
}
|
||||
|
||||
}
|
||||
bIsLastValueOverflow = bIsValueOverflow;
|
||||
fLastExposureTime = fTempExposureTime;
|
||||
|
||||
if (fExposureTime > 65000)
|
||||
{
|
||||
bFlagIsAutoExposureOK = false;
|
||||
bFlagIsAutoExposureFailed = true;
|
||||
fPredictedExposureTime = 65000;
|
||||
iRes = SetExposureTime(65000);
|
||||
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 ZZ_ATPControl_Serial_Qt::SetExtShutter(int iShutterUP0, int iShutterDOWN1, int iShutterDOWN2, int iShutterDOWN3)
|
||||
// {
|
||||
// qDebug() << "stub code not implemented";
|
||||
// return -1;
|
||||
// }
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::SetExposureTime(int iExposureTimeInMS)
|
||||
{
|
||||
m_iExposureTime = iExposureTimeInMS;
|
||||
|
||||
QByteArray qbExposureTime, qbRecv;
|
||||
//qbExposureTime.append(SET_INTEGRATION_TIME);
|
||||
qbExposureTime.resize(3);
|
||||
qbExposureTime[0] = SET_INTEGRATION_TIME;
|
||||
qbExposureTime[1] = iExposureTimeInMS >> 8;
|
||||
qbExposureTime[2] = iExposureTimeInMS & 0xFF;
|
||||
|
||||
int iRes = SendCommand(qbExposureTime);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:SetExposureTime Failed.Exit Code:2";
|
||||
return 2;
|
||||
}
|
||||
iRes = RecvData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:SetExposureTime Failed.Exit Code:3";
|
||||
return 3;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:SetExposureTime Failed.Exit Code:4";
|
||||
return 4;
|
||||
}
|
||||
|
||||
if ((ZZ_U8)qbRecv[0] != 0)
|
||||
{
|
||||
qDebug() << "Err:SetExposureTime Failed.Exit Code:1";
|
||||
|
||||
//return 1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::GetExposureTime(int &iExposureTimeInMS)
|
||||
{
|
||||
// QByteArray qbSend, qbRecv;
|
||||
// qbSend.clear();
|
||||
// qbRecv.clear();
|
||||
// qbSend.append(GET_INTEGRATION_TIME);
|
||||
// qbSend.resize(3);
|
||||
// qbSend[1] = 0x00;
|
||||
// qbSend[2] = 0x01;
|
||||
// int iRes = SendCommand(qbSend);
|
||||
// if (iRes != 0)
|
||||
// {
|
||||
// qDebug() << "Err:GetExposureTime Failed.Exit Code:1";
|
||||
// return 1;
|
||||
// }
|
||||
// iRes = RecvData(qbRecv);
|
||||
// if (iRes != 0)
|
||||
// {
|
||||
// qDebug() << "Err:GetExposureTime Failed.Exit Code:2";
|
||||
// return 2;
|
||||
// }
|
||||
// iRes = ParseData(qbRecv);
|
||||
// if (iRes != 0)
|
||||
// {
|
||||
// qDebug() << "Err:GetExposureTime Failed.Exit Code:3";
|
||||
// return 3;
|
||||
// }
|
||||
//
|
||||
// iExposureTimeInMS = (ZZ_U8)qbRecv[1] + (ZZ_U8)qbRecv[0] * 256;
|
||||
iExposureTimeInMS = m_iExposureTime;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::SingleShot(DataFrame &dfData)
|
||||
{
|
||||
|
||||
QByteArray qbSend, qbRecv;
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(SYNC_GET_DATA);
|
||||
qbSend.resize(3);
|
||||
// qbSend[1] = 0x00;
|
||||
// qbSend[2] = 0x01;
|
||||
qbSend[1] = m_iExposureTime >> 8;;
|
||||
qbSend[2] = m_iExposureTime & 0xFF;
|
||||
|
||||
qDebug() << "-------------"<<m_iExposureTime<<endl;
|
||||
|
||||
int iRes = SendCommand(qbSend);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:SingleShot Failed.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = RecvData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:SingleShot Failed.Exit Code:2";
|
||||
return 2;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:SingleShot Failed.Exit Code:3";
|
||||
return 3;
|
||||
}
|
||||
|
||||
ZZ_U16 usData[4096] = { 0 };
|
||||
|
||||
if ((ZZ_U8)qbRecv[0] != 0)
|
||||
{
|
||||
qDebug() << "Err:SingleShot Failed.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
//int aaa = qbRecv.size();
|
||||
int iDataSizeInPixel = (qbRecv.size() - 1) / 2;
|
||||
memcpy(usData, qbRecv.data() + 1, iDataSizeInPixel * 2);
|
||||
for (size_t i = 0; i < iDataSizeInPixel; i++)
|
||||
{
|
||||
dfData.lData[i] = qToBigEndian(usData[i]);
|
||||
|
||||
|
||||
}
|
||||
// for (int i = 0; i < iDataSizeInPixel; i++)
|
||||
// {
|
||||
// dfData.lData[i] = usData[i];
|
||||
// }
|
||||
}
|
||||
|
||||
dfData.usExposureTimeInMS = m_iExposureTime;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::SingleShot(int &iPixels)
|
||||
{
|
||||
QByteArray qbSend, qbRecv;
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(SYNC_GET_DATA);
|
||||
qbSend.resize(3);
|
||||
qbSend[1] = 0x00;
|
||||
qbSend[2] = 0x01;
|
||||
int iRes = SendCommand(qbSend);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:SingleShotP Failed.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = RecvData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:SingleShotP Failed.Exit Code:2";
|
||||
return 2;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:SingleShot Failed.Exit Code:3";
|
||||
return 3;
|
||||
}
|
||||
|
||||
if ((ZZ_U8)qbRecv[0] != 0)
|
||||
{
|
||||
qDebug() << "Err:SingleShotP Failed.Exit Code:4";
|
||||
return 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
iPixels = (qbRecv.size() - 1) / 2;
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// int ZZ_ATPControl_Serial_Qt::SingleShotDark(ATPDataFrame &dfData)
|
||||
// {
|
||||
// SetExtShutter(0,0,0,0);
|
||||
// SingleShot(dfData);
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::GetDeviceTemperature(float &fTemperature)
|
||||
{
|
||||
fTemperature = 0;
|
||||
|
||||
QByteArray qbSend, qbRecv;
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(GET_TEC_TEMP);
|
||||
qbSend.resize(3);
|
||||
qbSend[1] = 0x00;
|
||||
qbSend[2] = 0x01;
|
||||
int iRes = SendCommand(qbSend);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceTemperature Failed.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = RecvData_ShortLag(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceTemperature Failed.Exit Code:2";
|
||||
return 2;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceTemperature Failed.Exit Code:3";
|
||||
return 3;
|
||||
}
|
||||
|
||||
QString qstrTemp = qbRecv.data();
|
||||
fTemperature = qstrTemp.toFloat();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//void ZZ_ATPControl_Serial_Qt::ReadMessage()
|
||||
//{
|
||||
// QByteArray qbTemp, qbTemp1;
|
||||
// qbTemp = m_pSerialPort->readAll();
|
||||
// while (qbTemp.size()<2)
|
||||
// {
|
||||
// m_pSerialPort->waitForReadyRead(50);
|
||||
// qbTemp1 = m_pSerialPort->readAll();
|
||||
// qbTemp.append(qbTemp1);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
//return;
|
||||
// }
|
||||
113
othersoft/calibration_console/Source_Files/ZZ_Math.cpp
Normal file
113
othersoft/calibration_console/Source_Files/ZZ_Math.cpp
Normal file
@ -0,0 +1,113 @@
|
||||
//#include "pch.h"
|
||||
#include "Header_Files/ZZ_Math.h"
|
||||
|
||||
void ZZ_MATH::PolyFit::Eigen_Polyfit(const std::vector<double> &xv, const std::vector<double> &yv, std::vector<double> &coeff, int order)
|
||||
{
|
||||
Eigen::MatrixXd A(xv.size(), order + 1);
|
||||
Eigen::VectorXd yv_mapped = Eigen::VectorXd::Map(&yv.front(), yv.size());
|
||||
Eigen::VectorXd result;
|
||||
|
||||
assert(xv.size() == yv.size());
|
||||
assert(xv.size() >= order + 1);
|
||||
|
||||
|
||||
for (size_t i = 0; i < xv.size(); i++)
|
||||
{
|
||||
for (size_t j = 0; j < order + 1; j++)
|
||||
{
|
||||
A(i, j) = pow(xv.at(i), j);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
result = A.householderQr().solve(yv_mapped);
|
||||
|
||||
coeff.resize(order + 1);
|
||||
for (size_t i = 0; i < order + 1; i++)
|
||||
{
|
||||
coeff[i] = result[i];
|
||||
}
|
||||
}
|
||||
|
||||
double ZZ_MATH::PolyFit::Eigen_Polyeval(std::vector<double> coeffs, double x)
|
||||
{
|
||||
double result = 0.0;
|
||||
|
||||
for (int i = 0; i < coeffs.size(); i++)
|
||||
{
|
||||
result += coeffs[i] * pow(x, i);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Eigen::VectorXd ZZ_MATH::SplineFit::Eigen_Normalize(const Eigen::VectorXd &x)
|
||||
{
|
||||
using namespace Eigen;
|
||||
VectorXd x_norm;
|
||||
x_norm.resize(x.size());
|
||||
const double min = x.minCoeff();
|
||||
const double max = x.maxCoeff();
|
||||
|
||||
for (int k = 0; k < x.size(); k++)
|
||||
{
|
||||
x_norm(k) = (x(k) - min) / (max - min);
|
||||
}
|
||||
|
||||
return x_norm;
|
||||
|
||||
}
|
||||
|
||||
void ZZ_MATH::SplineFit::Test(std::vector<double> const &x_vec, std::vector<double> const &y_vec)
|
||||
{
|
||||
typedef Spline<double, 1> Spline1D;
|
||||
typedef SplineFitting<Spline1D> Spline1DFitting;
|
||||
|
||||
|
||||
//VectorXd vx,vy;
|
||||
//vx.resize(x_vec.size());
|
||||
//vy.resize(y_vec.size());
|
||||
//vx.Map(&x_vec.front(), x_vec.size());
|
||||
//vy.Map(&y_vec.front(), y_vec.size());
|
||||
|
||||
Eigen::VectorXd vx = Eigen::VectorXd::Map(&x_vec.front(), 5/*x_vec.size()*/);
|
||||
Eigen::VectorXd vy = Eigen::VectorXd::Map(&y_vec.front(), 5/*y_vec.size()*/);
|
||||
|
||||
const double scale = 1 / (vx.maxCoeff() - vx.minCoeff());
|
||||
const double scale_sq = scale * scale;
|
||||
|
||||
//VectorXd knots = Eigen_Normalize(vx);
|
||||
//Spline1D spline = Spline1DFitting::Interpolate(vy.transpose(),3, knots);
|
||||
//double a;
|
||||
// a = spline.derivatives(0,1)(0);
|
||||
//Eigen::VectorXd xvals(5);
|
||||
//Eigen::VectorXd yvals(xvals.rows());
|
||||
//xvals << 0, 1, 2,3,4;
|
||||
//yvals << 0, 1, 4,9,16;
|
||||
|
||||
SplineInterpolation s(vx, vy);
|
||||
}
|
||||
|
||||
ZZ_MATH::SplineFit::SplineInterpolation::SplineInterpolation(Eigen::VectorXd const &x_vec, Eigen::VectorXd const &y_vec):
|
||||
x_min(x_vec.minCoeff()), x_max(x_vec.maxCoeff()),
|
||||
spline_(Eigen::SplineFitting<Eigen::Spline<double, 1>>::
|
||||
Interpolate(y_vec.transpose(), 3, scaled_values(x_vec)))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
double ZZ_MATH::SplineFit::SplineInterpolation::operator()(double x) const
|
||||
{
|
||||
return spline_(scaled_value(x))(0);
|
||||
}
|
||||
|
||||
double ZZ_MATH::SplineFit::SplineInterpolation::scaled_value(double x) const
|
||||
{
|
||||
return (x - x_min) / (x_max - x_min);
|
||||
}
|
||||
|
||||
Eigen::RowVectorXd ZZ_MATH::SplineFit::SplineInterpolation::scaled_values(Eigen::VectorXd const &x_vec) const
|
||||
{
|
||||
return x_vec.unaryExpr([this](double x) { return scaled_value(x); }).transpose();
|
||||
}
|
||||
194
othersoft/calibration_console/Source_Files/atpFiberImager.cpp
Normal file
194
othersoft/calibration_console/Source_Files/atpFiberImager.cpp
Normal file
@ -0,0 +1,194 @@
|
||||
#include "Header_Files/atpFiberImager.h"
|
||||
|
||||
ATPFiberImager::ATPFiberImager(bool bIsUSBMode, std::string ucPortNumber, std::string strDeviceName)
|
||||
{
|
||||
m_FiberSpectrometer = NULL;
|
||||
|
||||
mUcPortNumber=ucPortNumber;
|
||||
}
|
||||
|
||||
ATPFiberImager::~ATPFiberImager()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ATPFiberImager::connectFiberSpectrometer(QString& SN, QString& pixelCount, QString& wavelengthInfo)
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
m_FiberSpectrometer = new ZZ_ATPControl_Serial_Qt();
|
||||
|
||||
m_FiberSpectrometer->Initialize(false, mUcPortNumber, "OPTOSKY");
|
||||
|
||||
DeviceInfo deviceInfo;//
|
||||
DeviceAttribute deviceAttribute;
|
||||
|
||||
m_FiberSpectrometer->GetDeviceInfo(deviceInfo);
|
||||
m_FiberSpectrometer->GetDeviceAttribute(deviceAttribute);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
SN = QString::fromStdString(deviceInfo.strSN);
|
||||
pixelCount = QString::number(deviceAttribute.iPixels);
|
||||
wavelengthInfo = QString::number(deviceAttribute.fWaveLengthInNM[0]) + "--" + QString::number(deviceAttribute.fWaveLengthInNM[deviceAttribute.iPixels - 1]);
|
||||
|
||||
m_FiberSpectrometer->SetDeviceTemperature(-10);
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>dnֵ<6E><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD>أ<EFBFBD>
|
||||
string qepro = "QEP";//?????????????????????????????????????????????????????????????????????????????????????????
|
||||
string flame = "FLMS";//?????????????????????????????????????????????????????????????????????????????????????????
|
||||
if (deviceInfo.strSN.find(qepro) != string::npos)
|
||||
{
|
||||
m_MaxValueOfFiberSpectrometer = 200000;
|
||||
}
|
||||
else if (deviceInfo.strSN.find(flame) != string::npos)
|
||||
{
|
||||
m_MaxValueOfFiberSpectrometer = 65535;
|
||||
}
|
||||
else//û<><C3BB><EFBFBD>ҵ<EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> dnֵ<6E><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ATPFiberImager::disconnectFiberSpectrometer()
|
||||
{
|
||||
m_FiberSpectrometer->Close();
|
||||
}
|
||||
|
||||
void ATPFiberImager::getDeviceAttribute(DeviceAttribute& deviceAttribute)
|
||||
{
|
||||
m_FiberSpectrometer->GetDeviceAttribute(deviceAttribute);
|
||||
}
|
||||
|
||||
void ATPFiberImager::getDeviceInfo(DeviceInfo& deviceInfo)
|
||||
{
|
||||
m_FiberSpectrometer->GetDeviceInfo(deviceInfo);
|
||||
}
|
||||
|
||||
void ATPFiberImager::setExposureTime(int iExposureTimeInMS)
|
||||
{
|
||||
m_FiberSpectrometer->SetExposureTime(iExposureTimeInMS);
|
||||
}
|
||||
|
||||
void ATPFiberImager::getExposureTime(int &iExposureTimeInMS)
|
||||
{
|
||||
m_FiberSpectrometer->GetExposureTime(iExposureTimeInMS);
|
||||
}
|
||||
|
||||
void ATPFiberImager::getDeviceTemperature(float &fTemperature)
|
||||
{
|
||||
m_FiberSpectrometer->GetDeviceTemperature(fTemperature);
|
||||
}
|
||||
|
||||
void ATPFiberImager::singleShot(DataFrame &dfData)
|
||||
{
|
||||
m_FiberSpectrometer->SingleShot(dfData);
|
||||
}
|
||||
|
||||
void ATPFiberImager::getNonlinearityCoeffs(coeffsFrame &coeffs)
|
||||
{
|
||||
printf("This is ATPFiberImager.\n");
|
||||
}
|
||||
|
||||
void ATPFiberImager::recordDark(QString path)
|
||||
{
|
||||
//<2F><>ȡ<EFBFBD>豸<EFBFBD><E8B1B8>Ϣ
|
||||
DeviceAttribute attribute;
|
||||
DeviceInfo deviceInfo;
|
||||
getDeviceAttribute(attribute);
|
||||
getDeviceInfo(deviceInfo);
|
||||
|
||||
//<2F>ɼ<EFBFBD><C9BC><EFBFBD>֡
|
||||
singleShot(m_DarkData);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>csv
|
||||
QDateTime curDateTime = QDateTime::currentDateTime();
|
||||
QString currentTime = curDateTime.toString("yyyy_MM_dd_hh_mm_ss");
|
||||
QString fileName = path + "/" + currentTime + "_" + QString::fromStdString(deviceInfo.strSN) + "_darkSpectral_dn.csv";
|
||||
std::ofstream outfile(fileName.toStdString().c_str());
|
||||
|
||||
for (int i = 0; i < attribute.iPixels; i++)
|
||||
{
|
||||
if (i==0)
|
||||
{
|
||||
outfile << m_DarkData.usExposureTimeInMS << std::endl;
|
||||
}
|
||||
outfile << attribute.fWaveLengthInNM[i] << "," << m_DarkData.lData[i] << std::endl;
|
||||
}
|
||||
|
||||
outfile.close();
|
||||
}
|
||||
|
||||
void ATPFiberImager::recordTarget(int recordTimes, QString path)
|
||||
{
|
||||
//<2F><>ȡ<EFBFBD>豸<EFBFBD><E8B1B8>Ϣ
|
||||
DeviceAttribute attribute;
|
||||
DeviceInfo deviceInfo;
|
||||
getDeviceAttribute(attribute);
|
||||
getDeviceInfo(deviceInfo);
|
||||
|
||||
|
||||
DataFrame integratingSphereData_tmp;
|
||||
|
||||
for (int i = 0; i < recordTimes; i++)
|
||||
{
|
||||
singleShot(integratingSphereData_tmp);
|
||||
|
||||
if (i == 0)//<2F><>integratingSphereData_tmp<6D>е<EFBFBD><D0B5>ع<EFBFBD>ʱ<EFBFBD>䡢<EFBFBD>¶ȵ<C2B6><C8B5><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>m_IntegratingSphereData
|
||||
{
|
||||
m_IntegratingSphereData = integratingSphereData_tmp;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < attribute.iPixels; i++)
|
||||
{
|
||||
m_IntegratingSphereData.lData[i] += integratingSphereData_tmp.lData[i];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (int i = 0; i < attribute.iPixels; i++)
|
||||
{
|
||||
m_IntegratingSphereData.lData[i] = m_IntegratingSphereData.lData[i] / recordTimes;
|
||||
}
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>csv
|
||||
QDateTime curDateTime = QDateTime::currentDateTime();
|
||||
QString currentTime = curDateTime.toString("yyyy_MM_dd_hh_mm_ss");
|
||||
QString fileName = path + "/" + currentTime + "_" + QString::fromStdString(deviceInfo.strSN) + "_integratingSphereSpectral_dn.csv";
|
||||
std::ofstream outfile(fileName.toStdString().c_str());
|
||||
|
||||
for (int i = 0; i < attribute.iPixels; i++)
|
||||
{
|
||||
if (i==0)
|
||||
{
|
||||
outfile << m_IntegratingSphereData.usExposureTimeInMS << std::endl;
|
||||
}
|
||||
outfile << attribute.fWaveLengthInNM[i] << "," << m_IntegratingSphereData.lData[i] << std::endl;
|
||||
}
|
||||
|
||||
outfile.close();
|
||||
}
|
||||
|
||||
void ATPFiberImager::autoExpose()
|
||||
{
|
||||
float fPredictedExposureTime;
|
||||
m_FiberSpectrometer->PerformAutoExposure(0.6,0.9,fPredictedExposureTime);
|
||||
}
|
||||
|
||||
ZZ_S32 ATPFiberImager::GetMaxValue(ZZ_S32 * dark, int number)
|
||||
{
|
||||
ZZ_S32 max = 0;
|
||||
for (size_t i = 0; i < number; i++)
|
||||
{
|
||||
if (dark[i] > max)
|
||||
{
|
||||
max = dark[i];
|
||||
}
|
||||
}
|
||||
//std::cout << "<22><>֡<EFBFBD><D6A1><EFBFBD><EFBFBD>ֵΪ" << max << std::endl;
|
||||
return max;
|
||||
}
|
||||
271
othersoft/calibration_console/Source_Files/calibration.cpp
Normal file
271
othersoft/calibration_console/Source_Files/calibration.cpp
Normal file
@ -0,0 +1,271 @@
|
||||
#include "Header_Files/calibration.h"
|
||||
|
||||
CalibrationAlgorithm::CalibrationAlgorithm()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CalibrationAlgorithm::~CalibrationAlgorithm()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CalibrationAlgorithm::readAndResample_StandardLightFile(QString filePath, int integratingSphereDetectorValue, DeviceAttribute deviceAttribute, DeviceInfo deviceInfo)
|
||||
{
|
||||
|
||||
QFile file(filePath);
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
{
|
||||
std::cout << "<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD>" << std::endl;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int lineCount = 0;
|
||||
while (!file.atEnd())
|
||||
{
|
||||
QByteArray tmp = file.readLine();
|
||||
lineCount++;
|
||||
}
|
||||
double * StandardLightWavelength_tmp = new double[lineCount - 1];
|
||||
double * StandardLightData_tmp = new double[lineCount - 1];
|
||||
|
||||
|
||||
file.seek(0);
|
||||
for (size_t i = 0; i < lineCount; i++)
|
||||
{
|
||||
QByteArray line = file.readLine();
|
||||
QString str(line);
|
||||
//cout << str.section('\t', 1).trimmed().toStdString() << endl;
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
QString first = str.section('\t', 0, 0);
|
||||
m_dStandardLightDataBase = first.toDouble();
|
||||
}
|
||||
else
|
||||
{
|
||||
QString first = str.section('\t', 0, 0);
|
||||
QString second = str.section('\t', 1, 1);
|
||||
StandardLightWavelength_tmp[i - 1] = first.toDouble();
|
||||
StandardLightData_tmp[i - 1] = second.toDouble();
|
||||
|
||||
//if (i== lineCount-1)//<2F>鿴<EFBFBD><E9BFB4><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ
|
||||
//{
|
||||
// double xx = first.toDouble();
|
||||
// double yy = second.toDouble();
|
||||
// std::cout << "xx<78><78>" << xx <<std::endl;
|
||||
// std::cout << "yy<79><79>" << yy << std::endl;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD><DDB5><EFBFBD>Ч<EFBFBD><D0A7>
|
||||
int startPos, endPos;
|
||||
int buffer = 3;//<2F><>Ҫ<EFBFBD><D2AA><EFBFBD>DZ<EFBFBD><EFBFBD><D7BC>ԭʼ<D4AD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//QString biaozhundengfanwei = QString::number(StandardLightWavelength_tmp[0]) + "--" + QString::number(StandardLightWavelength_tmp[lineCount - 2]);
|
||||
|
||||
if (deviceAttribute.fWaveLengthInNM[0] < StandardLightWavelength_tmp[0])//<2F><><EFBFBD><D7BC><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>Χδ<CEA7><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1><EFBFBD><EFBFBD>
|
||||
{
|
||||
startPos = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (size_t i = 0; i < lineCount - 1; i++)
|
||||
{
|
||||
if (deviceAttribute.fWaveLengthInNM[0] < StandardLightWavelength_tmp[i])
|
||||
{
|
||||
startPos = i - buffer;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (deviceAttribute.fWaveLengthInNM[deviceAttribute.iPixels - 1] > StandardLightWavelength_tmp[lineCount - 2])//<2F><><EFBFBD><D7BC><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>Χδ<CEA7><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
{
|
||||
endPos = lineCount - 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (size_t i = 0; i < lineCount - 1; i++)
|
||||
{
|
||||
if (deviceAttribute.fWaveLengthInNM[deviceAttribute.iPixels - 1] < StandardLightWavelength_tmp[i])
|
||||
{
|
||||
endPos = i + buffer;//??
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_dStandardLightWavelength = new double[endPos - startPos];
|
||||
m_dStandardLightData = new double[endPos - startPos];
|
||||
|
||||
for (size_t i = 0; i < endPos - startPos; i++)
|
||||
{
|
||||
m_dStandardLightWavelength[i] = StandardLightWavelength_tmp[i + startPos];
|
||||
m_dStandardLightData[i] = StandardLightData_tmp[i + startPos];
|
||||
}
|
||||
|
||||
|
||||
|
||||
//<2F><><EFBFBD>ضϱ<D8B6><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>csv
|
||||
QFileInfo fileInfo(filePath);
|
||||
QString standardLightFileFolder = fileInfo.path();
|
||||
QString standardLightFileName = fileInfo.fileName();
|
||||
|
||||
QDateTime curDateTime = QDateTime::currentDateTime();
|
||||
QString currentTime = curDateTime.toString("yyyy_MM_dd_hh_mm_ss");
|
||||
|
||||
QString tmp = standardLightFileFolder + "/" + currentTime + "_" + QString::fromStdString(deviceInfo.strSN) +"_"+ standardLightFileName + "_truncation.csv";
|
||||
|
||||
std::ofstream outfile1(tmp.toStdString().c_str());
|
||||
|
||||
for (size_t i = 0; i < endPos - startPos; i++)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
outfile1 << m_dStandardLightDataBase << std::endl;
|
||||
}
|
||||
|
||||
outfile1 << m_dStandardLightWavelength[i] << "," << m_dStandardLightData[i] << std::endl;
|
||||
}
|
||||
outfile1.close();
|
||||
|
||||
|
||||
|
||||
//<2F>ز<EFBFBD><D8B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
Eigen::VectorXd vx = Eigen::VectorXd::Map(m_dStandardLightWavelength, endPos - startPos/*x_vec.size()*/);
|
||||
Eigen::VectorXd vy = Eigen::VectorXd::Map(m_dStandardLightData, endPos - startPos/*y_vec.size()*/);
|
||||
|
||||
using namespace ZZ_MATH::SplineFit;
|
||||
SplineInterpolation m_sfLine(vx, vy);
|
||||
|
||||
m_dStandardLightWavelengthResampled = new double[deviceAttribute.iPixels];
|
||||
m_dStandardLightDataResampled = new double[deviceAttribute.iPixels];
|
||||
|
||||
double dTemp,scaleFactor;
|
||||
if(integratingSphereDetectorValue <= 0)
|
||||
scaleFactor=1;
|
||||
else
|
||||
scaleFactor=integratingSphereDetectorValue/m_dStandardLightDataBase;
|
||||
|
||||
for (size_t i = 0; i < deviceAttribute.iPixels; i++)
|
||||
{
|
||||
if (deviceAttribute.fWaveLengthInNM[i] < StandardLightWavelength_tmp[0])//<2F>˲<EFBFBD><CBB2><EFBFBD> < <20><><EFBFBD><D7BC><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>С<EFBFBD><D0A1><EFBFBD><EFBFBD>
|
||||
{
|
||||
dTemp = m_sfLine(StandardLightWavelength_tmp[0]);//???????????????
|
||||
}
|
||||
else if (StandardLightWavelength_tmp[lineCount - 2] < deviceAttribute.fWaveLengthInNM[i])//<2F><><EFBFBD><D7BC><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD> < <20>˲<EFBFBD><CBB2><EFBFBD>
|
||||
{
|
||||
dTemp = m_sfLine(StandardLightWavelength_tmp[lineCount - 2]);//???????????????
|
||||
}
|
||||
else
|
||||
{
|
||||
dTemp = m_sfLine(deviceAttribute.fWaveLengthInNM[i]);//?????
|
||||
}
|
||||
|
||||
//double dTemp2 = m_sfLine(deviceAttribute.fWaveLengthInNM[i]);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ʹ<EFBFBD><CAB9>
|
||||
|
||||
m_dStandardLightWavelengthResampled[i] = deviceAttribute.fWaveLengthInNM[i];
|
||||
m_dStandardLightDataResampled[i] = dTemp * scaleFactor;
|
||||
}
|
||||
|
||||
|
||||
//<2F><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD><EFBFBD>ı<EFBFBD><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>csv
|
||||
QString outputName = standardLightFileFolder + "/" + currentTime + "_" + QString::fromStdString(deviceInfo.strSN) + "_" + standardLightFileName + "_resample.csv";
|
||||
std::ofstream outfile2(outputName.toStdString().c_str());
|
||||
for (size_t i = 0; i < deviceAttribute.iPixels; i++)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
outfile2 << m_dStandardLightDataBase << std::endl;
|
||||
}
|
||||
|
||||
outfile2 << deviceAttribute.fWaveLengthInNM[i] << "," << m_dStandardLightDataResampled[i] << std::endl;
|
||||
}
|
||||
outfile2.close();
|
||||
}
|
||||
|
||||
void CalibrationAlgorithm::produceCalfile(QString calFilePath, DeviceAttribute deviceAttribute, DataFrame integratingSphereData, DataFrame darkData)
|
||||
{
|
||||
using namespace ZZ_MISCDEF;//ZZ_U32
|
||||
|
||||
int errorCode;
|
||||
size_t writeCounter;
|
||||
|
||||
double* m_gain = new double[deviceAttribute.iPixels];//double*
|
||||
double* m_offset = new double[deviceAttribute.iPixels];//double*
|
||||
|
||||
for (size_t i = 0; i < deviceAttribute.iPixels; i++)
|
||||
{
|
||||
if (integratingSphereData.lData[i] - darkData.lData[i] == 0)//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĸΪ<C4B8><CEAA>
|
||||
{
|
||||
m_gain[i] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_gain[i] = m_dStandardLightDataResampled[i] / (integratingSphereData.lData[i] - darkData.lData[i]);
|
||||
}
|
||||
|
||||
m_offset[i] = 0;
|
||||
}
|
||||
|
||||
//д<>뵽<EFBFBD><EBB5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
||||
FILE * calFileHandle = fopen(calFilePath.toStdString().c_str(), "wb");
|
||||
|
||||
writeCounter = fwrite(&integratingSphereData.usExposureTimeInMS,sizeof(ZZ_U32), 1, calFileHandle);//<2F>ع<EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
writeCounter = fwrite(&integratingSphereData.fTemperature, sizeof(float), 1, calFileHandle);//<2F>¶<EFBFBD>
|
||||
writeCounter = fwrite(&deviceAttribute.iPixels, sizeof(int), 1, calFileHandle);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
writeCounter = fwrite(&deviceAttribute.fWaveLengthInNM, sizeof(float), deviceAttribute.iPixels, calFileHandle);//<2F><><EFBFBD><EFBFBD>
|
||||
writeCounter = fwrite(m_gain, sizeof(double), deviceAttribute.iPixels, calFileHandle);//gain
|
||||
writeCounter = fwrite(m_offset, sizeof(double), deviceAttribute.iPixels, calFileHandle);//offset
|
||||
|
||||
fclose(calFileHandle);
|
||||
|
||||
|
||||
//д<>뵽CSV<53>ļ<EFBFBD>
|
||||
QString calFile_csv = calFilePath.split(".")[0] + ".csv";
|
||||
std::ofstream outfile(calFile_csv.toStdString().c_str());
|
||||
for (int i = 0; i < deviceAttribute.iPixels; i++)
|
||||
{
|
||||
if (i==0)
|
||||
{
|
||||
outfile << integratingSphereData.usExposureTimeInMS << std::endl;
|
||||
}
|
||||
|
||||
outfile << deviceAttribute.fWaveLengthInNM[i] << "," << m_gain[i] << std::endl;
|
||||
}
|
||||
outfile.close();
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>ʱ<EFBFBD><CAB1>ֱ<EFBFBD><D6B1>д<EFBFBD>ṹ<EFBFBD><E1B9B9>
|
||||
using namespace ZZ_MISCDEF::ZZ_DATAFILE;//tagCalibrationFrame
|
||||
tagCalibrationFrame calibrationFrame;
|
||||
|
||||
calibrationFrame.uiExposureTimeInMS = integratingSphereData.usExposureTimeInMS;
|
||||
calibrationFrame.fTemperature = integratingSphereData.fTemperature;
|
||||
calibrationFrame.iPixels = deviceAttribute.iPixels;
|
||||
|
||||
for (size_t i = 0; i < deviceAttribute.iPixels; i++)
|
||||
{
|
||||
calibrationFrame.fWaveLength[i] = deviceAttribute.fWaveLengthInNM[i];
|
||||
calibrationFrame.dCal_Gain[i] = m_gain[i];
|
||||
}
|
||||
|
||||
QStringList tmp = calFilePath.split('.');
|
||||
QString calFilePath2 = tmp[0] + "_structure." + tmp[1];
|
||||
|
||||
FILE * calFileHandle2 = fopen(calFilePath2.toStdString().c_str(), "wb");
|
||||
|
||||
writeCounter = fwrite(&calibrationFrame,sizeof(tagCalibrationFrame), 1, calFileHandle2);
|
||||
|
||||
fclose(calFileHandle2);
|
||||
|
||||
|
||||
delete[] m_gain;
|
||||
delete[] m_offset;
|
||||
}
|
||||
635
othersoft/calibration_console/Source_Files/library.cpp
Normal file
635
othersoft/calibration_console/Source_Files/library.cpp
Normal file
@ -0,0 +1,635 @@
|
||||
#include "Header_Files/library.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <cstring>
|
||||
|
||||
OceanOptics_lib::OceanOptics_lib()
|
||||
{
|
||||
m_iSpectralmeterHandle = -100;
|
||||
}
|
||||
|
||||
OceanOptics_lib::~OceanOptics_lib()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//ʹ<><CAB9>ͷ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>#include "api/SeaBreezeWrapper.h"
|
||||
int OceanOptics_lib::Initialize(bool bIsUSBMode, std::string ucPortNumber, std::string strDeviceName)
|
||||
{
|
||||
int flag;
|
||||
int error;
|
||||
char type[16];
|
||||
int device_count = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < SEABREEZE_MAX_DEVICES; i++)
|
||||
{
|
||||
// printf("\nOpening spectrometer %d.\n", i);
|
||||
flag = seabreeze_open_spectrometer(i, &error);
|
||||
// printf("Open spectrometer result is (%d) [%s]\n", flag, get_error_string(error));
|
||||
if (0 == flag)
|
||||
{
|
||||
device_count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
string sn = GetSerialNumber(i);
|
||||
|
||||
if (strcmp(sn.c_str(), strDeviceName.c_str()) == 0)
|
||||
{
|
||||
m_iSpectralmeterHandle = i;
|
||||
// printf("\nfind!!!!!!!!!!!!\n");
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// printf("\nClosing spectrometer %d.\n", i);
|
||||
flag = seabreeze_close_spectrometer(i, &error);
|
||||
// printf("Close spectrometer result is (%d) [%s]\n", flag, get_error_string(error));
|
||||
}
|
||||
}
|
||||
|
||||
if (m_iSpectralmeterHandle == -100)
|
||||
{
|
||||
// printf("\nNo!!!!!!!!!!!!\n");
|
||||
return 1;
|
||||
}
|
||||
seabreeze_set_trigger_mode(m_iSpectralmeterHandle, &error, 0);
|
||||
|
||||
long test = seabreeze_get_buffer_capacity_minimum(m_iSpectralmeterHandle, &error);
|
||||
seabreeze_set_buffer_capacity(m_iSpectralmeterHandle, &error, test);
|
||||
|
||||
// printf("seabreeze_set_trigger_mode: Result is [%s]\n", get_error_string(error));
|
||||
|
||||
|
||||
|
||||
//<2F><><EFBFBD>ó<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
long minimum_time;
|
||||
minimum_time = seabreeze_get_min_integration_time_microsec(m_iSpectralmeterHandle, &error);
|
||||
//printf("...Minimum is %ld microseconds, result is [%s]\n", minimum_time, get_error_string(error));
|
||||
bool ret = isSuccess((char*)get_error_string(error));
|
||||
if (!ret)
|
||||
{
|
||||
// printf("\n-------------------û<>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (minimum_time < 0) {
|
||||
/* If there was an error, reset to a time that is supported widely. */
|
||||
minimum_time = 15000;
|
||||
return 1;
|
||||
}
|
||||
|
||||
SetExposureTime(minimum_time / 1000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//ʹ<><CAB9>ͷ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>#include "api/SeaBreezeWrapper.h"
|
||||
int OceanOptics_lib::Initialize()
|
||||
{
|
||||
int flag;
|
||||
int error;
|
||||
char type[16];
|
||||
int device_count = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < SEABREEZE_MAX_DEVICES; i++)
|
||||
{
|
||||
printf("\nOpening spectrometer %d.\n", i);
|
||||
flag = seabreeze_open_spectrometer(i, &error);
|
||||
//printf("Open spectrometer result is (%d) [%s]\n", flag, get_error_string(error));
|
||||
if (0 == flag)
|
||||
{
|
||||
m_iSpectralmeterHandle = i;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_iSpectralmeterHandle == -100)
|
||||
{
|
||||
printf("\nNo!!!!!!!!!!!!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
seabreeze_set_trigger_mode(m_iSpectralmeterHandle, &error, 0);
|
||||
seabreeze_set_trigger_mode(m_iSpectralmeterHandle, &error, 0);
|
||||
seabreeze_set_trigger_mode(m_iSpectralmeterHandle, &error, 0);
|
||||
|
||||
long test = seabreeze_get_buffer_capacity_minimum(m_iSpectralmeterHandle, &error);
|
||||
printf("seabreeze_get_buffer_capacity_minimum: Result is [%s]\n", get_error_string(error));
|
||||
seabreeze_set_buffer_capacity(m_iSpectralmeterHandle, &error, test);
|
||||
printf("seabreeze_set_buffer_capacity: Result is [%s]\n", get_error_string(error));
|
||||
|
||||
// printf("seabreeze_set_trigger_mode: Result is [%s]\n", get_error_string(error));
|
||||
|
||||
//<2F><><EFBFBD>ó<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
long minimum_time;
|
||||
|
||||
minimum_time = seabreeze_get_min_integration_time_microsec(m_iSpectralmeterHandle, &error);
|
||||
//printf("...Minimum is %ld microseconds, result is [%s]\n", minimum_time, get_error_string(error));
|
||||
bool ret = isSuccess((char*)get_error_string(error));
|
||||
if (!ret)
|
||||
{
|
||||
// printf("\n-------------------û<>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (minimum_time < 0) {
|
||||
/* If there was an error, reset to a time that is supported widely. */
|
||||
minimum_time = 15000;
|
||||
return 1;
|
||||
}
|
||||
|
||||
SetExposureTime(minimum_time / 1000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//ʹ<><CAB9>ͷ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>#include "api/seabreezeapi/SeaBreezeAPI.h"
|
||||
//int OceanOptics_lib::Initialize(bool bIsUSBMode,ZZ_U8 ucPortNumber,std::string strDeviceName)
|
||||
//{
|
||||
// int number_of_devices;
|
||||
// long *device_ids;
|
||||
// int i;
|
||||
// int flag;
|
||||
// int error = 0;
|
||||
// char nameBuffer[80];
|
||||
// char *serialNumber;
|
||||
//
|
||||
//
|
||||
//// /* Give the driver a chance to initialize itself */
|
||||
//// sbapi_initialize();
|
||||
//
|
||||
// printf("Probing for devices...\n"); fflush(stdout);
|
||||
// sbapi_probe_devices();
|
||||
//
|
||||
// printf("Getting device count...\n"); fflush(stdout);
|
||||
// number_of_devices = sbapi_get_number_of_device_ids();
|
||||
// std::cout<<"Device count is "<< number_of_devices <<std::endl;
|
||||
// if(0 == number_of_devices) {
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
// printf("Getting device IDs...\n");
|
||||
// device_ids = (long *)calloc(number_of_devices, sizeof(long));
|
||||
// number_of_devices = sbapi_get_device_ids(device_ids, number_of_devices);
|
||||
// printf("Got %d device ID%s.\n", number_of_devices, number_of_devices == 1 ? "" : "s"); fflush(stdout);
|
||||
//
|
||||
//
|
||||
// for(i = 0; i < number_of_devices; i++)
|
||||
// {
|
||||
// printf("%d: Device 0x%02lX:\n", i, device_ids[i]);
|
||||
//// printf("\tGetting device type...\n");
|
||||
// flag = sbapi_get_device_type(device_ids[i], &error, nameBuffer, 79);
|
||||
//// printf("\t\tResult is (%d) [%s]\n", flag, sbapi_get_error_string(error));
|
||||
// if(flag > 0) {
|
||||
// printf("\tDevice type: [%s]\n", nameBuffer);
|
||||
// }
|
||||
//
|
||||
// serialNumber = GetSerialNumber(device_ids[i]);
|
||||
// serialNumber = GetSerialNumber(device_ids[i]);
|
||||
//
|
||||
// printf("\tSerial number tc: [%s]\n", serialNumber);
|
||||
//
|
||||
//// /* Open the device */
|
||||
//// printf("\tAttempting to open:\n");
|
||||
//// flag = sbapi_open_device(device_ids[i], &error);
|
||||
//// printf("\t\tResult is (%d) [%s]\n", flag, sbapi_get_error_string(error));
|
||||
////
|
||||
//// // jump to the next iteration if there was a problem
|
||||
//// if(flag != 0) {
|
||||
//// continue;
|
||||
//// }
|
||||
////
|
||||
//// // log deviations
|
||||
//// unsupportedFeatureCount=0;
|
||||
//// testFailureCount=0;
|
||||
////
|
||||
//// /* Test the device */
|
||||
//// for(test_index = 0; test_index < __test_function_count; test_index++) {
|
||||
//// /* Invoke each of the test functions against this device */
|
||||
//// __test_functions[test_index](device_ids[i], &unsupportedFeatureCount, &testFailureCount);
|
||||
//// }
|
||||
////
|
||||
//// /* Close the device */
|
||||
//// printf("\tAttempting to close:\n");
|
||||
//// sbapi_close_device(device_ids[i], &error);
|
||||
//// printf("\t\tResult is (%d) [%s]\n", flag, sbapi_get_error_string(error));
|
||||
//// printf("%d: Device 0x%02lX: \n\tNumber of unsupported features = %d\n\tNumber of test failures = %d\n", i, device_ids[i], unsupportedFeatureCount, testFailureCount);
|
||||
// }
|
||||
//
|
||||
// flag = sbapi_get_device_type(device_ids[i], &error, nameBuffer, 79);
|
||||
//
|
||||
// return 1;
|
||||
//}
|
||||
|
||||
//<2F>ر<EFBFBD><D8B1>豸
|
||||
void OceanOptics_lib::Close()
|
||||
{
|
||||
int flag;
|
||||
int error;
|
||||
|
||||
flag = seabreeze_close_spectrometer(m_iSpectralmeterHandle, &error);
|
||||
// printf("Close spectrometer result is (%d) [%s]\n", flag, get_error_string(error));
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲɼ<DDB2>
|
||||
int OceanOptics_lib::SingleShot(DataFrame &dfData)
|
||||
{
|
||||
if (m_iSpectralmeterHandle == -100)
|
||||
{
|
||||
printf("\nNo!!!!!!!!!!!!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int error;
|
||||
int flag;
|
||||
int spec_length;
|
||||
double *spectrum = 0;
|
||||
bool ret;
|
||||
|
||||
// printf("\n\nGetting formatted spectrum length.\n");
|
||||
spec_length = seabreeze_get_formatted_spectrum_length(m_iSpectralmeterHandle, &error);
|
||||
//printf("Get formatted spectrum_length result is (%d) [%s]\n", spec_length, get_error_string(error));
|
||||
ret = isSuccess((char*)get_error_string(error));
|
||||
if (!ret)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (spec_length > 0)
|
||||
{
|
||||
spectrum = (double *)calloc((size_t)spec_length, sizeof(double));
|
||||
seabreeze_clear_buffer(m_iSpectralmeterHandle, &error);
|
||||
|
||||
auto startTime = std::chrono::high_resolution_clock::now();
|
||||
|
||||
flag = seabreeze_get_formatted_spectrum(m_iSpectralmeterHandle, &error, spectrum, spec_length);
|
||||
|
||||
auto endTime = std::chrono::high_resolution_clock::now();
|
||||
std::chrono::duration<double, std::milli> fp_ms = endTime - startTime;
|
||||
std::cout << "<EFBFBD>ɼ<EFBFBD><EFBFBD><EFBFBD>ʱΪ<EFBFBD><EFBFBD>" << fp_ms.count() / 1000 << "s." << std::endl;
|
||||
|
||||
// printf("Get formatted spectrum result is (%d) [%s]\n", flag, get_error_string(error));
|
||||
// printf("\tPixel value 20 is %1.2f\n", spectrum[20]);
|
||||
ret = isSuccess((char*)get_error_string(error));
|
||||
if (!ret)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (int tmp = 0; tmp < spec_length; tmp++)
|
||||
{
|
||||
dfData.lData[tmp] = spectrum[tmp];
|
||||
}
|
||||
|
||||
int exposureTimeInMS;
|
||||
GetExposureTime(exposureTimeInMS);
|
||||
dfData.usExposureTimeInMS = exposureTimeInMS;
|
||||
|
||||
float temperature;
|
||||
GetDeviceTemperature(temperature);
|
||||
dfData.fTemperature = temperature;
|
||||
|
||||
free(spectrum);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ع<EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
int OceanOptics_lib::SetExposureTime(int iExposureTimeInMS)
|
||||
{
|
||||
if (m_iSpectralmeterHandle == -100)
|
||||
{
|
||||
// printf("\nNo!!!!!!!!!!!!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int error;
|
||||
|
||||
seabreeze_set_trigger_mode(m_iSpectralmeterHandle, &error, 0); // trigger to normal
|
||||
seabreeze_set_integration_time_microsec(m_iSpectralmeterHandle, &error, iExposureTimeInMS * 1000);
|
||||
printf("Set integration time result is [%s]\n", get_error_string(error));
|
||||
|
||||
bool ret = isSuccess((char*)get_error_string(error));
|
||||
if (!ret)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
m_iExposureTime = iExposureTimeInMS;
|
||||
|
||||
|
||||
|
||||
// //----------------------------------------------------------------------------------------------------------------
|
||||
// int error;
|
||||
// long *spectrometer_ids;
|
||||
// int number_of_spectrometers;
|
||||
//
|
||||
// number_of_spectrometers = sbapi_get_number_of_spectrometer_features(m_iSpectralmeterHandle, &error);
|
||||
// printf("\t\t\tResult is %d [%s]\n", number_of_spectrometers, sbapi_get_error_string(error));
|
||||
// spectrometer_ids = (long *)calloc(number_of_spectrometers, sizeof(long));
|
||||
// number_of_spectrometers = sbapi_get_spectrometer_features(m_iSpectralmeterHandle, &error, spectrometer_ids, number_of_spectrometers);
|
||||
// printf("\t\t\tResult is %d [%s]\n", number_of_spectrometers, sbapi_get_error_string(error));
|
||||
//
|
||||
// sbapi_spectrometer_set_integration_time_micros(m_iSpectralmeterHandle, spectrometer_ids[0], &error, iExposureTimeInMS*1000);
|
||||
// printf("\t\t\t\tResult is [%s]\n", sbapi_get_error_string(error));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//<2F><>ȡ<EFBFBD>ع<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int OceanOptics_lib::GetExposureTime(int &iExposureTimeInMS)
|
||||
{
|
||||
if (m_iSpectralmeterHandle == -100)
|
||||
{
|
||||
printf("\nNo!!!!!!!!!!!!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
iExposureTimeInMS = m_iExposureTime;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD>¶<EFBFBD>
|
||||
int OceanOptics_lib::SetDeviceTemperature(float fTemperature)
|
||||
{
|
||||
bool ret;
|
||||
|
||||
if (m_iSpectralmeterHandle == -100)
|
||||
{
|
||||
printf("\nNo!!!!!!!!!!!!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int error;
|
||||
|
||||
// printf("\nSetting TEC temperature to -5C\n");
|
||||
seabreeze_set_tec_temperature(m_iSpectralmeterHandle, &error, fTemperature);
|
||||
// printf("Set tec temperature result is [%s]\n", get_error_string(error));
|
||||
ret = isSuccess((char*)get_error_string(error));
|
||||
if (!ret)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// printf("\nSetting TEC enable to true\n");
|
||||
seabreeze_set_tec_enable(m_iSpectralmeterHandle, &error, 1);
|
||||
// printf("Set tec enable result is [%s]\n", get_error_string(error));
|
||||
ret = isSuccess((char*)get_error_string(error));
|
||||
if (!ret)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//<2F><>ȡ<EFBFBD>¶<EFBFBD><C2B6><EFBFBD><EFBFBD><EFBFBD>
|
||||
int OceanOptics_lib::GetDeviceTemperature(float &fTemperature)
|
||||
{
|
||||
if (m_iSpectralmeterHandle == -100)
|
||||
{
|
||||
printf("\nNo!!!!!!!!!!!!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
double temp;
|
||||
int error;
|
||||
|
||||
// usleep(1000000);
|
||||
// printf("\nGetting TEC temperature\n");
|
||||
temp = seabreeze_read_tec_temperature(m_iSpectralmeterHandle, &error);
|
||||
// printf("Read tec temperature result is %1.2f C [%s]\n", temp, get_error_string(error));
|
||||
bool ret = isSuccess((char*)get_error_string(error));
|
||||
if (!ret)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
fTemperature = temp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//<2F><>ȡ<EFBFBD>豸<EFBFBD><E8B1B8>Ϣ
|
||||
int OceanOptics_lib::GetDeviceInfo(DeviceInfo &Info)
|
||||
{
|
||||
if (m_iSpectralmeterHandle == -100)
|
||||
{
|
||||
printf("\nNo!!!!!!!!!!!!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
string deviceType = GetDeviceType(m_iSpectralmeterHandle);
|
||||
string SN = GetSerialNumber(m_iSpectralmeterHandle);
|
||||
|
||||
Info.strPN = deviceType;
|
||||
Info.strSN = SN;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//<2F><>ȡ<EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int OceanOptics_lib::GetDeviceAttribute(DeviceAttribute &Attr)
|
||||
{
|
||||
if (m_iSpectralmeterHandle == -100)
|
||||
{
|
||||
printf("\nNo!!!!!!!!!!!!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int error;
|
||||
int flag;
|
||||
int spec_length;
|
||||
double *wls = 0;
|
||||
|
||||
// printf("\n\nGetting formatted spectrum length.\n");
|
||||
spec_length = seabreeze_get_formatted_spectrum_length(m_iSpectralmeterHandle, &error);
|
||||
// printf("Get formatted spectrum length result is (%d) [%s]\n", spec_length, get_error_string(error));
|
||||
bool ret = isSuccess((char*)get_error_string(error));
|
||||
if (!ret)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
Attr.iPixels = spec_length;
|
||||
|
||||
long minimum_time;
|
||||
minimum_time = seabreeze_get_min_integration_time_microsec(m_iSpectralmeterHandle, &error);
|
||||
Attr.iMinIntegrationTimeInMS = minimum_time/1000;
|
||||
Attr.iMaxIntegrationTimeInMS = 60000;
|
||||
|
||||
if (spec_length > 0) {
|
||||
wls = (double *)calloc((size_t)spec_length, sizeof(double));
|
||||
|
||||
// printf("\nGetting wavelengths.\n");
|
||||
flag = seabreeze_get_wavelengths(m_iSpectralmeterHandle, &error, wls, spec_length);
|
||||
// printf("Get wavelengths result is (%d) [%s]\n", flag, get_error_string(error));
|
||||
// printf("\tPixel 20 is wavelength %1.2f nm\n", wls[20]);
|
||||
bool ret = isSuccess((char*)get_error_string(error));
|
||||
if (!ret)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (int tmp = 0; tmp < spec_length; tmp++)
|
||||
{
|
||||
Attr.fWaveLengthInNM[tmp] = wls[tmp];
|
||||
}
|
||||
|
||||
free(wls);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool OceanOptics_lib::isSuccess(char* resultStr)
|
||||
{
|
||||
if (strstr(resultStr, "Success") == NULL)//<2F><>a<EFBFBD>в<EFBFBD><D0B2><EFBFBD>b<EFBFBD><62><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD>
|
||||
{
|
||||
//cout << "not found\n";//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
return false;
|
||||
}
|
||||
else//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڡ<EFBFBD>
|
||||
{
|
||||
//cout <<"found\n"; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
const char* OceanOptics_lib::get_error_string(int error)
|
||||
{
|
||||
static char buffer[32];
|
||||
seabreeze_get_error_string(error, buffer, sizeof(buffer));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
void OceanOptics_lib::test_nonlinearity_coeffs_feature()
|
||||
{
|
||||
using namespace seabreeze;
|
||||
using namespace seabreeze::api;
|
||||
using namespace std;
|
||||
|
||||
NonlinearityCoeffsFeatureAdapter tmp();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// int error = 0;
|
||||
// int number_of_nonlinearity_coeff_features;
|
||||
// long *nonlinearity_coeff_feature_ids = 0;
|
||||
// double buffer[10];
|
||||
// int i;
|
||||
// int length;
|
||||
//
|
||||
// printf("\n\tTesting nonlinearity coefficient features:\n");
|
||||
//
|
||||
// printf("\t\tGetting number of nonlinearity coefficient features:\n");
|
||||
// number_of_nonlinearity_coeff_features =
|
||||
// sbapi_get_number_of_nonlinearity_coeffs_features(m_iSpectralmeterHandle, &error);
|
||||
// printf("\t\t\tResult is %d [%s]\n", number_of_nonlinearity_coeff_features,
|
||||
// sbapi_get_error_string(error));
|
||||
//
|
||||
// if(0 == number_of_nonlinearity_coeff_features) {
|
||||
// printf("\tNo nonlinearity coefficient capabilities found.\n");
|
||||
//// tallyUnsupportedFeatures(unsupportedFeatureCount);
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// nonlinearity_coeff_feature_ids =
|
||||
// (long *)calloc(number_of_nonlinearity_coeff_features, sizeof(long));
|
||||
// printf("\t\tGetting nonlinearity coefficient feature IDs...\n");
|
||||
// number_of_nonlinearity_coeff_features = sbapi_get_nonlinearity_coeffs_features(
|
||||
// m_iSpectralmeterHandle, &error, nonlinearity_coeff_feature_ids,
|
||||
// number_of_nonlinearity_coeff_features);
|
||||
// printf("\t\t\tResult is %d [%s]\n", number_of_nonlinearity_coeff_features,
|
||||
// sbapi_get_error_string(error));
|
||||
//
|
||||
// for(i = 0; i < number_of_nonlinearity_coeff_features; i++) {
|
||||
// printf("\t\t%d: Testing device 0x%02lX, nonlinearity coeffs 0x%02lX\n",
|
||||
// i, m_iSpectralmeterHandle, nonlinearity_coeff_feature_ids[i]);
|
||||
//
|
||||
// printf("\t\t\tAttempting to get nonlinearity coefficients...\n");
|
||||
// memset(buffer, (int)0, sizeof(buffer));
|
||||
// length = sbapi_nonlinearity_coeffs_get(m_iSpectralmeterHandle,
|
||||
// nonlinearity_coeff_feature_ids[i], &error, buffer, 10);
|
||||
// printf("\t\t\t\tResult is %d [%s]\n", length, sbapi_get_error_string(error));
|
||||
//
|
||||
// if(0 == error && length > 0) {
|
||||
// printf("\t\t\t\tFirst calibration term: %1.2e\n", buffer[0]);
|
||||
// }
|
||||
//
|
||||
// printf("\t\t%d: Finished testing device 0x%02lX, nonlinearity coeffs 0x%02lX\n",
|
||||
// i, m_iSpectralmeterHandle, nonlinearity_coeff_feature_ids[i]);
|
||||
// }
|
||||
// free(nonlinearity_coeff_feature_ids);
|
||||
//
|
||||
// printf("\tFinished testing nonlinearity coefficient capabilities.\n");
|
||||
}
|
||||
|
||||
string OceanOptics_lib::GetDeviceType(int index)
|
||||
{
|
||||
char type[16];
|
||||
int error;
|
||||
|
||||
seabreeze_get_model(index, &error, type, sizeof(type));
|
||||
// printf("...Result is (%s) [%s]\n", type, get_error_string(error));
|
||||
bool ret = isSuccess((char*)get_error_string(error));
|
||||
if (!ret)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
type[15] = '\0';
|
||||
|
||||
string deviceType = type;
|
||||
|
||||
return deviceType;
|
||||
}
|
||||
|
||||
string OceanOptics_lib::GetSerialNumber(int index)
|
||||
{
|
||||
static char serial_number[32];//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>static<69><63><EFBFBD>˱<EFBFBD><CBB1><EFBFBD><EFBFBD>ᶨ<EFBFBD><E1B6A8><EFBFBD><EFBFBD>stack<63><6B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>غ<D8BA><F3A3ACBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int flag;
|
||||
int error;
|
||||
|
||||
// printf("\n\nGetting serial number.\n");
|
||||
flag = seabreeze_get_serial_number(index, &error, serial_number, 32);
|
||||
// printf("Get serial number result is (%d) [%s]\n", flag, get_error_string(error));
|
||||
bool ret = isSuccess((char*)get_error_string(error));
|
||||
if (!ret)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
serial_number[31] = '\0';
|
||||
if (flag > 0) {
|
||||
printf("\tSerial number: [%s]\n", serial_number);
|
||||
}
|
||||
|
||||
string sn = serial_number;
|
||||
|
||||
return sn;
|
||||
}
|
||||
|
||||
|
||||
683
othersoft/calibration_console/Source_Files/main.cpp
Normal file
683
othersoft/calibration_console/Source_Files/main.cpp
Normal file
@ -0,0 +1,683 @@
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QTextStream>
|
||||
#include <QCommandLineParser>
|
||||
#include <QDir>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "Header_Files/oceanOpticsFiberImager.h"
|
||||
#include "Header_Files/atpFiberImager.h"
|
||||
#include "Header_Files/calibration.h"
|
||||
|
||||
enum CommandLineParseResult
|
||||
{
|
||||
CommandLineOk,
|
||||
CommandLineError,
|
||||
CommandLineVersionRequested,
|
||||
CommandLineHelpRequested
|
||||
};
|
||||
|
||||
enum DeviceType
|
||||
{
|
||||
OPTOSKY,
|
||||
OceanOptics,
|
||||
UnknownDevice
|
||||
};
|
||||
|
||||
struct TcQuery
|
||||
{
|
||||
DeviceType deviceType;
|
||||
QString serialPort;
|
||||
|
||||
int sleepTimeinSecond;//<2F><>Ĭ<EFBFBD><C4AC>ֵ
|
||||
int averageTimes;
|
||||
int position;
|
||||
int integratingSphereDetectorValue;
|
||||
|
||||
QString calFileOutputDirectory;//<2F><>Ĭ<EFBFBD><C4AC>ֵ
|
||||
QString calFileOutputName;
|
||||
QString standardLightFilePath;
|
||||
|
||||
bool justRecord;
|
||||
};
|
||||
|
||||
CommandLineParseResult parseCommandLine2(QCommandLineParser &parser, TcQuery *query, QString *errorMessage);
|
||||
bool copyFileToPath(QString sourceDir ,QString toDir, bool coverFileIfExist);
|
||||
void logout(QString str);
|
||||
void createDirectory(QString fullPath);
|
||||
bool isFileExist(QString fullFileName);
|
||||
|
||||
int getNonlinearityCoeffs2(long deviceID, double * nonlinearityCoeffs);
|
||||
int getNonlinearityCoeffs1(double * nonlinearityCoeffs);
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication a(argc, argv);
|
||||
QCoreApplication::setApplicationName("Ocean optics radiance calibration software");
|
||||
QCoreApplication::setApplicationVersion("1.0");
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>в<EFBFBD><D0B2><EFBFBD>
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription("This software is used for doing radiance calibration for ocean optics fiber imager.");
|
||||
TcQuery query;
|
||||
QString errorMessage;
|
||||
|
||||
switch (parseCommandLine2(parser, &query, &errorMessage))
|
||||
{
|
||||
case CommandLineOk:
|
||||
break;
|
||||
case CommandLineError:
|
||||
errorMessage = "<br><b style=\"color:red\">" + errorMessage + "s!</b>";
|
||||
logout(errorMessage);
|
||||
|
||||
// fputs(qPrintable(errorMessage), stderr);
|
||||
fputs("\n\n", stderr);
|
||||
fputs(qPrintable(parser.helpText()), stderr);
|
||||
return 1;
|
||||
case CommandLineVersionRequested:
|
||||
printf("%s %s\n", qPrintable(QCoreApplication::applicationName()),
|
||||
qPrintable(QCoreApplication::applicationVersion()));
|
||||
return 0;
|
||||
case CommandLineHelpRequested:
|
||||
parser.showHelp();
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƕ<EFBFBD><C7B6><EFBFBD>
|
||||
FiberSpectrometerOperationBase * m_FiberSpectrometer;
|
||||
bool isOcean = false;
|
||||
double * nonlinearityCoeffs;
|
||||
int numberOfNonlinearityCoeffs;
|
||||
switch (query.deviceType)
|
||||
{
|
||||
case OPTOSKY:
|
||||
m_FiberSpectrometer = new ATPFiberImager(false,query.serialPort.toStdString(),"OPTOSKY");
|
||||
break;
|
||||
case OceanOptics:
|
||||
{
|
||||
//ʹ<><CAB9>sbapi<70><69>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
nonlinearityCoeffs = new double[100];
|
||||
numberOfNonlinearityCoeffs = getNonlinearityCoeffs1(nonlinearityCoeffs);
|
||||
|
||||
m_FiberSpectrometer = new OceanOpticsFiberImager(nonlinearityCoeffs, numberOfNonlinearityCoeffs);
|
||||
isOcean = true;
|
||||
break;
|
||||
}
|
||||
case UnknownDevice:
|
||||
parser.showHelp();
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
|
||||
|
||||
//<2F><><EFBFBD>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD>
|
||||
QString message;
|
||||
QString SN;
|
||||
QString pixelCount;
|
||||
QString wavelengthInfo;
|
||||
logout("<br><b style=\"color:red\">Connectting the fiber spectrometer!</b>");
|
||||
m_FiberSpectrometer->connectFiberSpectrometer(SN, pixelCount, wavelengthInfo);
|
||||
|
||||
|
||||
|
||||
//<2F>Զ<EFBFBD><D4B6>ع<EFBFBD>
|
||||
logout("<br><b style=\"color:red\">AutoExpose!</b>");
|
||||
m_FiberSpectrometer->autoExpose();
|
||||
|
||||
int iExposureTime;
|
||||
m_FiberSpectrometer->getExposureTime(iExposureTime);
|
||||
|
||||
message="<br><b style=\"color:red\">ExposureTime: " + QString::number(iExposureTime) + "</b>";
|
||||
logout(message);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>sleep<65><70><EFBFBD>ȴ<EFBFBD><C8B4>رտ<D8B1><D5BF><EFBFBD>
|
||||
message="<br><b style=\"color:red\">Please close the lamp in " + QString::number(query.sleepTimeinSecond) + "s!</b>";
|
||||
logout(message);
|
||||
QThread::sleep(query.sleepTimeinSecond);
|
||||
|
||||
//<2F>ɼ<EFBFBD><C9BC><EFBFBD>֡
|
||||
logout("<br><b style=\"color:red\">Record dark frame!</b>");
|
||||
m_FiberSpectrometer->recordDark(query.calFileOutputDirectory);
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>sleep<65><70><EFBFBD>ȴ<EFBFBD><C8B4><EFBFBD><F2BFAABF><EFBFBD>
|
||||
message="<br><b style=\"color:red\">Please open the lamp in " + QString::number(query.sleepTimeinSecond) + "s!</b>";
|
||||
logout(message);
|
||||
QThread::sleep(query.sleepTimeinSecond);
|
||||
|
||||
//<2F>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
logout("<br><b style=\"color:red\">Record integrating sphere frame!</b>");
|
||||
m_FiberSpectrometer->recordTarget(query.averageTimes, query.calFileOutputDirectory);
|
||||
|
||||
//<><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
|
||||
logout("<br><b style=\"color:red\">readAndResample_StandardLightFile!</b>");
|
||||
DeviceAttribute deviceAttribute;
|
||||
DeviceInfo deviceInfo;
|
||||
m_FiberSpectrometer->getDeviceAttribute(deviceAttribute);
|
||||
m_FiberSpectrometer->getDeviceInfo(deviceInfo);
|
||||
|
||||
CalibrationAlgorithm * m_CalibrationAlgorithm = new CalibrationAlgorithm();
|
||||
m_CalibrationAlgorithm->readAndResample_StandardLightFile(query.standardLightFilePath,query.integratingSphereDetectorValue, deviceAttribute, deviceInfo);
|
||||
|
||||
//<2F><><EFBFBD>ɷ<EFBFBD><C9B7>䶨<EFBFBD><E4B6A8><EFBFBD>ļ<EFBFBD>
|
||||
if (query.calFileOutputName.isEmpty())//query->calFileOutputName==""
|
||||
{
|
||||
QDateTime curDateTime = QDateTime::currentDateTime();
|
||||
QString currentTime = curDateTime.toString("yyyy_MM_dd_hh_mm_ss");
|
||||
QString calFileName = QDir::cleanPath(query.calFileOutputDirectory + QDir::separator() + currentTime + "_" + QString::fromStdString(deviceInfo.strSN) + ".cal");
|
||||
|
||||
query.calFileOutputName=calFileName;
|
||||
}
|
||||
logout("<br><b style=\"color:red\">Produce calibration file!</b>");
|
||||
m_CalibrationAlgorithm->produceCalfile(query.calFileOutputName, deviceAttribute, m_FiberSpectrometer->m_IntegratingSphereData, m_FiberSpectrometer->m_DarkData);
|
||||
|
||||
//<2F><><EFBFBD>Ʒ<EFBFBD><C6B7>䶨<EFBFBD><E4B6A8><EFBFBD>ļ<EFBFBD>
|
||||
QDateTime curDateTime = QDateTime::currentDateTime();
|
||||
QString currentTime = curDateTime.toString("yyyy_MM_dd_hh_mm_ss");
|
||||
QString destName = QDir::cleanPath(query.calFileOutputDirectory + QDir::separator() + currentTime + "_" + QString::fromStdString(deviceInfo.strSN) + "_" +QString::number(query.position) + ".cal");
|
||||
copyFileToPath(query.calFileOutputName,destName,true);
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
if (isOcean)
|
||||
{
|
||||
QDateTime curDateTime = QDateTime::currentDateTime();
|
||||
QString currentTime = curDateTime.toString("yyyy_MM_dd_hh_mm_ss");
|
||||
QString nonlinearityCoeffsName = QDir::cleanPath(query.calFileOutputDirectory + QDir::separator() + currentTime + "_" + QString::fromStdString(deviceInfo.strSN) + ".nonLinear");
|
||||
|
||||
// for (int i = 0; i < numberOfNonlinearityCoeffs; ++i)
|
||||
// {
|
||||
// printf("\n");
|
||||
//
|
||||
// printf("nonlinearityCoeffs(<28><>%d<><64>): %1.2e\n",i , nonlinearityCoeffs[i]);
|
||||
//
|
||||
// printf("\n");
|
||||
// }
|
||||
|
||||
std::ofstream outfile(nonlinearityCoeffsName.toStdString().c_str());
|
||||
|
||||
for (int i = 0; i < numberOfNonlinearityCoeffs; i++)
|
||||
{
|
||||
outfile << nonlinearityCoeffs[i] << std::endl;
|
||||
}
|
||||
outfile.close();
|
||||
|
||||
free(nonlinearityCoeffs);
|
||||
}
|
||||
|
||||
//<2F>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
m_FiberSpectrometer->disconnectFiberSpectrometer();//Ҫ<><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD>free(nonlinearityCoeffs);
|
||||
//return a.exec();
|
||||
}
|
||||
|
||||
CommandLineParseResult parseCommandLine2(QCommandLineParser &parser, TcQuery *query, QString *errorMessage)
|
||||
{
|
||||
parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions);
|
||||
|
||||
QCommandLineOption deviceType("deviceType", "Device type. Options are OPTOSKY and OceanOptics", "deviceType");
|
||||
parser.addOption(deviceType);
|
||||
|
||||
QCommandLineOption serialPort("serialPort", "Serial port.", "serialPort");
|
||||
parser.addOption(serialPort);
|
||||
|
||||
QCommandLineOption sleepTimeinSecond("t", "The time app sleep.", "sleepTimeinSecond");
|
||||
sleepTimeinSecond.setDefaultValue("30");//<2F><><EFBFBD><EFBFBD>Ĭ<EFBFBD>ϲ<EFBFBD><CFB2><EFBFBD>
|
||||
parser.addOption(sleepTimeinSecond);
|
||||
|
||||
QCommandLineOption averageTimes("a", "Average times.", "average_times");
|
||||
averageTimes.setDefaultValue("5");//<2F><><EFBFBD><EFBFBD>Ĭ<EFBFBD>ϲ<EFBFBD><CFB2><EFBFBD>
|
||||
parser.addOption(averageTimes);//
|
||||
|
||||
QCommandLineOption position("position", "Position.", "position");
|
||||
parser.addOption(position);
|
||||
|
||||
QCommandLineOption integratingSphereDetectorValue("integratingSphereDetectorValue", "integratingSphereDetectorValue.", "integratingSphereDetectorValue");
|
||||
parser.addOption(integratingSphereDetectorValue);
|
||||
|
||||
// parser.addPositionalArgument("name", "The name to look up.");//????????????????????????????????????????????????????????????????????????????
|
||||
QCommandLineOption helpOption = parser.addHelpOption();//Adds the help option (-h, --help and -? on Windows) This option is handled automatically by QCommandLineParser.
|
||||
QCommandLineOption versionOption = parser.addVersionOption();//This option is handled automatically by QCommandLineParser.
|
||||
|
||||
|
||||
//// A boolean option with a single name (-p)
|
||||
//QCommandLineOption showProgressOption("p", QCoreApplication::translate("main", "Show progress during copy"));
|
||||
//parser.addOption(showProgressOption);
|
||||
|
||||
// A boolean option with multiple names (-r, --record)
|
||||
QCommandLineOption recordOption(QStringList() << "f" << "record",
|
||||
QCoreApplication::translate("main", "Just record one spectral."));
|
||||
parser.addOption(recordOption);
|
||||
|
||||
|
||||
//<2F><><EFBFBD><D7BC><EFBFBD>ļ<EFBFBD>
|
||||
QCommandLineOption standardLightFilePath(QStringList() << "slfp" << "standard-light-file-path",
|
||||
QCoreApplication::translate("main", "set standard light file."),
|
||||
QCoreApplication::translate("main", "file"));
|
||||
parser.addOption(standardLightFilePath);
|
||||
|
||||
QCommandLineOption standardLightFileSelector(QStringList() << "slfs" << "standard-light-file-selector",
|
||||
QCoreApplication::translate("main", "select standard light file."),
|
||||
QCoreApplication::translate("main", "file"));
|
||||
parser.addOption(standardLightFileSelector);
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
|
||||
// An option with a value
|
||||
QCommandLineOption calFileOutputDirectory(QStringList() << "cfod" << "calibration-file-output-directory",
|
||||
QCoreApplication::translate("main", "Save cal file into <directory>."),
|
||||
QCoreApplication::translate("main", "directory"));
|
||||
// QString tmpPath1 = QDir::cleanPath(QDir::rootPath() + QDir::separator()+"calFile");
|
||||
QString tmpPath1 = "/home/data/Cal/";
|
||||
calFileOutputDirectory.setDefaultValue(tmpPath1);//<2F><><EFBFBD><EFBFBD>Ĭ<EFBFBD>ϲ<EFBFBD><CFB2><EFBFBD><EFBFBD><EFBFBD>QCoreApplication::applicationDirPath()<29><>standardLightFile
|
||||
parser.addOption(calFileOutputDirectory);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
// An option with a value
|
||||
QCommandLineOption calFileOutputName(QStringList() << "cfon" << "calibration-file-output-name",
|
||||
QCoreApplication::translate("main", "Cal file name."),
|
||||
QCoreApplication::translate("main", "fileName"));
|
||||
parser.addOption(calFileOutputName);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!parser.parse(QCoreApplication::arguments()))//Process the actual command line arguments given by the user
|
||||
{
|
||||
*errorMessage = parser.errorText();
|
||||
return CommandLineError;
|
||||
}
|
||||
|
||||
if (parser.isSet(versionOption))
|
||||
return CommandLineVersionRequested;
|
||||
|
||||
if (parser.isSet(helpOption))
|
||||
return CommandLineHelpRequested;
|
||||
|
||||
if (parser.isSet(deviceType))
|
||||
{
|
||||
const QString deviceTypeTmp = parser.value(deviceType);
|
||||
|
||||
if (deviceTypeTmp=="OPTOSKY")
|
||||
{
|
||||
query->deviceType = OPTOSKY;
|
||||
}
|
||||
else if(deviceTypeTmp=="OceanOptics")
|
||||
{
|
||||
query->deviceType = OceanOptics;
|
||||
}
|
||||
else
|
||||
{
|
||||
*errorMessage = "DeviceType set error.";
|
||||
return CommandLineError;
|
||||
}
|
||||
|
||||
}
|
||||
else//Ĭ<>ϲ<EFBFBD><CFB2><EFBFBD>
|
||||
{
|
||||
*errorMessage = "No deviceType set.";
|
||||
return CommandLineError;
|
||||
}
|
||||
|
||||
if (parser.isSet(serialPort))
|
||||
{
|
||||
const QString serialPortTmp = parser.value(serialPort);
|
||||
query->serialPort = serialPortTmp;
|
||||
}
|
||||
else//Ĭ<>ϲ<EFBFBD><CFB2><EFBFBD>
|
||||
{
|
||||
if (query->deviceType == OceanOptics)
|
||||
{
|
||||
;
|
||||
} else if (query->deviceType == OPTOSKY)
|
||||
{
|
||||
*errorMessage = "No serialPort set.";
|
||||
return CommandLineError;
|
||||
}
|
||||
}
|
||||
|
||||
if (parser.isSet(sleepTimeinSecond))
|
||||
{
|
||||
const QString timeTmp = parser.value(sleepTimeinSecond);
|
||||
query->sleepTimeinSecond = timeTmp.toInt();
|
||||
}
|
||||
else//Ĭ<>ϲ<EFBFBD><CFB2><EFBFBD>
|
||||
{
|
||||
QStringList tmp = sleepTimeinSecond.defaultValues();
|
||||
query->sleepTimeinSecond = tmp[0].toInt();
|
||||
}
|
||||
|
||||
if (parser.isSet(averageTimes))
|
||||
{
|
||||
const QString averageTimesTmp = parser.value(averageTimes);
|
||||
|
||||
string tttt=averageTimesTmp.toStdString();
|
||||
|
||||
query->averageTimes = averageTimesTmp.toInt();
|
||||
}
|
||||
else//Ĭ<>ϲ<EFBFBD><CFB2><EFBFBD>
|
||||
{
|
||||
QStringList tmp = averageTimes.defaultValues();
|
||||
query->averageTimes = tmp[0].toInt();
|
||||
}
|
||||
|
||||
if (parser.isSet(position))
|
||||
{
|
||||
const QString positionTmp = parser.value(position);
|
||||
query->position = positionTmp.toInt();
|
||||
}
|
||||
else
|
||||
{
|
||||
*errorMessage = "No position set.";
|
||||
return CommandLineError;
|
||||
}
|
||||
|
||||
query->justRecord = parser.isSet(recordOption);
|
||||
|
||||
|
||||
if (!parser.isSet(standardLightFilePath) && !parser.isSet(standardLightFileSelector))//û<><C3BB><EFBFBD><EFBFBD><EFBFBD>ö<EFBFBD><C3B6>걣<EFBFBD><EAB1A3><EFBFBD>ļ<EFBFBD>·<EFBFBD><C2B7>
|
||||
{
|
||||
*errorMessage = "No standard light file set.";
|
||||
return CommandLineError;
|
||||
}
|
||||
|
||||
if (parser.isSet(standardLightFileSelector))//
|
||||
{
|
||||
QString selector = parser.value(standardLightFileSelector);
|
||||
// QString standardLightFilePath_tmp = QDir::cleanPath(QDir::rootPath() + QDir::separator() + "standardLightFile" + QDir::separator() + selector);
|
||||
|
||||
QString tmp = "/home/data/Setting/StandardLightFile";
|
||||
QString standardLightFilePath_tmp = tmp + QDir::separator() + selector;
|
||||
|
||||
string xx=standardLightFilePath_tmp.toStdString();
|
||||
|
||||
//<2F>ж϶<D0B6><CFB6><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (!isFileExist(standardLightFilePath_tmp))
|
||||
{
|
||||
*errorMessage = "Standard light file '" + selector + "' does not exist!";
|
||||
return CommandLineError;
|
||||
}
|
||||
|
||||
query->standardLightFilePath = standardLightFilePath_tmp;
|
||||
}
|
||||
|
||||
if (parser.isSet(standardLightFilePath))//
|
||||
{
|
||||
query->standardLightFilePath = parser.value(standardLightFilePath);
|
||||
}
|
||||
|
||||
if (parser.isSet(integratingSphereDetectorValue))
|
||||
{
|
||||
if(query->standardLightFilePath.contains("ocean_optics.lmp",Qt::CaseSensitive))
|
||||
{
|
||||
query->integratingSphereDetectorValue = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
const QString integratingSphereDetectorValueTmp = parser.value(integratingSphereDetectorValue);
|
||||
query->integratingSphereDetectorValue = integratingSphereDetectorValueTmp.toInt();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*errorMessage = "No integratingSphereDetectorValue set.";
|
||||
return CommandLineError;
|
||||
}
|
||||
|
||||
|
||||
if (parser.isSet(calFileOutputDirectory))//<2F><><EFBFBD>걣<EFBFBD><EAB1A3><EFBFBD>ļ<EFBFBD>·<EFBFBD><C2B7>
|
||||
{
|
||||
query->calFileOutputDirectory = parser.value(calFileOutputDirectory);
|
||||
createDirectory(query->calFileOutputDirectory);//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD>
|
||||
}
|
||||
else//Ĭ<>ϲ<EFBFBD><CFB2><EFBFBD>
|
||||
{
|
||||
QStringList tmp = calFileOutputDirectory.defaultValues();
|
||||
QString directory = tmp[0];
|
||||
|
||||
createDirectory(directory);//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD>
|
||||
|
||||
query->calFileOutputDirectory = directory;
|
||||
}
|
||||
|
||||
if (parser.isSet(calFileOutputName))//-------
|
||||
{
|
||||
QString calFileOutputNameTmp = QDir::cleanPath(query->calFileOutputDirectory + QDir::separator() + parser.value(calFileOutputName));
|
||||
query->calFileOutputName = calFileOutputNameTmp;
|
||||
}
|
||||
else//Ĭ<>ϲ<EFBFBD><CFB2><EFBFBD>
|
||||
{
|
||||
query->calFileOutputName = "";//ʹ<>ô˲<C3B4><CBB2><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>query->calFileOutputNameΪ<65><CEAA> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>˱<EFBFBD><CBB1><EFBFBD><EFBFBD><EFBFBD>ֵ
|
||||
}
|
||||
|
||||
// const QStringList positionalArguments = parser.positionalArguments();
|
||||
// if (positionalArguments.isEmpty())
|
||||
// {
|
||||
// *errorMessage = "Argument 'name' missing.";
|
||||
// return CommandLineError;
|
||||
// }
|
||||
// if (positionalArguments.size() > 1)
|
||||
// {
|
||||
// *errorMessage = "Several 'name' arguments specified.";
|
||||
// return CommandLineError;
|
||||
// }
|
||||
|
||||
return CommandLineOk;
|
||||
}
|
||||
|
||||
bool copyFileToPath(QString sourceDir ,QString toDir, bool coverFileIfExist)
|
||||
{
|
||||
toDir.replace("\\","/");
|
||||
if (sourceDir == toDir){
|
||||
return true;
|
||||
}
|
||||
if (!QFile::exists(sourceDir)){
|
||||
return false;
|
||||
}
|
||||
QDir *createfile = new QDir;
|
||||
bool exist = createfile->exists(toDir);
|
||||
if (exist){
|
||||
if(coverFileIfExist){
|
||||
createfile->remove(toDir);
|
||||
}
|
||||
}//end if
|
||||
|
||||
if(!QFile::copy(sourceDir, toDir))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void logout(QString str)
|
||||
{
|
||||
std::cout << str.toStdString() << "<br>";
|
||||
std::fflush(stdout);
|
||||
}
|
||||
|
||||
void createDirectory(QString fullPath)//
|
||||
{
|
||||
QDir dir(fullPath);
|
||||
if (dir.exists())
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
bool ok = dir.mkdir(fullPath);//ֻ<><D6BB><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>Ŀ¼<C4BF><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뱣֤<EBB1A3>ϼ<EFBFBD>Ŀ¼<C4BF><C2BC><EFBFBD><EFBFBD>
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
bool isFileExist(QString fullFileName)
|
||||
{
|
||||
QFileInfo fileInfo(fullFileName);
|
||||
if (fileInfo.isFile())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int getNonlinearityCoeffs1(double * nonlinearityCoeffs)
|
||||
{
|
||||
int number_of_devices;
|
||||
long *device_ids;
|
||||
int i;
|
||||
int test_index;
|
||||
int flag;
|
||||
int error = 0;
|
||||
char nameBuffer[80];
|
||||
|
||||
|
||||
/* Give the driver a chance to initialize itself */
|
||||
sbapi_initialize();
|
||||
|
||||
// printf("Probing for devices...\n"); fflush(stdout);
|
||||
sbapi_probe_devices();
|
||||
|
||||
//#define RS232_TEST
|
||||
#ifdef RS232_TEST
|
||||
printf("Adding an STS at 9600 baud...\n");
|
||||
/* Uncomment for Linux */
|
||||
//sbapi_add_RS232_device_location("STS", "/dev/ttyS0", 9600);
|
||||
//sbapi_add_RS232_device_location("STS", "/dev/ttyUSB0", 9600);
|
||||
|
||||
/* Uncomment for Windows */
|
||||
//sbapi_add_RS232_device_location("STS", "COM1", 9600);
|
||||
|
||||
/* Uncomment for e.g. USB-RS232 adapter under OSX */
|
||||
//sbapi_add_RS232_device_location("STS", "/dev/tty.KeySerial1", 9600);
|
||||
//sbapi_add_RS232_device_location("STS", "/dev/tty.usbserial", 9600);
|
||||
#endif
|
||||
|
||||
/* This shows how to add network devices (note that most use TCP/IP) */
|
||||
//sbapi_add_TCPIPv4_device_location("Jaz", "192.168.1.150", 7654);
|
||||
//sbapi_add_TCPIPv4_device_location("Blaze", "192.168.1.151", 57357);
|
||||
|
||||
// printf("Getting device count...\n"); fflush(stdout);
|
||||
number_of_devices = sbapi_get_number_of_device_ids();
|
||||
|
||||
// printf("Device count is %d\n", number_of_devices);
|
||||
if(0 == number_of_devices) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// printf("Getting device IDs...\n");
|
||||
device_ids = (long *)calloc(number_of_devices, sizeof(long));
|
||||
number_of_devices = sbapi_get_device_ids(device_ids, number_of_devices);
|
||||
// printf("Got %d device ID%s.\n", number_of_devices, number_of_devices == 1 ? "" : "s");
|
||||
|
||||
int number;
|
||||
for(i = 0; i < number_of_devices; i++) {
|
||||
// printf("%d: Device 0x%02lX:\n", i, device_ids[i]);
|
||||
// printf("\tGetting device type...\n");
|
||||
flag = sbapi_get_device_type(device_ids[i], &error, nameBuffer, 79);
|
||||
// printf("\t\tResult is (%d) [%s]\n", flag, sbapi_get_error_string(error));
|
||||
if(flag > 0) {
|
||||
// printf("\tDevice type: [%s]\n", nameBuffer);
|
||||
}
|
||||
|
||||
/* Open the device */
|
||||
// printf("\tAttempting to open:\n");
|
||||
flag = sbapi_open_device(device_ids[i], &error);
|
||||
// printf("\t\tResult is (%d) [%s]\n", flag, sbapi_get_error_string(error));
|
||||
|
||||
// jump to the next iteration if there was a problem
|
||||
if(flag != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
number = getNonlinearityCoeffs2(device_ids[i],nonlinearityCoeffs);
|
||||
|
||||
/* Close the device */
|
||||
// printf("\tAttempting to close:\n");
|
||||
sbapi_close_device(device_ids[i], &error);
|
||||
// printf("\t\tResult is (%d) [%s]\n", flag, sbapi_get_error_string(error));
|
||||
}
|
||||
free(device_ids);
|
||||
|
||||
// printf("Finished testing.\n");
|
||||
|
||||
/* Clean up memory allocated by the driver */
|
||||
sbapi_shutdown();
|
||||
|
||||
return number;
|
||||
}//
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>ֵ<EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3>ϵ<EFBFBD><CFB5><EFBFBD>ĸ<EFBFBD><C4B8><EFBFBD>
|
||||
int getNonlinearityCoeffs2(long deviceID, double * nonlinearityCoeffs)
|
||||
{
|
||||
int error = 0;
|
||||
int number_of_nonlinearity_coeff_features;
|
||||
long *nonlinearity_coeff_feature_ids = 0;
|
||||
double buffer[10];
|
||||
int i;
|
||||
int length = 0;
|
||||
|
||||
// printf("\n\tTesting nonlinearity coefficient features:\n");
|
||||
|
||||
// printf("\t\tGetting number of nonlinearity coefficient features:\n");
|
||||
number_of_nonlinearity_coeff_features =
|
||||
sbapi_get_number_of_nonlinearity_coeffs_features(deviceID, &error);
|
||||
// printf("\t\t\tResult is %d [%s]\n", number_of_nonlinearity_coeff_features,
|
||||
// sbapi_get_error_string(error));
|
||||
|
||||
if(0 == number_of_nonlinearity_coeff_features) {
|
||||
printf("\tNo nonlinearity coefficient capabilities found.\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
nonlinearity_coeff_feature_ids =
|
||||
(long *)calloc(number_of_nonlinearity_coeff_features, sizeof(long));
|
||||
// printf("\t\tGetting nonlinearity coefficient feature IDs...\n");
|
||||
number_of_nonlinearity_coeff_features = sbapi_get_nonlinearity_coeffs_features(
|
||||
deviceID, &error, nonlinearity_coeff_feature_ids,
|
||||
number_of_nonlinearity_coeff_features);
|
||||
// printf("\t\t\tResult is %d [%s]\n", number_of_nonlinearity_coeff_features,
|
||||
// sbapi_get_error_string(error));
|
||||
|
||||
for(i = 0; i < number_of_nonlinearity_coeff_features; i++)
|
||||
{
|
||||
// printf("\t\t%d: Testing device 0x%02lX, nonlinearity coeffs 0x%02lX\n",
|
||||
// i, deviceID, nonlinearity_coeff_feature_ids[i]);
|
||||
|
||||
// printf("\t\t\tAttempting to get nonlinearity coefficients...\n");
|
||||
memset(nonlinearityCoeffs, (int)0, 20);//----------------------------------------------------------------------------
|
||||
length = sbapi_nonlinearity_coeffs_get(deviceID,
|
||||
nonlinearity_coeff_feature_ids[i], &error, nonlinearityCoeffs, 20);
|
||||
// printf("\t\t\t\tResult is %d [%s]\n", length, sbapi_get_error_string(error));
|
||||
|
||||
if(0 == error && length > 0) {
|
||||
// printf("\t\t\t\tFirst calibration term: %1.2e\n", nonlinearityCoeffs[0]);
|
||||
// printf("\t\t\t\tFirst calibration term: %1.2e\n", nonlinearityCoeffs[1]);
|
||||
// printf("\t\t\t\tFirst calibration term: %1.2e\n", nonlinearityCoeffs[2]);
|
||||
// printf("\t\t\t\tFirst calibration term: %1.2e\n", nonlinearityCoeffs[3]);
|
||||
// printf("\t\t\t\tFirst calibration term: %1.2e\n", nonlinearityCoeffs[4]);
|
||||
// printf("\t\t\t\tFirst calibration term: %1.2e\n", nonlinearityCoeffs[5]);
|
||||
// printf("\t\t\t\tFirst calibration term: %1.2e\n", nonlinearityCoeffs[6]);
|
||||
}
|
||||
|
||||
// printf("\t\t%d: Finished testing device 0x%02lX, nonlinearity coeffs 0x%02lX\n",
|
||||
// i, deviceID, nonlinearity_coeff_feature_ids[i]);
|
||||
}
|
||||
free(nonlinearity_coeff_feature_ids);
|
||||
|
||||
|
||||
|
||||
// printf("\tFinished testing nonlinearity coefficient capabilities.\n");
|
||||
|
||||
return length;
|
||||
}
|
||||
@ -0,0 +1,276 @@
|
||||
#include "Header_Files/oceanOpticsFiberImager.h"
|
||||
|
||||
OceanOpticsFiberImager::OceanOpticsFiberImager(double * nonlinearityCoeffs, int numberOfCoeffs)
|
||||
{
|
||||
m_FiberSpectrometer = NULL;
|
||||
|
||||
m_nonlinearityCoeffs = nonlinearityCoeffs;
|
||||
m_iNumberOfNonlinearityCoeffs = numberOfCoeffs;
|
||||
}
|
||||
|
||||
OceanOpticsFiberImager::~OceanOpticsFiberImager()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OceanOpticsFiberImager::connectFiberSpectrometer(QString& SN, QString& pixelCount, QString& wavelengthInfo)
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
m_FiberSpectrometer = new OceanOptics_lib();
|
||||
|
||||
m_FiberSpectrometer->Initialize();
|
||||
|
||||
getDeviceInfo(m_deviceInfo);
|
||||
// m_FiberSpectrometer->GetDeviceInfo(m_deviceInfo);
|
||||
|
||||
getDeviceAttribute(m_deviceAttribute);
|
||||
// m_FiberSpectrometer->GetDeviceAttribute(m_deviceAttribute);
|
||||
|
||||
SN = QString::fromStdString(m_deviceInfo.strSN);
|
||||
pixelCount = QString::number(m_deviceAttribute.iPixels);
|
||||
wavelengthInfo = QString::number(m_deviceAttribute.fWaveLengthInNM[0]) + "--" + QString::number(m_deviceAttribute.fWaveLengthInNM[m_deviceAttribute.iPixels - 1]);
|
||||
|
||||
m_FiberSpectrometer->SetDeviceTemperature(-10);
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>dnֵ<6E><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD>أ<EFBFBD>
|
||||
string qepro = "QEP";
|
||||
string flame = "FLMS";
|
||||
if (m_deviceInfo.strSN.find(qepro) != string::npos)
|
||||
{
|
||||
m_MaxValueOfFiberSpectrometer = 200000;
|
||||
}
|
||||
else if (m_deviceInfo.strSN.find(flame) != string::npos)
|
||||
{
|
||||
m_MaxValueOfFiberSpectrometer = 65535;
|
||||
}
|
||||
else//û<><C3BB><EFBFBD>ҵ<EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> dnֵ<6E><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void OceanOpticsFiberImager::disconnectFiberSpectrometer()
|
||||
{
|
||||
m_FiberSpectrometer->Close();
|
||||
}
|
||||
|
||||
void OceanOpticsFiberImager::getDeviceAttribute(DeviceAttribute& deviceAttribute)
|
||||
{
|
||||
m_FiberSpectrometer->GetDeviceAttribute(deviceAttribute);
|
||||
}
|
||||
|
||||
void OceanOpticsFiberImager::getDeviceInfo(DeviceInfo& deviceInfo)
|
||||
{
|
||||
m_FiberSpectrometer->GetDeviceInfo(deviceInfo);
|
||||
}
|
||||
|
||||
void OceanOpticsFiberImager::setExposureTime(int iExposureTimeInMS)
|
||||
{
|
||||
m_FiberSpectrometer->SetExposureTime(iExposureTimeInMS);
|
||||
}
|
||||
|
||||
void OceanOpticsFiberImager::getExposureTime(int &iExposureTimeInMS)
|
||||
{
|
||||
m_FiberSpectrometer->GetExposureTime(iExposureTimeInMS);
|
||||
}
|
||||
|
||||
void OceanOpticsFiberImager::getDeviceTemperature(float &fTemperature)
|
||||
{
|
||||
m_FiberSpectrometer->GetDeviceTemperature(fTemperature);
|
||||
}
|
||||
|
||||
void OceanOpticsFiberImager::singleShot(DataFrame &dfData)
|
||||
{
|
||||
m_FiberSpectrometer->SingleShot(dfData);
|
||||
|
||||
if(m_iNumberOfNonlinearityCoeffs==0)//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ0<CEAA><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô<EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3>
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3>
|
||||
for (int i = 0; i < m_deviceAttribute.iPixels; i++)
|
||||
{
|
||||
dfData.lData[i] = dfData.lData[i] / (m_nonlinearityCoeffs[0]
|
||||
+ m_nonlinearityCoeffs[1] * dfData.lData[i]
|
||||
+ m_nonlinearityCoeffs[2] * pow(dfData.lData[i], 2)
|
||||
+ m_nonlinearityCoeffs[3] * pow(dfData.lData[i], 3)
|
||||
+ m_nonlinearityCoeffs[4] * pow(dfData.lData[i], 4)
|
||||
+ m_nonlinearityCoeffs[5] * pow(dfData.lData[i], 5)
|
||||
+ m_nonlinearityCoeffs[6] * pow(dfData.lData[i], 6)
|
||||
+ m_nonlinearityCoeffs[7] * pow(dfData.lData[i], 7)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void OceanOpticsFiberImager::getNonlinearityCoeffs(coeffsFrame &coeffs)
|
||||
{
|
||||
printf("This is OceanOpticsFiberImager.\n");
|
||||
|
||||
m_FiberSpectrometer->test_nonlinearity_coeffs_feature();
|
||||
}
|
||||
|
||||
void OceanOpticsFiberImager::recordDark(QString path)
|
||||
{
|
||||
//<2F><>ȡ<EFBFBD>豸<EFBFBD><E8B1B8>Ϣ
|
||||
DeviceAttribute attribute;
|
||||
DeviceInfo deviceInfo;
|
||||
getDeviceAttribute(attribute);
|
||||
getDeviceInfo(deviceInfo);
|
||||
|
||||
//<2F>ɼ<EFBFBD><C9BC><EFBFBD>֡
|
||||
singleShot(m_DarkData);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>csv
|
||||
QDateTime curDateTime = QDateTime::currentDateTime();
|
||||
QString currentTime = curDateTime.toString("yyyy_MM_dd_hh_mm_ss");
|
||||
|
||||
QString fileName = path + "/" + currentTime + "_" + QString::fromStdString(deviceInfo.strSN) + "_darkSpectral_dn.csv";
|
||||
std::ofstream outfile(fileName.toStdString().c_str());
|
||||
|
||||
for (int i = 0; i < attribute.iPixels; i++)
|
||||
{
|
||||
if (i==0)
|
||||
{
|
||||
outfile << m_DarkData.usExposureTimeInMS << std::endl;//
|
||||
}
|
||||
outfile << attribute.fWaveLengthInNM[i] << "," << m_DarkData.lData[i] << std::endl;
|
||||
}
|
||||
|
||||
outfile.close();
|
||||
}
|
||||
|
||||
void OceanOpticsFiberImager::recordTarget(int recordTimes, QString path)
|
||||
{
|
||||
//<2F><>ȡ<EFBFBD>豸<EFBFBD><E8B1B8>Ϣ
|
||||
DeviceAttribute attribute;
|
||||
DeviceInfo deviceInfo;
|
||||
getDeviceAttribute(attribute);
|
||||
getDeviceInfo(deviceInfo);
|
||||
|
||||
|
||||
DataFrame integratingSphereData_tmp;
|
||||
|
||||
for (int i = 0; i < recordTimes; i++)
|
||||
{
|
||||
singleShot(integratingSphereData_tmp);
|
||||
|
||||
if (i == 0)//<2F><>integratingSphereData_tmp<6D>е<EFBFBD><D0B5>ع<EFBFBD>ʱ<EFBFBD>䡢<EFBFBD>¶ȵ<C2B6><C8B5><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>m_IntegratingSphereData
|
||||
{
|
||||
m_IntegratingSphereData = integratingSphereData_tmp;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < attribute.iPixels; i++)
|
||||
{
|
||||
m_IntegratingSphereData.lData[i] += integratingSphereData_tmp.lData[i];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (int i = 0; i < attribute.iPixels; i++)
|
||||
{
|
||||
m_IntegratingSphereData.lData[i] = m_IntegratingSphereData.lData[i] / recordTimes;
|
||||
}
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>csv
|
||||
QDateTime curDateTime = QDateTime::currentDateTime();
|
||||
QString currentTime = curDateTime.toString("yyyy_MM_dd_hh_mm_ss");
|
||||
|
||||
QString fileName = path + "/" + currentTime + "_" + QString::fromStdString(deviceInfo.strSN) + "_integratingSphereSpectral_dn.csv";
|
||||
std::ofstream outfile(fileName.toStdString().c_str());
|
||||
|
||||
for (int i = 0; i < attribute.iPixels; i++)//
|
||||
{
|
||||
if (i==0)
|
||||
{
|
||||
outfile << m_IntegratingSphereData.usExposureTimeInMS << std::endl;
|
||||
}
|
||||
outfile << attribute.fWaveLengthInNM[i] << "," << m_IntegratingSphereData.lData[i] << std::endl;
|
||||
}
|
||||
|
||||
outfile.close();
|
||||
}
|
||||
|
||||
void OceanOpticsFiberImager::autoExpose()
|
||||
{
|
||||
DeviceAttribute attribute;
|
||||
getDeviceAttribute(attribute);
|
||||
|
||||
int iterations = 0;//<2F><>¼<EFBFBD>Զ<EFBFBD><D4B6>ع<EFBFBD><D8B9>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD>
|
||||
int maxIterations = 10;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
ZZ_U32 thresholdValue = m_MaxValueOfFiberSpectrometer * 0.8;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ80%
|
||||
ZZ_U16 range = 10000;
|
||||
|
||||
//<2F><><EFBFBD>ó<EFBFBD>ʼ<EFBFBD>ع<EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
int exposureTimeInMS = 200;
|
||||
setExposureTime(exposureTimeInMS);
|
||||
emit sendExposureTimeSignal(exposureTimeInMS);
|
||||
|
||||
DataFrame integratingSphereData_tmp;
|
||||
while (true)
|
||||
{
|
||||
if (iterations > maxIterations)//<2F>Ƿ<C7B7><F1B3ACB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
singleShot(integratingSphereData_tmp);
|
||||
ZZ_S32 maxValue = GetMaxValue(integratingSphereData_tmp.lData, attribute.iPixels);
|
||||
|
||||
if (maxValue < thresholdValue && maxValue < (thresholdValue - range))//<2F>ع<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>С
|
||||
{
|
||||
double scale = 1 + ((double)(thresholdValue - maxValue) / (double)thresholdValue);
|
||||
|
||||
int exposureTime;
|
||||
m_FiberSpectrometer->GetExposureTime(exposureTime);
|
||||
m_FiberSpectrometer->SetExposureTime(exposureTime * scale);
|
||||
|
||||
emit sendExposureTimeSignal(exposureTime);
|
||||
|
||||
ZZ_S32 m = GetMaxValue(integratingSphereData_tmp.lData, attribute.iPixels);
|
||||
|
||||
std::cout << "<EFBFBD>Զ<EFBFBD><EFBFBD>ع<EFBFBD>-----------" << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵΪ" << m << std::endl;
|
||||
}
|
||||
else if (maxValue > thresholdValue && maxValue > (thresholdValue + range))//<2F>ع<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
{
|
||||
double scale = 1 - ((double)(maxValue - thresholdValue) / (double)thresholdValue);
|
||||
|
||||
int exposureTime;
|
||||
m_FiberSpectrometer->GetExposureTime(exposureTime);
|
||||
m_FiberSpectrometer->SetExposureTime(exposureTime * scale);
|
||||
|
||||
emit sendExposureTimeSignal(exposureTime);
|
||||
|
||||
ZZ_S32 m = GetMaxValue(integratingSphereData_tmp.lData, attribute.iPixels);
|
||||
|
||||
std::cout << "<EFBFBD>Զ<EFBFBD><EFBFBD>ع<EFBFBD>-----------" << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵΪ" << m << std::endl;
|
||||
}
|
||||
else//<2F>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ع<EFBFBD>ʱ<EFBFBD>䣬<EFBFBD><E4A3AC><EFBFBD><EFBFBD>whileѭ<65><D1AD>
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
iterations++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ZZ_S32 OceanOpticsFiberImager::GetMaxValue(ZZ_S32 * dark, int number)
|
||||
{
|
||||
ZZ_S32 max = 0;
|
||||
for (size_t i = 0; i < number; i++)
|
||||
{
|
||||
if (dark[i] > max)
|
||||
{
|
||||
max = dark[i];
|
||||
}
|
||||
}
|
||||
//std::cout << "<22><>֡<EFBFBD><D6A1><EFBFBD><EFBFBD>ֵΪ" << max << std::endl;
|
||||
return max;
|
||||
}
|
||||
414
othersoft/calibration_console/cmake-build-debug/CMakeCache.txt
Normal file
414
othersoft/calibration_console/cmake-build-debug/CMakeCache.txt
Normal file
@ -0,0 +1,414 @@
|
||||
# This is the CMakeCache file.
|
||||
# For build in directory: d:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug
|
||||
# It was generated by CMake: C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cmake.exe
|
||||
# You can edit this file to change values found and used by cmake.
|
||||
# If you do not want to change any of the values, simply exit the editor.
|
||||
# If you do want to change a value, simply edit, save, and exit the editor.
|
||||
# The syntax for the file is as follows:
|
||||
# KEY:TYPE=VALUE
|
||||
# KEY is the name of a variable in the cache.
|
||||
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
|
||||
# VALUE is the current value for the KEY.
|
||||
|
||||
########################
|
||||
# EXTERNAL cache entries
|
||||
########################
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_ADDR2LINE:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/addr2line.exe
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_AR:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ar.exe
|
||||
|
||||
//Choose the type of build, options are: None Debug Release RelWithDebInfo
|
||||
// MinSizeRel ...
|
||||
CMAKE_BUILD_TYPE:STRING=Debug
|
||||
|
||||
//CXX compiler
|
||||
CMAKE_CXX_COMPILER:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/c++.exe
|
||||
|
||||
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_CXX_COMPILER_AR:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ar.exe
|
||||
|
||||
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ranlib.exe
|
||||
|
||||
//Flags used by the CXX compiler during all build types.
|
||||
CMAKE_CXX_FLAGS:STRING=
|
||||
|
||||
//Flags used by the CXX compiler during DEBUG builds.
|
||||
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
|
||||
|
||||
//Flags used by the CXX compiler during MINSIZEREL builds.
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
|
||||
|
||||
//Flags used by the CXX compiler during RELEASE builds.
|
||||
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
|
||||
|
||||
//Flags used by the CXX compiler during RELWITHDEBINFO builds.
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
|
||||
|
||||
//Libraries linked by default with all C++ applications.
|
||||
CMAKE_CXX_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
|
||||
|
||||
//C compiler
|
||||
CMAKE_C_COMPILER:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc.exe
|
||||
|
||||
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_C_COMPILER_AR:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ar.exe
|
||||
|
||||
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_C_COMPILER_RANLIB:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ranlib.exe
|
||||
|
||||
//Flags used by the C compiler during all build types.
|
||||
CMAKE_C_FLAGS:STRING=
|
||||
|
||||
//Flags used by the C compiler during DEBUG builds.
|
||||
CMAKE_C_FLAGS_DEBUG:STRING=-g
|
||||
|
||||
//Flags used by the C compiler during MINSIZEREL builds.
|
||||
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
|
||||
|
||||
//Flags used by the C compiler during RELEASE builds.
|
||||
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
|
||||
|
||||
//Flags used by the C compiler during RELWITHDEBINFO builds.
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
|
||||
|
||||
//Libraries linked by default with all C applications.
|
||||
CMAKE_C_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_DLLTOOL:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/dlltool.exe
|
||||
|
||||
//Flags used by the linker during all build types.
|
||||
CMAKE_EXE_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during DEBUG builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during MINSIZEREL builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during RELEASE builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during RELWITHDEBINFO builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Enable/Disable output of compile commands during generation.
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=
|
||||
|
||||
//Convert GNU import libraries to MS format (requires Visual Studio)
|
||||
CMAKE_GNUtoMS:BOOL=OFF
|
||||
|
||||
//Install path prefix, prepended onto install directories.
|
||||
CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/ocean_optics_calibration_console
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_LINKER:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ld.exe
|
||||
|
||||
//make program
|
||||
CMAKE_MAKE_PROGRAM:FILEPATH=C:/Program Files/JetBrains/CLion 2021.1.1/bin/ninja/win/ninja.exe
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// all build types.
|
||||
CMAKE_MODULE_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// DEBUG builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// MINSIZEREL builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// RELEASE builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// RELWITHDEBINFO builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_NM:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/nm.exe
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_OBJCOPY:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/objcopy.exe
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_OBJDUMP:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/objdump.exe
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_DESCRIPTION:STATIC=
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_NAME:STATIC=ocean_optics_calibration_console
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_RANLIB:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ranlib.exe
|
||||
|
||||
//RC compiler
|
||||
CMAKE_RC_COMPILER:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/windres.exe
|
||||
|
||||
//Flags for Windows Resource Compiler during all build types.
|
||||
CMAKE_RC_FLAGS:STRING=
|
||||
|
||||
//Flags for Windows Resource Compiler during DEBUG builds.
|
||||
CMAKE_RC_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags for Windows Resource Compiler during MINSIZEREL builds.
|
||||
CMAKE_RC_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags for Windows Resource Compiler during RELEASE builds.
|
||||
CMAKE_RC_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags for Windows Resource Compiler during RELWITHDEBINFO builds.
|
||||
CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_READELF:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/readelf.exe
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during all build types.
|
||||
CMAKE_SHARED_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during DEBUG builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during MINSIZEREL builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during RELEASE builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during RELWITHDEBINFO builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//If set, runtime paths are not added when installing shared libraries,
|
||||
// but are added when building.
|
||||
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
|
||||
|
||||
//If set, runtime paths are not added when using shared libraries.
|
||||
CMAKE_SKIP_RPATH:BOOL=NO
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during all build types.
|
||||
CMAKE_STATIC_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during DEBUG builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during MINSIZEREL builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during RELEASE builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during RELWITHDEBINFO builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_STRIP:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/strip.exe
|
||||
|
||||
//If this value is on, makefiles will be generated without the
|
||||
// .SILENT directive, and all commands will be echoed to the console
|
||||
// during the make. This is useful for debugging only. With Visual
|
||||
// Studio IDE projects all commands are done without /nologo.
|
||||
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
|
||||
|
||||
//The directory containing a CMake configuration file for Qt5Core.
|
||||
Qt5Core_DIR:PATH=C:/Qt/Qt5.12.7/5.12.7/mingw73_64/lib/cmake/Qt5Core
|
||||
|
||||
//The directory containing a CMake configuration file for Qt5Network.
|
||||
Qt5Network_DIR:PATH=C:/Qt/Qt5.12.7/5.12.7/mingw73_64/lib/cmake/Qt5Network
|
||||
|
||||
//The directory containing a CMake configuration file for Qt5SerialPort.
|
||||
Qt5SerialPort_DIR:PATH=C:/Qt/Qt5.12.7/5.12.7/mingw73_64/lib/cmake/Qt5SerialPort
|
||||
|
||||
//The directory containing a CMake configuration file for Qt5.
|
||||
Qt5_DIR:PATH=C:/Qt/Qt5.12.7/5.12.7/mingw73_64/lib/cmake/Qt5
|
||||
|
||||
//Value Computed by CMake
|
||||
ocean_optics_calibration_console_BINARY_DIR:STATIC=D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug
|
||||
|
||||
//Value Computed by CMake
|
||||
ocean_optics_calibration_console_IS_TOP_LEVEL:STATIC=ON
|
||||
|
||||
//Value Computed by CMake
|
||||
ocean_optics_calibration_console_SOURCE_DIR:STATIC=D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console
|
||||
|
||||
|
||||
########################
|
||||
# INTERNAL cache entries
|
||||
########################
|
||||
|
||||
//ADVANCED property for variable: CMAKE_ADDR2LINE
|
||||
CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_AR
|
||||
CMAKE_AR-ADVANCED:INTERNAL=1
|
||||
//This is the directory where this CMakeCache.txt was created
|
||||
CMAKE_CACHEFILE_DIR:INTERNAL=d:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug
|
||||
//Major version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
|
||||
//Minor version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MINOR_VERSION:INTERNAL=21
|
||||
//Patch version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_PATCH_VERSION:INTERNAL=1
|
||||
//Path to CMake executable.
|
||||
CMAKE_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cmake.exe
|
||||
//Path to cpack program executable.
|
||||
CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cpack.exe
|
||||
//Path to ctest program executable.
|
||||
CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/ctest.exe
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER
|
||||
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
|
||||
CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
|
||||
CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS
|
||||
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_STANDARD_LIBRARIES
|
||||
CMAKE_CXX_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER
|
||||
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER_AR
|
||||
CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
|
||||
CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS
|
||||
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
|
||||
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
|
||||
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_STANDARD_LIBRARIES
|
||||
CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_DLLTOOL
|
||||
CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
|
||||
//Executable file format
|
||||
CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
|
||||
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
|
||||
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
|
||||
//Name of external makefile project generator.
|
||||
CMAKE_EXTRA_GENERATOR:INTERNAL=
|
||||
//Name of generator.
|
||||
CMAKE_GENERATOR:INTERNAL=Ninja
|
||||
//Generator instance identifier.
|
||||
CMAKE_GENERATOR_INSTANCE:INTERNAL=
|
||||
//Name of generator platform.
|
||||
CMAKE_GENERATOR_PLATFORM:INTERNAL=
|
||||
//Name of generator toolset.
|
||||
CMAKE_GENERATOR_TOOLSET:INTERNAL=
|
||||
//Source directory with the top level CMakeLists.txt file for this
|
||||
// project
|
||||
CMAKE_HOME_DIRECTORY:INTERNAL=D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console
|
||||
//ADVANCED property for variable: CMAKE_LINKER
|
||||
CMAKE_LINKER-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
|
||||
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
|
||||
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_NM
|
||||
CMAKE_NM-ADVANCED:INTERNAL=1
|
||||
//number of local generators
|
||||
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_OBJCOPY
|
||||
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_OBJDUMP
|
||||
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
|
||||
//Platform information initialized
|
||||
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_RANLIB
|
||||
CMAKE_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_RC_COMPILER
|
||||
CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1
|
||||
CMAKE_RC_COMPILER_WORKS:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_RC_FLAGS
|
||||
CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_RC_FLAGS_DEBUG
|
||||
CMAKE_RC_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_RC_FLAGS_MINSIZEREL
|
||||
CMAKE_RC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_RC_FLAGS_RELEASE
|
||||
CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_READELF
|
||||
CMAKE_READELF-ADVANCED:INTERNAL=1
|
||||
//Path to CMake installation.
|
||||
CMAKE_ROOT:INTERNAL=C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
|
||||
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
|
||||
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
|
||||
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SKIP_RPATH
|
||||
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
|
||||
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
|
||||
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STRIP
|
||||
CMAKE_STRIP-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
|
||||
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
|
||||
|
||||
@ -0,0 +1,472 @@
|
||||
The system is: Windows - 10.0.19044 - AMD64
|
||||
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
|
||||
Compiler: C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc.exe
|
||||
Build flags:
|
||||
Id flags:
|
||||
|
||||
The output was:
|
||||
0
|
||||
|
||||
|
||||
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"
|
||||
|
||||
The C compiler identification is GNU, found in "D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/CMakeFiles/3.21.1/CompilerIdC/a.exe"
|
||||
|
||||
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
|
||||
Compiler: C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/c++.exe
|
||||
Build flags:
|
||||
Id flags:
|
||||
|
||||
The output was:
|
||||
0
|
||||
|
||||
|
||||
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"
|
||||
|
||||
The CXX compiler identification is GNU, found in "D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/CMakeFiles/3.21.1/CompilerIdCXX/a.exe"
|
||||
|
||||
Detecting C compiler ABI info compiled with the following output:
|
||||
Change Dir: D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/CMakeFiles/CMakeTmp
|
||||
|
||||
Run Build Command(s):C:/Program Files/JetBrains/CLion 2021.1.1/bin/ninja/win/ninja.exe cmTC_e1679 && [1/2] Building C object CMakeFiles/cmTC_e1679.dir/CMakeCCompilerABI.c.obj
|
||||
|
||||
Using built-in specs.
|
||||
|
||||
COLLECT_GCC=C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\gcc.exe
|
||||
|
||||
Target: x86_64-w64-mingw32
|
||||
|
||||
Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/lib '
|
||||
|
||||
Thread model: posix
|
||||
|
||||
gcc version 7.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)
|
||||
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e1679.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona'
|
||||
|
||||
C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/cc1.exe -quiet -v -iprefix C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/ -D_REENTRANT C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=core2 -march=nocona -auxbase-strip CMakeFiles/cmTC_e1679.dir/CMakeCCompilerABI.c.obj -version -o C:\Users\xin\AppData\Local\Temp\ccHyc9vt.s
|
||||
|
||||
GNU C11 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32)
|
||||
|
||||
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP
|
||||
|
||||
|
||||
|
||||
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
|
||||
|
||||
ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include"
|
||||
|
||||
ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64C:/msys64-2/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include"
|
||||
|
||||
ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed"
|
||||
|
||||
ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include"
|
||||
|
||||
ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/mingw/include"
|
||||
|
||||
#include "..." search starts here:
|
||||
|
||||
#include <...> search starts here:
|
||||
|
||||
C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include
|
||||
|
||||
C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed
|
||||
|
||||
C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include
|
||||
|
||||
End of search list.
|
||||
|
||||
GNU C11 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32)
|
||||
|
||||
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP
|
||||
|
||||
|
||||
|
||||
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
|
||||
|
||||
Compiler executable checksum: afb3948cd5c0c8f535365414e7310436
|
||||
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e1679.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona'
|
||||
|
||||
C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/as.exe -v -o CMakeFiles/cmTC_e1679.dir/CMakeCCompilerABI.c.obj C:\Users\xin\AppData\Local\Temp\ccHyc9vt.s
|
||||
|
||||
GNU assembler version 2.30 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.30
|
||||
|
||||
COMPILER_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/
|
||||
|
||||
LIBRARY_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../
|
||||
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e1679.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona'
|
||||
|
||||
[2/2] Linking C executable cmTC_e1679.exe
|
||||
|
||||
Using built-in specs.
|
||||
|
||||
COLLECT_GCC=C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\gcc.exe
|
||||
|
||||
COLLECT_LTO_WRAPPER=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe
|
||||
|
||||
Target: x86_64-w64-mingw32
|
||||
|
||||
Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/lib '
|
||||
|
||||
Thread model: posix
|
||||
|
||||
gcc version 7.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)
|
||||
|
||||
COMPILER_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/
|
||||
|
||||
LIBRARY_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../
|
||||
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_e1679.exe' '-mtune=core2' '-march=nocona'
|
||||
|
||||
C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/collect2.exe -plugin C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/liblto_plugin-0.dll -plugin-opt=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\xin\AppData\Local\Temp\cc1qmxxy.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-liconv -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt --sysroot=C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 -m i386pep -Bdynamic -o cmTC_e1679.exe C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtbegin.o -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0 -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../.. CMakeFiles/cmTC_e1679.dir/CMakeCCompilerABI.c.obj --out-implib libcmTC_e1679.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtend.o
|
||||
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_e1679.exe' '-mtune=core2' '-march=nocona'
|
||||
|
||||
|
||||
|
||||
|
||||
Parsed C implicit include dir info from above output: rv=done
|
||||
found start of include info
|
||||
found start of implicit include info
|
||||
add: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include]
|
||||
add: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed]
|
||||
add: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include]
|
||||
end of search list found
|
||||
collapse include dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include]
|
||||
collapse include dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed]
|
||||
collapse include dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/x86_64-w64-mingw32/include]
|
||||
implicit include dirs: [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include;C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed;C:/Qt/Qt5.12.7/Tools/mingw730_64/x86_64-w64-mingw32/include]
|
||||
|
||||
|
||||
Parsed C implicit link information from above output:
|
||||
link line regex: [^( *|.*[/\])(ld\.exe|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
|
||||
ignore line: [Change Dir: D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/CMakeFiles/CMakeTmp]
|
||||
ignore line: []
|
||||
ignore line: [Run Build Command(s):C:/Program Files/JetBrains/CLion 2021.1.1/bin/ninja/win/ninja.exe cmTC_e1679 && [1/2] Building C object CMakeFiles/cmTC_e1679.dir/CMakeCCompilerABI.c.obj]
|
||||
ignore line: [Using built-in specs.]
|
||||
ignore line: [COLLECT_GCC=C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\gcc.exe]
|
||||
ignore line: [Target: x86_64-w64-mingw32]
|
||||
ignore line: [Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/lib ']
|
||||
ignore line: [Thread model: posix]
|
||||
ignore line: [gcc version 7.3.0 (x86_64-posix-seh-rev0 Built by MinGW-W64 project) ]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e1679.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona']
|
||||
ignore line: [ C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/cc1.exe -quiet -v -iprefix C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/ -D_REENTRANT C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=core2 -march=nocona -auxbase-strip CMakeFiles/cmTC_e1679.dir/CMakeCCompilerABI.c.obj -version -o C:\Users\xin\AppData\Local\Temp\ccHyc9vt.s]
|
||||
ignore line: [GNU C11 (x86_64-posix-seh-rev0 Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32)]
|
||||
ignore line: [ compiled by GNU C version 7.3.0 GMP version 6.1.2 MPFR version 4.0.1 MPC version 1.1.0 isl version isl-0.18-GMP]
|
||||
ignore line: []
|
||||
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
|
||||
ignore line: [ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include"]
|
||||
ignore line: [ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64C:/msys64-2/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include"]
|
||||
ignore line: [ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed"]
|
||||
ignore line: [ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include"]
|
||||
ignore line: [ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/mingw/include"]
|
||||
ignore line: [#include "..." search starts here:]
|
||||
ignore line: [#include <...> search starts here:]
|
||||
ignore line: [ C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include]
|
||||
ignore line: [ C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed]
|
||||
ignore line: [ C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include]
|
||||
ignore line: [End of search list.]
|
||||
ignore line: [GNU C11 (x86_64-posix-seh-rev0 Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32)]
|
||||
ignore line: [ compiled by GNU C version 7.3.0 GMP version 6.1.2 MPFR version 4.0.1 MPC version 1.1.0 isl version isl-0.18-GMP]
|
||||
ignore line: []
|
||||
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
|
||||
ignore line: [Compiler executable checksum: afb3948cd5c0c8f535365414e7310436]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e1679.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona']
|
||||
ignore line: [ C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/as.exe -v -o CMakeFiles/cmTC_e1679.dir/CMakeCCompilerABI.c.obj C:\Users\xin\AppData\Local\Temp\ccHyc9vt.s]
|
||||
ignore line: [GNU assembler version 2.30 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.30]
|
||||
ignore line: [COMPILER_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/]
|
||||
ignore line: [LIBRARY_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e1679.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona']
|
||||
ignore line: [[2/2] Linking C executable cmTC_e1679.exe]
|
||||
ignore line: [Using built-in specs.]
|
||||
ignore line: [COLLECT_GCC=C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\gcc.exe]
|
||||
ignore line: [COLLECT_LTO_WRAPPER=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe]
|
||||
ignore line: [Target: x86_64-w64-mingw32]
|
||||
ignore line: [Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/lib ']
|
||||
ignore line: [Thread model: posix]
|
||||
ignore line: [gcc version 7.3.0 (x86_64-posix-seh-rev0 Built by MinGW-W64 project) ]
|
||||
ignore line: [COMPILER_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/]
|
||||
ignore line: [LIBRARY_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_e1679.exe' '-mtune=core2' '-march=nocona']
|
||||
link line: [ C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/collect2.exe -plugin C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/liblto_plugin-0.dll -plugin-opt=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\xin\AppData\Local\Temp\cc1qmxxy.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-liconv -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt --sysroot=C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 -m i386pep -Bdynamic -o cmTC_e1679.exe C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtbegin.o -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0 -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../.. CMakeFiles/cmTC_e1679.dir/CMakeCCompilerABI.c.obj --out-implib libcmTC_e1679.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtend.o]
|
||||
arg [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/collect2.exe] ==> ignore
|
||||
arg [-plugin] ==> ignore
|
||||
arg [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/liblto_plugin-0.dll] ==> ignore
|
||||
arg [-plugin-opt=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe] ==> ignore
|
||||
arg [-plugin-opt=-fresolution=C:\Users\xin\AppData\Local\Temp\cc1qmxxy.res] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lmingw32] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc_eh] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lmoldname] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lmingwex] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lmsvcrt] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lpthread] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-ladvapi32] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lshell32] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-luser32] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lkernel32] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-liconv] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lmingw32] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc_eh] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lmoldname] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lmingwex] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lmsvcrt] ==> ignore
|
||||
arg [--sysroot=C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64] ==> ignore
|
||||
arg [-m] ==> ignore
|
||||
arg [i386pep] ==> ignore
|
||||
arg [-Bdynamic] ==> search dynamic
|
||||
arg [-o] ==> ignore
|
||||
arg [cmTC_e1679.exe] ==> ignore
|
||||
arg [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o] ==> obj [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o]
|
||||
arg [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtbegin.o] ==> obj [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtbegin.o]
|
||||
arg [-LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0] ==> dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0]
|
||||
arg [-LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc] ==> dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc]
|
||||
arg [-LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib] ==> dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib]
|
||||
arg [-LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib] ==> dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib]
|
||||
arg [-LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib] ==> dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib]
|
||||
arg [-LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../..] ==> dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../..]
|
||||
arg [CMakeFiles/cmTC_e1679.dir/CMakeCCompilerABI.c.obj] ==> ignore
|
||||
arg [--out-implib] ==> ignore
|
||||
arg [libcmTC_e1679.dll.a] ==> ignore
|
||||
arg [--major-image-version] ==> ignore
|
||||
arg [0] ==> ignore
|
||||
arg [--minor-image-version] ==> ignore
|
||||
arg [0] ==> ignore
|
||||
arg [-lmingw32] ==> lib [mingw32]
|
||||
arg [-lgcc] ==> lib [gcc]
|
||||
arg [-lgcc_eh] ==> lib [gcc_eh]
|
||||
arg [-lmoldname] ==> lib [moldname]
|
||||
arg [-lmingwex] ==> lib [mingwex]
|
||||
arg [-lmsvcrt] ==> lib [msvcrt]
|
||||
arg [-lpthread] ==> lib [pthread]
|
||||
arg [-ladvapi32] ==> lib [advapi32]
|
||||
arg [-lshell32] ==> lib [shell32]
|
||||
arg [-luser32] ==> lib [user32]
|
||||
arg [-lkernel32] ==> lib [kernel32]
|
||||
arg [-liconv] ==> lib [iconv]
|
||||
arg [-lmingw32] ==> lib [mingw32]
|
||||
arg [-lgcc] ==> lib [gcc]
|
||||
arg [-lgcc_eh] ==> lib [gcc_eh]
|
||||
arg [-lmoldname] ==> lib [moldname]
|
||||
arg [-lmingwex] ==> lib [mingwex]
|
||||
arg [-lmsvcrt] ==> lib [msvcrt]
|
||||
arg [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtend.o] ==> obj [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtend.o]
|
||||
remove lib [gcc_eh]
|
||||
remove lib [msvcrt]
|
||||
remove lib [gcc_eh]
|
||||
remove lib [msvcrt]
|
||||
collapse obj [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/x86_64-w64-mingw32/lib/crt2.o]
|
||||
collapse obj [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtbegin.o] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/crtbegin.o]
|
||||
collapse obj [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtend.o] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/crtend.o]
|
||||
collapse library dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0]
|
||||
collapse library dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc]
|
||||
collapse library dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/x86_64-w64-mingw32/lib]
|
||||
collapse library dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib]
|
||||
collapse library dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/x86_64-w64-mingw32/lib]
|
||||
collapse library dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../..] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib]
|
||||
implicit libs: [mingw32;gcc;moldname;mingwex;pthread;advapi32;shell32;user32;kernel32;iconv;mingw32;gcc;moldname;mingwex]
|
||||
implicit objs: [C:/Qt/Qt5.12.7/Tools/mingw730_64/x86_64-w64-mingw32/lib/crt2.o;C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/crtbegin.o;C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/crtend.o]
|
||||
implicit dirs: [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0;C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc;C:/Qt/Qt5.12.7/Tools/mingw730_64/x86_64-w64-mingw32/lib;C:/Qt/Qt5.12.7/Tools/mingw730_64/lib]
|
||||
implicit fwks: []
|
||||
|
||||
|
||||
Detecting CXX compiler ABI info compiled with the following output:
|
||||
Change Dir: D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/CMakeFiles/CMakeTmp
|
||||
|
||||
Run Build Command(s):C:/Program Files/JetBrains/CLion 2021.1.1/bin/ninja/win/ninja.exe cmTC_c97b8 && [1/2] Building CXX object CMakeFiles/cmTC_c97b8.dir/CMakeCXXCompilerABI.cpp.obj
|
||||
|
||||
Using built-in specs.
|
||||
|
||||
COLLECT_GCC=C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\c++.exe
|
||||
|
||||
Target: x86_64-w64-mingw32
|
||||
|
||||
Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/lib '
|
||||
|
||||
Thread model: posix
|
||||
|
||||
gcc version 7.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)
|
||||
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_c97b8.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona'
|
||||
|
||||
C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/cc1plus.exe -quiet -v -iprefix C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/ -D_REENTRANT C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=core2 -march=nocona -auxbase-strip CMakeFiles/cmTC_c97b8.dir/CMakeCXXCompilerABI.cpp.obj -version -o C:\Users\xin\AppData\Local\Temp\cc5Ei9fH.s
|
||||
|
||||
GNU C++14 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32)
|
||||
|
||||
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP
|
||||
|
||||
|
||||
|
||||
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
|
||||
|
||||
ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++"
|
||||
|
||||
ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32"
|
||||
|
||||
ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward"
|
||||
|
||||
ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include"
|
||||
|
||||
ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64C:/msys64-2/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include"
|
||||
|
||||
ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed"
|
||||
|
||||
ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include"
|
||||
|
||||
ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/mingw/include"
|
||||
|
||||
#include "..." search starts here:
|
||||
|
||||
#include <...> search starts here:
|
||||
|
||||
C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++
|
||||
|
||||
C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32
|
||||
|
||||
C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward
|
||||
|
||||
C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include
|
||||
|
||||
C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed
|
||||
|
||||
C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include
|
||||
|
||||
End of search list.
|
||||
|
||||
GNU C++14 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32)
|
||||
|
||||
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP
|
||||
|
||||
|
||||
|
||||
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
|
||||
|
||||
Compiler executable checksum: 86cf749bb84a0f12f1d61bff4e68fffd
|
||||
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_c97b8.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona'
|
||||
|
||||
C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/as.exe -v -o CMakeFiles/cmTC_c97b8.dir/CMakeCXXCompilerABI.cpp.obj C:\Users\xin\AppData\Local\Temp\cc5Ei9fH.s
|
||||
|
||||
GNU assembler version 2.30 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.30
|
||||
|
||||
COMPILER_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/
|
||||
|
||||
LIBRARY_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../
|
||||
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_c97b8.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona'
|
||||
|
||||
[2/2] Linking CXX executable cmTC_c97b8.exe
|
||||
|
||||
Using built-in specs.
|
||||
|
||||
COLLECT_GCC=C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\c++.exe
|
||||
|
||||
COLLECT_LTO_WRAPPER=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe
|
||||
|
||||
Target: x86_64-w64-mingw32
|
||||
|
||||
Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/lib '
|
||||
|
||||
Thread model: posix
|
||||
|
||||
gcc version 7.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)
|
||||
|
||||
COMPILER_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/
|
||||
|
||||
LIBRARY_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../
|
||||
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_c97b8.exe' '-shared-libgcc' '-mtune=core2' '-march=nocona'
|
||||
|
||||
C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/collect2.exe -plugin C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/liblto_plugin-0.dll -plugin-opt=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\xin\AppData\Local\Temp\ccBDm4zM.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-liconv -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt --sysroot=C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 -m i386pep -Bdynamic -o cmTC_c97b8.exe C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtbegin.o -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0 -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../.. CMakeFiles/cmTC_c97b8.dir/CMakeCXXCompilerABI.cpp.obj --out-implib libcmTC_c97b8.dll.a --major-image-version 0 --minor-image-version 0 -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtend.o
|
||||
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_c97b8.exe' '-shared-libgcc' '-mtune=core2' '-march=nocona'
|
||||
|
||||
|
||||
|
||||
|
||||
Parsed CXX implicit include dir info from above output: rv=done
|
||||
found start of include info
|
||||
found start of implicit include info
|
||||
add: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++]
|
||||
add: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32]
|
||||
add: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward]
|
||||
add: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include]
|
||||
add: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed]
|
||||
add: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include]
|
||||
end of search list found
|
||||
collapse include dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++]
|
||||
collapse include dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32]
|
||||
collapse include dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward]
|
||||
collapse include dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include]
|
||||
collapse include dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed]
|
||||
collapse include dir [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include] ==> [C:/Qt/Qt5.12.7/Tools/mingw730_64/x86_64-w64-mingw32/include]
|
||||
implicit include dirs: [C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++;C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32;C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward;C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include;C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed;C:/Qt/Qt5.12.7/Tools/mingw730_64/x86_64-w64-mingw32/include]
|
||||
|
||||
|
||||
Parsed CXX implicit link information from above output:
|
||||
link line regex: [^( *|.*[/\])(ld\.exe|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
|
||||
ignore line: [Change Dir: D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/CMakeFiles/CMakeTmp]
|
||||
ignore line: []
|
||||
ignore line: [Run Build Command(s):C:/Program Files/JetBrains/CLion 2021.1.1/bin/ninja/win/ninja.exe cmTC_c97b8 && [1/2] Building CXX object CMakeFiles/cmTC_c97b8.dir/CMakeCXXCompilerABI.cpp.obj]
|
||||
ignore line: [Using built-in specs.]
|
||||
ignore line: [COLLECT_GCC=C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\c++.exe]
|
||||
ignore line: [Target: x86_64-w64-mingw32]
|
||||
ignore line: [Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/lib ']
|
||||
ignore line: [Thread model: posix]
|
||||
ignore line: [gcc version 7.3.0 (x86_64-posix-seh-rev0 Built by MinGW-W64 project) ]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_c97b8.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona']
|
||||
ignore line: [ C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/cc1plus.exe -quiet -v -iprefix C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/ -D_REENTRANT C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=core2 -march=nocona -auxbase-strip CMakeFiles/cmTC_c97b8.dir/CMakeCXXCompilerABI.cpp.obj -version -o C:\Users\xin\AppData\Local\Temp\cc5Ei9fH.s]
|
||||
ignore line: [GNU C++14 (x86_64-posix-seh-rev0 Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32)]
|
||||
ignore line: [ compiled by GNU C version 7.3.0 GMP version 6.1.2 MPFR version 4.0.1 MPC version 1.1.0 isl version isl-0.18-GMP]
|
||||
ignore line: []
|
||||
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
|
||||
ignore line: [ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++"]
|
||||
ignore line: [ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32"]
|
||||
ignore line: [ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward"]
|
||||
ignore line: [ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include"]
|
||||
ignore line: [ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64C:/msys64-2/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include"]
|
||||
ignore line: [ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed"]
|
||||
ignore line: [ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include"]
|
||||
ignore line: [ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/mingw/include"]
|
||||
ignore line: [#include "..." search starts here:]
|
||||
ignore line: [#include <...> search starts here:]
|
||||
ignore line: [ C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++]
|
||||
ignore line: [ C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32]
|
||||
ignore line: [ C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward]
|
||||
ignore line: [ C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include]
|
||||
ignore line: [ C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed]
|
||||
ignore line: [ C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include]
|
||||
ignore line: [End of search list.]
|
||||
ignore line: [GNU C++14 (x86_64-posix-seh-rev0 Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32)]
|
||||
ignore line: [ compiled by GNU C version 7.3.0 GMP version 6.1.2 MPFR version 4.0.1 MPC version 1.1.0 isl version isl-0.18-GMP]
|
||||
ignore line: []
|
||||
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
|
||||
ignore line: [Compiler executable checksum: 86cf749bb84a0f12f1d61bff4e68fffd]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_c97b8.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona']
|
||||
ignore line: [ C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/as.exe -v -o CMakeFiles/cmTC_c97b8.dir/CMakeCXXCompilerABI.cpp.obj C:\Users\xin\AppData\Local\Temp\cc5Ei9fH.s]
|
||||
ignore line: [GNU assembler version 2.30 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.30]
|
||||
ignore line: [COMPILER_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/]
|
||||
ignore line: [LIBRARY_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib/]
|
||||
ignore line: [C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/]
|
||||
@ -0,0 +1,4 @@
|
||||
D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/CMakeFiles/rebuild_cache.dir
|
||||
D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/CMakeFiles/ocean_optics_calibration_console.dir
|
||||
D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/CMakeFiles/edit_cache.dir
|
||||
D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/CMakeFiles/ocean_optics_calibration_console_autogen.dir
|
||||
@ -0,0 +1,4 @@
|
||||
ToolSet: w64 6.0 (local)@C:\Qt\Qt5.12.7\Tools\mingw730_64
|
||||
Options:
|
||||
|
||||
Options:-DCMAKE_MAKE_PROGRAM=C:/Program Files/JetBrains/CLion 2021.1.1/bin/ninja/win/ninja.exe
|
||||
@ -0,0 +1,16 @@
|
||||
"C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_MAKE_PROGRAM=C:/Program Files/JetBrains/CLion 2021.1.1/bin/ninja/win/ninja.exe" -G Ninja D:\03MyGit\TowerOptoSifAndSpectral\TowerOptoSifAndSpectral\othersoft\calibration_console
|
||||
-- The C compiler identification is GNU 7.3.0
|
||||
-- The CXX compiler identification is GNU 7.3.0
|
||||
-- Detecting C compiler ABI info
|
||||
-- Detecting C compiler ABI info - done
|
||||
-- Check for working C compiler: C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc.exe - skipped
|
||||
-- Detecting C compile features
|
||||
-- Detecting C compile features - done
|
||||
-- Detecting CXX compiler ABI info
|
||||
-- Detecting CXX compiler ABI info - done
|
||||
-- Check for working CXX compiler: C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/c++.exe - skipped
|
||||
-- Detecting CXX compile features
|
||||
-- Detecting CXX compile features - done
|
||||
-- Configuring done
|
||||
-- Generating done
|
||||
-- Build files have been written to: D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug
|
||||
@ -0,0 +1 @@
|
||||
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
|
||||
402
othersoft/calibration_console/cmake-build-debug/Makefile
Normal file
402
othersoft/calibration_console/cmake-build-debug/Makefile
Normal file
@ -0,0 +1,402 @@
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
|
||||
|
||||
# Default target executed when no arguments are given to make.
|
||||
default_target: all
|
||||
|
||||
.PHONY : default_target
|
||||
|
||||
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
|
||||
.NOTPARALLEL:
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
|
||||
# Remove some rules from gmake that .SUFFIXES does not remove.
|
||||
SUFFIXES =
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
|
||||
# Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /usr/bin/cmake -E remove -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug
|
||||
|
||||
#=============================================================================
|
||||
# Targets provided globally by CMake.
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
|
||||
/usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
|
||||
.PHONY : edit_cache
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache/fast: edit_cache
|
||||
|
||||
.PHONY : edit_cache/fast
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
|
||||
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : rebuild_cache
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache/fast: rebuild_cache
|
||||
|
||||
.PHONY : rebuild_cache/fast
|
||||
|
||||
# The main all target
|
||||
all: cmake_check_build_system
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/CMakeFiles /home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/CMakeFiles/progress.marks
|
||||
$(MAKE) -f CMakeFiles/Makefile2 all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/CMakeFiles 0
|
||||
.PHONY : all
|
||||
|
||||
# The main clean target
|
||||
clean:
|
||||
$(MAKE) -f CMakeFiles/Makefile2 clean
|
||||
.PHONY : clean
|
||||
|
||||
# The main clean target
|
||||
clean/fast: clean
|
||||
|
||||
.PHONY : clean/fast
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall: all
|
||||
$(MAKE) -f CMakeFiles/Makefile2 preinstall
|
||||
.PHONY : preinstall
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall/fast:
|
||||
$(MAKE) -f CMakeFiles/Makefile2 preinstall
|
||||
.PHONY : preinstall/fast
|
||||
|
||||
# clear depends
|
||||
depend:
|
||||
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||
.PHONY : depend
|
||||
|
||||
#=============================================================================
|
||||
# Target rules for targets named ocean_optics_calibration_console
|
||||
|
||||
# Build rule for target.
|
||||
ocean_optics_calibration_console: cmake_check_build_system
|
||||
$(MAKE) -f CMakeFiles/Makefile2 ocean_optics_calibration_console
|
||||
.PHONY : ocean_optics_calibration_console
|
||||
|
||||
# fast build rule for target.
|
||||
ocean_optics_calibration_console/fast:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/build
|
||||
.PHONY : ocean_optics_calibration_console/fast
|
||||
|
||||
#=============================================================================
|
||||
# Target rules for targets named ocean_optics_calibration_console_automoc
|
||||
|
||||
# Build rule for target.
|
||||
ocean_optics_calibration_console_automoc: cmake_check_build_system
|
||||
$(MAKE) -f CMakeFiles/Makefile2 ocean_optics_calibration_console_automoc
|
||||
.PHONY : ocean_optics_calibration_console_automoc
|
||||
|
||||
# fast build rule for target.
|
||||
ocean_optics_calibration_console_automoc/fast:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console_automoc.dir/build.make CMakeFiles/ocean_optics_calibration_console_automoc.dir/build
|
||||
.PHONY : ocean_optics_calibration_console_automoc/fast
|
||||
|
||||
Source_Files/ATPControl_Serial_QT.o: Source_Files/ATPControl_Serial_QT.cpp.o
|
||||
|
||||
.PHONY : Source_Files/ATPControl_Serial_QT.o
|
||||
|
||||
# target to build an object file
|
||||
Source_Files/ATPControl_Serial_QT.cpp.o:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/ATPControl_Serial_QT.cpp.o
|
||||
.PHONY : Source_Files/ATPControl_Serial_QT.cpp.o
|
||||
|
||||
Source_Files/ATPControl_Serial_QT.i: Source_Files/ATPControl_Serial_QT.cpp.i
|
||||
|
||||
.PHONY : Source_Files/ATPControl_Serial_QT.i
|
||||
|
||||
# target to preprocess a source file
|
||||
Source_Files/ATPControl_Serial_QT.cpp.i:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/ATPControl_Serial_QT.cpp.i
|
||||
.PHONY : Source_Files/ATPControl_Serial_QT.cpp.i
|
||||
|
||||
Source_Files/ATPControl_Serial_QT.s: Source_Files/ATPControl_Serial_QT.cpp.s
|
||||
|
||||
.PHONY : Source_Files/ATPControl_Serial_QT.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
Source_Files/ATPControl_Serial_QT.cpp.s:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/ATPControl_Serial_QT.cpp.s
|
||||
.PHONY : Source_Files/ATPControl_Serial_QT.cpp.s
|
||||
|
||||
Source_Files/ZZ_Math.o: Source_Files/ZZ_Math.cpp.o
|
||||
|
||||
.PHONY : Source_Files/ZZ_Math.o
|
||||
|
||||
# target to build an object file
|
||||
Source_Files/ZZ_Math.cpp.o:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/ZZ_Math.cpp.o
|
||||
.PHONY : Source_Files/ZZ_Math.cpp.o
|
||||
|
||||
Source_Files/ZZ_Math.i: Source_Files/ZZ_Math.cpp.i
|
||||
|
||||
.PHONY : Source_Files/ZZ_Math.i
|
||||
|
||||
# target to preprocess a source file
|
||||
Source_Files/ZZ_Math.cpp.i:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/ZZ_Math.cpp.i
|
||||
.PHONY : Source_Files/ZZ_Math.cpp.i
|
||||
|
||||
Source_Files/ZZ_Math.s: Source_Files/ZZ_Math.cpp.s
|
||||
|
||||
.PHONY : Source_Files/ZZ_Math.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
Source_Files/ZZ_Math.cpp.s:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/ZZ_Math.cpp.s
|
||||
.PHONY : Source_Files/ZZ_Math.cpp.s
|
||||
|
||||
Source_Files/atpFiberImager.o: Source_Files/atpFiberImager.cpp.o
|
||||
|
||||
.PHONY : Source_Files/atpFiberImager.o
|
||||
|
||||
# target to build an object file
|
||||
Source_Files/atpFiberImager.cpp.o:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/atpFiberImager.cpp.o
|
||||
.PHONY : Source_Files/atpFiberImager.cpp.o
|
||||
|
||||
Source_Files/atpFiberImager.i: Source_Files/atpFiberImager.cpp.i
|
||||
|
||||
.PHONY : Source_Files/atpFiberImager.i
|
||||
|
||||
# target to preprocess a source file
|
||||
Source_Files/atpFiberImager.cpp.i:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/atpFiberImager.cpp.i
|
||||
.PHONY : Source_Files/atpFiberImager.cpp.i
|
||||
|
||||
Source_Files/atpFiberImager.s: Source_Files/atpFiberImager.cpp.s
|
||||
|
||||
.PHONY : Source_Files/atpFiberImager.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
Source_Files/atpFiberImager.cpp.s:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/atpFiberImager.cpp.s
|
||||
.PHONY : Source_Files/atpFiberImager.cpp.s
|
||||
|
||||
Source_Files/calibration.o: Source_Files/calibration.cpp.o
|
||||
|
||||
.PHONY : Source_Files/calibration.o
|
||||
|
||||
# target to build an object file
|
||||
Source_Files/calibration.cpp.o:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/calibration.cpp.o
|
||||
.PHONY : Source_Files/calibration.cpp.o
|
||||
|
||||
Source_Files/calibration.i: Source_Files/calibration.cpp.i
|
||||
|
||||
.PHONY : Source_Files/calibration.i
|
||||
|
||||
# target to preprocess a source file
|
||||
Source_Files/calibration.cpp.i:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/calibration.cpp.i
|
||||
.PHONY : Source_Files/calibration.cpp.i
|
||||
|
||||
Source_Files/calibration.s: Source_Files/calibration.cpp.s
|
||||
|
||||
.PHONY : Source_Files/calibration.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
Source_Files/calibration.cpp.s:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/calibration.cpp.s
|
||||
.PHONY : Source_Files/calibration.cpp.s
|
||||
|
||||
Source_Files/library.o: Source_Files/library.cpp.o
|
||||
|
||||
.PHONY : Source_Files/library.o
|
||||
|
||||
# target to build an object file
|
||||
Source_Files/library.cpp.o:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/library.cpp.o
|
||||
.PHONY : Source_Files/library.cpp.o
|
||||
|
||||
Source_Files/library.i: Source_Files/library.cpp.i
|
||||
|
||||
.PHONY : Source_Files/library.i
|
||||
|
||||
# target to preprocess a source file
|
||||
Source_Files/library.cpp.i:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/library.cpp.i
|
||||
.PHONY : Source_Files/library.cpp.i
|
||||
|
||||
Source_Files/library.s: Source_Files/library.cpp.s
|
||||
|
||||
.PHONY : Source_Files/library.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
Source_Files/library.cpp.s:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/library.cpp.s
|
||||
.PHONY : Source_Files/library.cpp.s
|
||||
|
||||
Source_Files/main.o: Source_Files/main.cpp.o
|
||||
|
||||
.PHONY : Source_Files/main.o
|
||||
|
||||
# target to build an object file
|
||||
Source_Files/main.cpp.o:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/main.cpp.o
|
||||
.PHONY : Source_Files/main.cpp.o
|
||||
|
||||
Source_Files/main.i: Source_Files/main.cpp.i
|
||||
|
||||
.PHONY : Source_Files/main.i
|
||||
|
||||
# target to preprocess a source file
|
||||
Source_Files/main.cpp.i:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/main.cpp.i
|
||||
.PHONY : Source_Files/main.cpp.i
|
||||
|
||||
Source_Files/main.s: Source_Files/main.cpp.s
|
||||
|
||||
.PHONY : Source_Files/main.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
Source_Files/main.cpp.s:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/main.cpp.s
|
||||
.PHONY : Source_Files/main.cpp.s
|
||||
|
||||
Source_Files/oceanOpticsFiberImager.o: Source_Files/oceanOpticsFiberImager.cpp.o
|
||||
|
||||
.PHONY : Source_Files/oceanOpticsFiberImager.o
|
||||
|
||||
# target to build an object file
|
||||
Source_Files/oceanOpticsFiberImager.cpp.o:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/oceanOpticsFiberImager.cpp.o
|
||||
.PHONY : Source_Files/oceanOpticsFiberImager.cpp.o
|
||||
|
||||
Source_Files/oceanOpticsFiberImager.i: Source_Files/oceanOpticsFiberImager.cpp.i
|
||||
|
||||
.PHONY : Source_Files/oceanOpticsFiberImager.i
|
||||
|
||||
# target to preprocess a source file
|
||||
Source_Files/oceanOpticsFiberImager.cpp.i:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/oceanOpticsFiberImager.cpp.i
|
||||
.PHONY : Source_Files/oceanOpticsFiberImager.cpp.i
|
||||
|
||||
Source_Files/oceanOpticsFiberImager.s: Source_Files/oceanOpticsFiberImager.cpp.s
|
||||
|
||||
.PHONY : Source_Files/oceanOpticsFiberImager.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
Source_Files/oceanOpticsFiberImager.cpp.s:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/Source_Files/oceanOpticsFiberImager.cpp.s
|
||||
.PHONY : Source_Files/oceanOpticsFiberImager.cpp.s
|
||||
|
||||
ocean_optics_calibration_console_automoc.o: ocean_optics_calibration_console_automoc.cpp.o
|
||||
|
||||
.PHONY : ocean_optics_calibration_console_automoc.o
|
||||
|
||||
# target to build an object file
|
||||
ocean_optics_calibration_console_automoc.cpp.o:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/ocean_optics_calibration_console_automoc.cpp.o
|
||||
.PHONY : ocean_optics_calibration_console_automoc.cpp.o
|
||||
|
||||
ocean_optics_calibration_console_automoc.i: ocean_optics_calibration_console_automoc.cpp.i
|
||||
|
||||
.PHONY : ocean_optics_calibration_console_automoc.i
|
||||
|
||||
# target to preprocess a source file
|
||||
ocean_optics_calibration_console_automoc.cpp.i:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/ocean_optics_calibration_console_automoc.cpp.i
|
||||
.PHONY : ocean_optics_calibration_console_automoc.cpp.i
|
||||
|
||||
ocean_optics_calibration_console_automoc.s: ocean_optics_calibration_console_automoc.cpp.s
|
||||
|
||||
.PHONY : ocean_optics_calibration_console_automoc.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
ocean_optics_calibration_console_automoc.cpp.s:
|
||||
$(MAKE) -f CMakeFiles/ocean_optics_calibration_console.dir/build.make CMakeFiles/ocean_optics_calibration_console.dir/ocean_optics_calibration_console_automoc.cpp.s
|
||||
.PHONY : ocean_optics_calibration_console_automoc.cpp.s
|
||||
|
||||
# Help Target
|
||||
help:
|
||||
@echo "The following are some of the valid targets for this Makefile:"
|
||||
@echo "... all (the default if no target is provided)"
|
||||
@echo "... clean"
|
||||
@echo "... depend"
|
||||
@echo "... edit_cache"
|
||||
@echo "... rebuild_cache"
|
||||
@echo "... ocean_optics_calibration_console"
|
||||
@echo "... ocean_optics_calibration_console_automoc"
|
||||
@echo "... Source_Files/ATPControl_Serial_QT.o"
|
||||
@echo "... Source_Files/ATPControl_Serial_QT.i"
|
||||
@echo "... Source_Files/ATPControl_Serial_QT.s"
|
||||
@echo "... Source_Files/ZZ_Math.o"
|
||||
@echo "... Source_Files/ZZ_Math.i"
|
||||
@echo "... Source_Files/ZZ_Math.s"
|
||||
@echo "... Source_Files/atpFiberImager.o"
|
||||
@echo "... Source_Files/atpFiberImager.i"
|
||||
@echo "... Source_Files/atpFiberImager.s"
|
||||
@echo "... Source_Files/calibration.o"
|
||||
@echo "... Source_Files/calibration.i"
|
||||
@echo "... Source_Files/calibration.s"
|
||||
@echo "... Source_Files/library.o"
|
||||
@echo "... Source_Files/library.i"
|
||||
@echo "... Source_Files/library.s"
|
||||
@echo "... Source_Files/main.o"
|
||||
@echo "... Source_Files/main.i"
|
||||
@echo "... Source_Files/main.s"
|
||||
@echo "... Source_Files/oceanOpticsFiberImager.o"
|
||||
@echo "... Source_Files/oceanOpticsFiberImager.i"
|
||||
@echo "... Source_Files/oceanOpticsFiberImager.s"
|
||||
@echo "... ocean_optics_calibration_console_automoc.o"
|
||||
@echo "... ocean_optics_calibration_console_automoc.i"
|
||||
@echo "... ocean_optics_calibration_console_automoc.s"
|
||||
.PHONY : help
|
||||
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets to cleanup operation of make.
|
||||
|
||||
# Special rule to run CMake to check the build system integrity.
|
||||
# No rule that depends on this can have commands that come from listfiles
|
||||
# because they might be regenerated.
|
||||
cmake_check_build_system:
|
||||
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||
.PHONY : cmake_check_build_system
|
||||
|
||||
@ -0,0 +1,49 @@
|
||||
# Install script for directory: D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console
|
||||
|
||||
# Set the install prefix
|
||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "<;/home/pi/bin;>")
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
if(BUILD_TYPE)
|
||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "Debug")
|
||||
endif()
|
||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
endif()
|
||||
|
||||
# Set the component getting installed.
|
||||
if(NOT CMAKE_INSTALL_COMPONENT)
|
||||
if(COMPONENT)
|
||||
message(STATUS "Install component: \"${COMPONENT}\"")
|
||||
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_COMPONENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Is this installation the result of a crosscompile?
|
||||
if(NOT DEFINED CMAKE_CROSSCOMPILING)
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
endif()
|
||||
|
||||
# Set default install directory permissions.
|
||||
if(NOT DEFINED CMAKE_OBJDUMP)
|
||||
set(CMAKE_OBJDUMP "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/objdump.exe")
|
||||
endif()
|
||||
|
||||
if(CMAKE_INSTALL_COMPONENT)
|
||||
set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
|
||||
else()
|
||||
set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
|
||||
"${CMAKE_INSTALL_MANIFEST_FILES}")
|
||||
file(WRITE "D:/03MyGit/TowerOptoSifAndSpectral/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}"
|
||||
"${CMAKE_INSTALL_MANIFEST_CONTENT}")
|
||||
@ -0,0 +1,208 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="ocean_optics_calibration_console" />
|
||||
<Option makefile_is_custom="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Option virtualFolders="CMake Files\;CMake Files\..\;CMake Files\..\..\;CMake Files\..\..\..\;CMake Files\..\..\..\..\;CMake Files\..\..\..\..\..\;CMake Files\..\..\..\..\..\..\;CMake Files\..\..\..\..\..\..\usr\;CMake Files\..\..\..\..\..\..\usr\lib\;CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\;CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\;CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\Qt5\;CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\Qt5Core\;CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\Qt5Network\;CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\Qt5SerialPort\;" />
|
||||
<Build>
|
||||
<Target title="all">
|
||||
<Option working_dir="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug" />
|
||||
<Option type="4" />
|
||||
<MakeCommands>
|
||||
<Build command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 all" />
|
||||
<CompileFile command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 "$file"" />
|
||||
<Clean command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 clean" />
|
||||
<DistClean command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 clean" />
|
||||
</MakeCommands>
|
||||
</Target>
|
||||
<Target title="edit_cache">
|
||||
<Option working_dir="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug" />
|
||||
<Option type="4" />
|
||||
<MakeCommands>
|
||||
<Build command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 edit_cache" />
|
||||
<CompileFile command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 "$file"" />
|
||||
<Clean command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 clean" />
|
||||
<DistClean command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 clean" />
|
||||
</MakeCommands>
|
||||
</Target>
|
||||
<Target title="rebuild_cache">
|
||||
<Option working_dir="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug" />
|
||||
<Option type="4" />
|
||||
<MakeCommands>
|
||||
<Build command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 rebuild_cache" />
|
||||
<CompileFile command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 "$file"" />
|
||||
<Clean command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 clean" />
|
||||
<DistClean command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 clean" />
|
||||
</MakeCommands>
|
||||
</Target>
|
||||
<Target title="ocean_optics_calibration_console">
|
||||
<Option output="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/ocean_optics_calibration_console" prefix_auto="0" extension_auto="0" />
|
||||
<Option working_dir="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug" />
|
||||
<Option object_output="./" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-DQT_CORE_LIB" />
|
||||
<Add option="-DQT_NETWORK_LIB" />
|
||||
<Add option="-DQT_SERIALPORT_LIB" />
|
||||
<Add directory="/home/pi/SeaBrease/include" />
|
||||
<Add directory="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console" />
|
||||
<Add directory="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/." />
|
||||
<Add directory="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug" />
|
||||
<Add directory="/usr/include" />
|
||||
<Add directory="/usr/include/arm-linux-gnueabihf" />
|
||||
<Add directory="/usr/include/arm-linux-gnueabihf/c++/5" />
|
||||
<Add directory="/usr/include/arm-linux-gnueabihf/qt5" />
|
||||
<Add directory="/usr/include/arm-linux-gnueabihf/qt5/QtCore" />
|
||||
<Add directory="/usr/include/arm-linux-gnueabihf/qt5/QtNetwork" />
|
||||
<Add directory="/usr/include/arm-linux-gnueabihf/qt5/QtSerialPort" />
|
||||
<Add directory="/usr/include/c++/5" />
|
||||
<Add directory="/usr/include/c++/5/backward" />
|
||||
<Add directory="/usr/include/eigen3" />
|
||||
<Add directory="/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++" />
|
||||
<Add directory="/usr/lib/gcc/arm-linux-gnueabihf/5/include" />
|
||||
<Add directory="/usr/lib/gcc/arm-linux-gnueabihf/5/include-fixed" />
|
||||
<Add directory="/usr/local/include" />
|
||||
</Compiler>
|
||||
<MakeCommands>
|
||||
<Build command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 ocean_optics_calibration_console" />
|
||||
<CompileFile command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 "$file"" />
|
||||
<Clean command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 clean" />
|
||||
<DistClean command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 clean" />
|
||||
</MakeCommands>
|
||||
</Target>
|
||||
<Target title="ocean_optics_calibration_console/fast">
|
||||
<Option output="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/ocean_optics_calibration_console" prefix_auto="0" extension_auto="0" />
|
||||
<Option working_dir="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug" />
|
||||
<Option object_output="./" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-DQT_CORE_LIB" />
|
||||
<Add option="-DQT_NETWORK_LIB" />
|
||||
<Add option="-DQT_SERIALPORT_LIB" />
|
||||
<Add directory="/home/pi/SeaBrease/include" />
|
||||
<Add directory="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console" />
|
||||
<Add directory="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/." />
|
||||
<Add directory="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug" />
|
||||
<Add directory="/usr/include" />
|
||||
<Add directory="/usr/include/arm-linux-gnueabihf" />
|
||||
<Add directory="/usr/include/arm-linux-gnueabihf/c++/5" />
|
||||
<Add directory="/usr/include/arm-linux-gnueabihf/qt5" />
|
||||
<Add directory="/usr/include/arm-linux-gnueabihf/qt5/QtCore" />
|
||||
<Add directory="/usr/include/arm-linux-gnueabihf/qt5/QtNetwork" />
|
||||
<Add directory="/usr/include/arm-linux-gnueabihf/qt5/QtSerialPort" />
|
||||
<Add directory="/usr/include/c++/5" />
|
||||
<Add directory="/usr/include/c++/5/backward" />
|
||||
<Add directory="/usr/include/eigen3" />
|
||||
<Add directory="/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++" />
|
||||
<Add directory="/usr/lib/gcc/arm-linux-gnueabihf/5/include" />
|
||||
<Add directory="/usr/lib/gcc/arm-linux-gnueabihf/5/include-fixed" />
|
||||
<Add directory="/usr/local/include" />
|
||||
</Compiler>
|
||||
<MakeCommands>
|
||||
<Build command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 ocean_optics_calibration_console/fast" />
|
||||
<CompileFile command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 "$file"" />
|
||||
<Clean command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 clean" />
|
||||
<DistClean command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 clean" />
|
||||
</MakeCommands>
|
||||
</Target>
|
||||
<Target title="ocean_optics_calibration_console_automoc">
|
||||
<Option working_dir="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug" />
|
||||
<Option type="4" />
|
||||
<MakeCommands>
|
||||
<Build command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 ocean_optics_calibration_console_automoc" />
|
||||
<CompileFile command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 "$file"" />
|
||||
<Clean command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 clean" />
|
||||
<DistClean command="/usr/bin/make -f "/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/cmake-build-debug/Makefile" VERBOSE=1 clean" />
|
||||
</MakeCommands>
|
||||
</Target>
|
||||
</Build>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Header_Files/ATPControl_Serial_QT.h">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Header_Files/FiberSpectrometerOperationBase.h">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Header_Files/IrisFiberSpectrometerBase.h">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Header_Files/ZZ_Math.h">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Header_Files/ZZ_Types.h">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Header_Files/atpFiberImager.h">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Header_Files/calibration.h">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Header_Files/library.h">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Header_Files/oceanOpticsFiberImager.h">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Source_Files/ATPControl_Serial_QT.cpp">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Source_Files/ZZ_Math.cpp">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Source_Files/atpFiberImager.cpp">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Source_Files/calibration.cpp">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Source_Files/library.cpp">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Source_Files/main.cpp">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/Source_Files/oceanOpticsFiberImager.cpp">
|
||||
<Option target="ocean_optics_calibration_console"/>
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/CMakeLists.txt">
|
||||
<Option virtualFolder="CMake Files\" />
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/../../../../../../usr/lib/arm-linux-gnueabihf/cmake/Qt5/Qt5ConfigVersion.cmake">
|
||||
<Option virtualFolder="CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\Qt5\" />
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/../../../../../../usr/lib/arm-linux-gnueabihf/cmake/Qt5/Qt5Config.cmake">
|
||||
<Option virtualFolder="CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\Qt5\" />
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/../../../../../../usr/lib/arm-linux-gnueabihf/cmake/Qt5Core/Qt5CoreConfigVersion.cmake">
|
||||
<Option virtualFolder="CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\Qt5Core\" />
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/../../../../../../usr/lib/arm-linux-gnueabihf/cmake/Qt5Core/Qt5CoreConfig.cmake">
|
||||
<Option virtualFolder="CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\Qt5Core\" />
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/../../../../../../usr/lib/arm-linux-gnueabihf/cmake/Qt5Core/Qt5CoreConfigExtras.cmake">
|
||||
<Option virtualFolder="CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\Qt5Core\" />
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/../../../../../../usr/lib/arm-linux-gnueabihf/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake">
|
||||
<Option virtualFolder="CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\Qt5Core\" />
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/../../../../../../usr/lib/arm-linux-gnueabihf/cmake/Qt5Core/Qt5CoreMacros.cmake">
|
||||
<Option virtualFolder="CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\Qt5Core\" />
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/../../../../../../usr/lib/arm-linux-gnueabihf/cmake/Qt5Network/Qt5NetworkConfigVersion.cmake">
|
||||
<Option virtualFolder="CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\Qt5Network\" />
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/../../../../../../usr/lib/arm-linux-gnueabihf/cmake/Qt5Network/Qt5NetworkConfig.cmake">
|
||||
<Option virtualFolder="CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\Qt5Network\" />
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/../../../../../../usr/lib/arm-linux-gnueabihf/cmake/Qt5SerialPort/Qt5SerialPortConfigVersion.cmake">
|
||||
<Option virtualFolder="CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\Qt5SerialPort\" />
|
||||
</Unit>
|
||||
<Unit filename="/home/pi/projects_tc/TowerOptoSifAndSpectral/othersoft/calibration_console/../../../../../../usr/lib/arm-linux-gnueabihf/cmake/Qt5SerialPort/Qt5SerialPortConfig.cmake">
|
||||
<Option virtualFolder="CMake Files\..\..\..\..\..\..\usr\lib\arm-linux-gnueabihf\cmake\Qt5SerialPort\" />
|
||||
</Unit>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
||||
133
othersoft/findtty.sh
Normal file
133
othersoft/findtty.sh
Normal file
@ -0,0 +1,133 @@
|
||||
|
||||
stty -F /dev/ttyUSB0 raw speed 9600
|
||||
sleep 1s
|
||||
stty -F /dev/ttyUSB0 raw speed 9600
|
||||
echo -e "0 dev\n" > /dev/ttyUSB0
|
||||
cat /dev/ttyUSB0 > 1.txt &
|
||||
sleep 1s
|
||||
pkill cat
|
||||
if test -s 1.txt;then
|
||||
echo '/dev/ttyUSB0 may be linermotor'> /home/data/Setting/tryfindtty.txt
|
||||
fi
|
||||
|
||||
stty -F /dev/ttyUSB1 raw speed 9600
|
||||
sleep 1s
|
||||
stty -F /dev/ttyUSB1 raw speed 9600
|
||||
echo -e "0 dev\n" > /dev/ttyUSB1
|
||||
cat /dev/ttyUSB1 > 1.txt &
|
||||
sleep 1s
|
||||
pkill cat
|
||||
if test -s 1.txt;then
|
||||
echo '/dev/ttyUSB1 may be linermotor'> /home/data/Setting/tryfindtty.txt
|
||||
fi
|
||||
|
||||
stty -F /dev/ttyUSB2 raw speed 9600
|
||||
sleep 1s
|
||||
stty -F /dev/ttyUSB2 raw speed 9600
|
||||
echo -e "0 dev\n" > /dev/ttyUSB2
|
||||
cat /dev/ttyUSB2 > 1.txt &
|
||||
sleep 1s
|
||||
pkill cat
|
||||
if test -s 1.txt;then
|
||||
echo '/dev/ttyUSB2 may be linermotor'> /home/data/Setting/tryfindtty.txt
|
||||
fi
|
||||
|
||||
stty -F /dev/ttyUSB3 raw speed 9600
|
||||
sleep 1s
|
||||
stty -F /dev/ttyUSB3 raw speed 9600
|
||||
echo -e "0 dev\n" > /dev/ttyUSB3
|
||||
cat /dev/ttyUSB3 > 1.txt &
|
||||
sleep 1s
|
||||
pkill cat
|
||||
if test -s 1.txt;then
|
||||
echo '/dev/ttyUSB3 may be linermotor'> /home/data/Setting/tryfindtty.txt
|
||||
fi
|
||||
|
||||
|
||||
stty -F /dev/ttyS1 raw speed 115200
|
||||
sleep 1s
|
||||
stty -F /dev/ttyS1 raw speed 115200
|
||||
cat -e /dev/ttyS1 > 1.txt &
|
||||
sleep 1s
|
||||
echo aa5500040307 | xxd -r -ps > /dev/ttyS1
|
||||
sleep 1s
|
||||
pkill cat
|
||||
sleep 1s
|
||||
|
||||
if test -s 1.txt;then
|
||||
echo '/dev/ttyS1 is ISIF or IS2'>> /home/data/Setting/tryfindtty.txt
|
||||
fi
|
||||
|
||||
|
||||
stty -F /dev/ttyS2 raw speed 115200
|
||||
sleep 1s
|
||||
stty -F /dev/ttyS2 raw speed 115200
|
||||
cat -e /dev/ttyS2 > 1.txt &
|
||||
sleep 1s
|
||||
echo aa5500040307 | xxd -r -ps > /dev/ttyS2
|
||||
sleep 1s
|
||||
pkill cat
|
||||
sleep 1s
|
||||
|
||||
if test -s 1.txt;then
|
||||
echo '/dev/ttyS2 is ISIF or IS2'>> /home/data/Setting/tryfindtty.txt
|
||||
fi
|
||||
|
||||
stty -F /dev/ttyUSB0 raw speed 115200
|
||||
sleep 1s
|
||||
stty -F /dev/ttyUSB0 raw speed 115200
|
||||
cat -e /dev/ttyUSB0 > 1.txt &
|
||||
sleep 1s
|
||||
echo aa5500040307 | xxd -r -ps > /dev/ttyUSB0
|
||||
sleep 1s
|
||||
pkill cat
|
||||
sleep 1s
|
||||
|
||||
if test -s 1.txt;then
|
||||
echo '/dev/ttyUSB0 is IS1'>> /home/data/Setting/tryfindtty.txt
|
||||
fi
|
||||
|
||||
stty -F /dev/ttyUSB1 raw speed 115200
|
||||
sleep 1s
|
||||
stty -F /dev/ttyUSB1 raw speed 115200
|
||||
cat -e /dev/ttyUSB1 > 1.txt &
|
||||
sleep 1s
|
||||
echo aa5500040307 | xxd -r -ps > /dev/ttyS1
|
||||
sleep 1s
|
||||
pkill cat
|
||||
sleep 1s
|
||||
if test -s 1.txt;then
|
||||
echo '/dev/ttyUSB1 is IS1'>> /home/data/Setting/tryfindtty.txt
|
||||
fi
|
||||
|
||||
stty -F /dev/ttyUSB2 raw speed 115200
|
||||
sleep 1s
|
||||
stty -F /dev/ttyUSB2 raw speed 115200
|
||||
cat -e /dev/ttyUSB2 > 1.txt &
|
||||
sleep 1s
|
||||
echo aa5500040307 | xxd -r -ps > /dev/ttyUSB2
|
||||
sleep 1s
|
||||
pkill cat
|
||||
sleep 1s
|
||||
if test -s 1.txt;then
|
||||
echo '/dev/ttyUSB2 is IS1'>> /home/data/Setting/tryfindtty.txt
|
||||
fi
|
||||
|
||||
|
||||
stty -F /dev/ttyUSB3 raw speed 115200
|
||||
sleep 1s
|
||||
stty -F /dev/ttyUSB3 raw speed 115200
|
||||
cat -e /dev/ttyUSB3 > 1.txt &
|
||||
sleep 1s
|
||||
echo aa5500040307 | xxd -r -ps > /dev/ttyUSB3
|
||||
sleep 1s
|
||||
pkill cat
|
||||
sleep 1s
|
||||
|
||||
if test -s 1.txt;then
|
||||
echo '/dev/ttyUSB3 is IS1'>> /home/data/Setting/tryfindtty.txt
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
51
othersoft/install.sh
Normal file
51
othersoft/install.sh
Normal file
@ -0,0 +1,51 @@
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
mkdir movingliner
|
||||
cd movingliner
|
||||
cmake ../../movingliner
|
||||
make -j4
|
||||
mkdir /home/pi/bin
|
||||
cp ./movingliner /home/pi/bin
|
||||
echo beging build shuttercali
|
||||
|
||||
cd ../
|
||||
|
||||
mkdir shuttercali
|
||||
cd shuttercali
|
||||
cmake ../../shuttercali/project/LocationCali
|
||||
make -j4
|
||||
cp ./shutter_calibrate /home/pi/bin
|
||||
|
||||
cd ../
|
||||
|
||||
mkdir console
|
||||
cd console
|
||||
cmake ../../calibration_console
|
||||
make -j4
|
||||
cp ./ocean_optics_calibration_console /home/pi/bin
|
||||
cd ../
|
||||
sudo killall Mywathdog.sh
|
||||
sudo killall TowerOptoSifAndSpectral
|
||||
cd ../../
|
||||
cp -r ./html/* /var/www/html
|
||||
chmod +x /var/www/html/php/*.sh
|
||||
cd ./build
|
||||
cp TowerOptoSifAndSpectral /home/pi/bin
|
||||
cd ../
|
||||
cp ./root/Mywathdog.sh /root
|
||||
cp ./root/start.sh /root
|
||||
chmod +x /root/start.sh
|
||||
mkdir /home/data
|
||||
cd ../
|
||||
rm -rf ./TowerOptoSifAndSpectral
|
||||
cd /root/filebrew
|
||||
chmod +x ./filebrowser
|
||||
./filebrowser config set -a 0.0.0.0
|
||||
./filebrowser config set -r /home/data
|
||||
sudo apt-get install -y timedatectl
|
||||
timedatectl set-timezone Asia/Shanghai
|
||||
date -R
|
||||
sudo hwclock -w -f /dev/rtc0
|
||||
sudo reboot
|
||||
#tc
|
||||
32
othersoft/movingliner/CMakeLists.txt
Normal file
32
othersoft/movingliner/CMakeLists.txt
Normal file
@ -0,0 +1,32 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(movingliner)
|
||||
IF (WIN32)
|
||||
|
||||
#MESSAGE(STATUS "Now is windows")
|
||||
|
||||
ENDIF ()
|
||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} C:/Qt/Qt5.12.7/5.12.7/mingw73_64)
|
||||
#set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} C:/Qt/Qt5.9.0/5.9/msvc2017_64/ )
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(QT Core Gui Network WebSockets SerialPort Widgets)
|
||||
|
||||
find_package(Qt5 REQUIRED ${QT})
|
||||
include_directories("source/LinearShutter")
|
||||
add_executable(movingliner
|
||||
main.cpp
|
||||
source/LinearShutter/VSMD12XControl.cpp
|
||||
source/LinearShutter/VSMD12XControl.h
|
||||
source/LinearShutter/ZZ_SeiralPort.cpp
|
||||
source/LinearShutter/ZZ_SeiralPort.h
|
||||
|
||||
)
|
||||
qt5_use_modules(movingliner ${QT})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
27
othersoft/movingliner/DeviceSettings.ini
Normal file
27
othersoft/movingliner/DeviceSettings.ini
Normal file
@ -0,0 +1,27 @@
|
||||
[DEVICE INFO]
|
||||
TotalSpectrometer=1
|
||||
[FS2]
|
||||
Model=ISIF
|
||||
Port=/dev/ttyS1
|
||||
UID=QEP02975
|
||||
[FS1]
|
||||
Model=OSIFAlpha
|
||||
Port=-1
|
||||
UID=QEP02975
|
||||
AEMax=0.85
|
||||
AEMin=0.80
|
||||
Depth=200000
|
||||
[FS3]
|
||||
Model=Null
|
||||
[LINEAR SHUTTER]
|
||||
Port=COM12
|
||||
Type=1
|
||||
DCID=1
|
||||
TotalPosition=5
|
||||
Position0=10000
|
||||
Position1=91947
|
||||
Position2=219299
|
||||
Position3=347535
|
||||
Position4=474904
|
||||
[HUMITURE]
|
||||
Port=/dev/ttyUSB3
|
||||
83
othersoft/movingliner/main.cpp
Normal file
83
othersoft/movingliner/main.cpp
Normal file
@ -0,0 +1,83 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include<VSMD12XControl.h>
|
||||
#include "qtextstream.h"
|
||||
QTextStream cout1(stdout, QIODevice::WriteOnly);
|
||||
void logout(QString str){
|
||||
std::cout<<str.toStdString()<<"<br>";
|
||||
std::fflush(stdout);
|
||||
}
|
||||
int main(int argc, char *argv[]) {
|
||||
int aaa=1000;
|
||||
QString str(argv[1]);
|
||||
QCoreApplication a(argc, argv);
|
||||
CVSMD12XControl Motercontrol;
|
||||
QString m_qstrDeviceConfigFilePath;
|
||||
// cout1<<"adfasdfsadfsd"<<flush;
|
||||
cout1<<"Your position number is "<<str<<"<br>"<<flush;
|
||||
#ifdef WIN32
|
||||
m_qstrDeviceConfigFilePath = ("D:\\03MyGit\\linux\\movingliner\\DeviceSettings.ini");
|
||||
#else
|
||||
m_qstrDeviceConfigFilePath = ("/home/data/Setting/DeviceSettings.ini");
|
||||
#endif
|
||||
|
||||
QSettings *m_qsDeviceConfig;
|
||||
m_qsDeviceConfig = new QSettings(m_qstrDeviceConfigFilePath, QSettings::IniFormat);
|
||||
long positon =m_qsDeviceConfig->value("LINEAR SHUTTER/Position"+str).toLongLong();
|
||||
if (positon==0)
|
||||
{
|
||||
logout("<b style=\"color:red\">Can not Find the position<\/b>");
|
||||
return 0;
|
||||
}
|
||||
cout1<<"Find Configfile in "<<m_qstrDeviceConfigFilePath<<" <br> The Port of Motor is "<<m_qsDeviceConfig->value("LINEAR SHUTTER/Port").toString()<<"<br>"<<flush;
|
||||
cout1<<"Position Find Value is "<<m_qsDeviceConfig->value("LINEAR SHUTTER/Position"+str).toLongLong()<<"<br>"<<flush;
|
||||
cout1<<"Configing The Motor <br>"<<flush;
|
||||
// m_qsDeviceConfig->value("LINEAR SHUTTER/Port").toString()
|
||||
if( m_qsDeviceConfig->value("LINEAR SHUTTER/Port").toString()=="GPIO")
|
||||
{
|
||||
//cout1<<"ERROR number position"<<flush;
|
||||
int positionnumber=m_qsDeviceConfig->value("LINEAR SHUTTER/TotalPosition").toInt();
|
||||
if (str.toInt()>=positionnumber)
|
||||
{
|
||||
cout1<<"ERROR number position"<<flush;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int targetpos=m_qsDeviceConfig->value("LINEAR SHUTTER/Position"+str).toLongLong();
|
||||
|
||||
for (int ii = 0; ii < positionnumber; ++ii) {
|
||||
int tempgpio=m_qsDeviceConfig->value("LINEAR SHUTTER/Position"+QString::number(ii)).toInt();
|
||||
QString com="gpio mode "+QString::number(tempgpio)+" out";
|
||||
system(com.toStdString().c_str());
|
||||
com="gpio write "+QString::number(tempgpio)+" 0";
|
||||
system(com.toStdString().c_str());
|
||||
|
||||
}
|
||||
QThread::msleep(500);
|
||||
QString com="gpio write "+QString::number(targetpos)+" 1";
|
||||
system(com.toStdString().c_str());
|
||||
QThread::msleep(500);
|
||||
cout1<<"FINISH Change Shutter <br>"<<flush;
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
|
||||
}
|
||||
Motercontrol.ILMES_InitializeComm(m_qsDeviceConfig->value("LINEAR SHUTTER/Port").toString());
|
||||
ControllerParams cpTest;
|
||||
Motercontrol.ILMES_InitializeParams(cpTest);
|
||||
|
||||
|
||||
|
||||
|
||||
logout("Moving to Zero");
|
||||
Motercontrol.StartBackZero();
|
||||
//std::cout<<"beging to move position";
|
||||
logout("Moving to The Position");
|
||||
Motercontrol.MoveTo(positon);
|
||||
|
||||
logout("<b style=\"color:green\">Finish the Task!!!<\/b> <br><b>Thanks For Using<\/b>");
|
||||
return 0;
|
||||
// return QCoreApplication::exec();
|
||||
}
|
||||
16
othersoft/movingliner/source/LinearShutter/AbstractPort.h
Normal file
16
othersoft/movingliner/source/LinearShutter/AbstractPort.h
Normal file
@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
#include "VSMD12XMiscDefines.h"
|
||||
#include <string>
|
||||
class CAbstractPort
|
||||
{
|
||||
public:
|
||||
virtual void InitPort(PortInfo portinfo) = 0;
|
||||
virtual bool SetPort() = 0;
|
||||
virtual bool Open() = 0;
|
||||
virtual void Close() = 0;
|
||||
|
||||
virtual std::string ReadAll(int waite=5000) = 0;
|
||||
virtual int Write(const std::string strSend) = 0;
|
||||
|
||||
};
|
||||
|
||||
1459
othersoft/movingliner/source/LinearShutter/VSMD12XControl.cpp
Normal file
1459
othersoft/movingliner/source/LinearShutter/VSMD12XControl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
146
othersoft/movingliner/source/LinearShutter/VSMD12XControl.h
Normal file
146
othersoft/movingliner/source/LinearShutter/VSMD12XControl.h
Normal file
@ -0,0 +1,146 @@
|
||||
#pragma once
|
||||
#include "pch.h"
|
||||
#include "AbstractPort.h"
|
||||
using namespace std;
|
||||
// #ifdef IRIS_API_EXPORTS
|
||||
//
|
||||
// #ifdef __cplusplus
|
||||
// #define IRIS_API_FUNC extern "C" __declspec(dllexport)
|
||||
// #else
|
||||
// #define IRIS_API_FUNC __declspec(dllexport)
|
||||
// #endif
|
||||
//
|
||||
// #else
|
||||
//
|
||||
// #ifdef __cplusplus
|
||||
// #define IRIS_API_FUNC extern "C" __declspec(dllimport)
|
||||
// #else
|
||||
// #define IRIS_API_FUNC __declspec(dllimport)
|
||||
// #endif
|
||||
//
|
||||
// #endif
|
||||
//
|
||||
//
|
||||
// #ifdef IRIS_API_EXPORTS
|
||||
// #define IRIS_API_CLASS __declspec(dllexport)
|
||||
// #else
|
||||
// #define IRIS_API_CLASS __declspec(dllimport)
|
||||
// #endif
|
||||
#define MAXDISTANCE 1265000
|
||||
class /*IRIS_API_CLASS*/ CVSMD12XControl
|
||||
{
|
||||
public:
|
||||
CVSMD12XControl();
|
||||
~CVSMD12XControl();
|
||||
private:
|
||||
int *m_piPositionInPulses;
|
||||
|
||||
CAbstractPort *m_pAbsPort;
|
||||
unValue m_unValue;
|
||||
MSInfo m_stuMSInfo;
|
||||
ControllerParams m_stuControllerParams;
|
||||
int m_iProtocolType;
|
||||
int m_iCID;
|
||||
std::string m_strCID;
|
||||
public:
|
||||
bool m_bIsSyncMove;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//for IRIS Linear Motor - Electric Shutter
|
||||
//Initialize communication setup iPortType(0:RS232 1:RS485) iCID(For RS485 device) bSyncMove(move mode)
|
||||
bool ILMES_InitializeComm(QString portName,int bandrate=9600, int iPortType = 1, int iCID = 1, bool bSyncMove = true);
|
||||
//Initialize communication setup iPortType(0:RS232 1:RS485) iCID(For RS485 device) bSyncMove(move mode)
|
||||
bool ILMES_InitializeComm(PortInfo portinfo,int iPortType = 1,int iCID = 1, bool bSyncMove = true);
|
||||
|
||||
//Initialize Controller params
|
||||
bool ILMES_InitializeParams(ControllerParams cpParams);
|
||||
|
||||
//Set the light hole position(pulses)
|
||||
void ILMES_SetPosition(int *piPositionInPulse,size_t szSize);
|
||||
|
||||
bool ILMES_MoveToPos(int iPositionIndex);
|
||||
bool IsMotionFinished();
|
||||
public:
|
||||
int waitetime;
|
||||
////init port
|
||||
void SetProtocolType(int iProtocolType = 0);//0:RS232 1:RS485 call before send any command
|
||||
void SetCID(int iID);//set device id when using RS485 protocol call before send any command
|
||||
void SetSyncMode(bool bSyncMove = false);
|
||||
bool InitAndOpenPort(PortInfo portinfo);//Init comport by PortInfo Struct
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////for debug or unsupported function
|
||||
std::string ReadReceive();
|
||||
int SendCommand(const std::string strSend); // return indicates how many char has been sent
|
||||
//////////////////////////////////////////////////////////////////////////motor control
|
||||
////init&misc
|
||||
bool InitController(); //Init Motor controller hand shake
|
||||
|
||||
bool Enable(); //enbale
|
||||
bool Disable(); //disable
|
||||
|
||||
bool GetStatus(MSInfo &stuMotorParam); //load motor status see MSInfo Struct
|
||||
////motion control
|
||||
bool Move(int iRelPulse); // relative move mode,pulse (-2147483647<34><37>2147483647)
|
||||
bool MoveTo(int iAbsPulse);//absolute mode,pulse (-2147483647<34><37>2147483647)
|
||||
bool Move_NoSyn(int iRelPulse); // relative move mode,pulse (-2147483647<34><37>2147483647)
|
||||
bool MoveTo_NoSyn(int iAbsPulse);//absolute mode,pulse (-2147483647<34><37>2147483647)
|
||||
bool SetLogicZero(); //set logic zero
|
||||
|
||||
bool StartBackZero();//back zero
|
||||
bool StopBackZero();// stop back zero & reset register
|
||||
////Set&Get
|
||||
bool SetBaudRate(int iBaudRate);//set controller baud rates,default B9600 (2400 <20><> 921600)
|
||||
int GetBaudRate(); // -1:should retry;
|
||||
|
||||
bool SetMicroSteps(int iMicroSteps);//set micro steps (0<><30>5)->(1/2/4/8/16/32)
|
||||
int GetMicroSteps();
|
||||
|
||||
bool SetAccSpeed(float fAccSpd);//set acceleration speed in pulse (0 <20><> 192000000)
|
||||
float GetAccSpeed();
|
||||
|
||||
bool SetRunSpeed(float fRunSpeed);//set normal running speed in pulse (0 <20><> 192000000)
|
||||
float GetRunSpeed();
|
||||
|
||||
bool SetDecSpeed(float fDecSpeed);//set deceleration speed in pulse (0 <20><> 192000000)
|
||||
float GetDecSpeed();
|
||||
|
||||
bool SetSpeed(float fRunSpeed, float fAccSpd, float fDecSpeed);//see above three functions
|
||||
|
||||
bool SetHoldCurrent(float fHoldCurrent);//set hold current ( 0 <20><> 8.0 )Amp? pay attention to your motor specification.
|
||||
float GetHoldCurrent();
|
||||
|
||||
bool SetAccCurrent(float fAccCurrent);//set acceleration current ( 0 <20><> 8.0 )Amp? pay attention to your motor specification.
|
||||
float GetAccCurrent();
|
||||
|
||||
bool SetRunCurrent(float fRunCurrent);//set normal running current ( 0 <20><> 8.0 )Amp? pay attention to your motor specification.
|
||||
float GetRunCurrent();
|
||||
|
||||
bool SetCurrent(float fAccCurrent, float fRunCurrent, float fHoldCurrent);//see above three functions
|
||||
|
||||
bool SetS1FETE(ZZ_U8 bS1FETE);//S1 register falling edge trigger event,see enum
|
||||
ZZ_U8 GetS1FETE();
|
||||
|
||||
bool SetS1RETE(ZZ_U8 bS1RETE);//S1 register rising edge trigger event
|
||||
ZZ_U8 GetS1RETE();
|
||||
|
||||
bool SetS2FETE(ZZ_U8 bS2FETE);//S2 register falling edge trigger event
|
||||
ZZ_U8 GetS2FETE();
|
||||
|
||||
bool SetS2RETE(ZZ_U8 bS2RETE);//S2 register rising edge trigger event
|
||||
ZZ_U8 GetS2RETE();
|
||||
|
||||
//(ZeroMode 0:off 1:once 2:once + safe position 3:twice 4:twice + safe position) (OpenVoltageLevel 0:Low Level 1:High Level)
|
||||
//(ZeroSensor 0:S1 1:S2 2:S3 3:S4 4:S5 5:S6)( ZeroVelocity <20><>-192000) <20><><EFBFBD><EFBFBD>192000<30><30>pulse)(SafePosition <20><>-2147483647) <20><><EFBFBD><EFBFBD>2147483647<34><37>)
|
||||
bool SetZeroParams(ZZ_U8 bZeroMode, ZZ_U8 bSwitchOpenVL, ZZ_U8 bZeroSensor, float fZeroVelocity, int iSafePosition);
|
||||
ZZ_U8 GetZeroMode();
|
||||
ZZ_U8 GetSwitchOpenVoltageLevel();
|
||||
ZZ_U8 GetZeroSensor();
|
||||
int GetSafePosition();
|
||||
float GetZeroVelocity();
|
||||
|
||||
private:
|
||||
bool ParseReturnedString(std::string &strRecv,int iType);
|
||||
bool ParseReturnedParam(std::string &strRecv);
|
||||
void VSMD_BitShift(ZZ_U8* src, unValue* dst);
|
||||
char* VSMD_Split(char* cStr, char cSplit);
|
||||
};
|
||||
|
||||
108
othersoft/movingliner/source/LinearShutter/VSMD12XMiscDefines.h
Normal file
108
othersoft/movingliner/source/LinearShutter/VSMD12XMiscDefines.h
Normal file
@ -0,0 +1,108 @@
|
||||
#pragma once
|
||||
#include "ZZ_Types.h"
|
||||
#define MAXBUFFER 10240
|
||||
#include<qstring.h>
|
||||
using namespace ZZ_MISCDEF;
|
||||
|
||||
typedef struct tagTransportLayerInfomation
|
||||
{
|
||||
//Serial
|
||||
int iPortType;
|
||||
int iPortNumber;
|
||||
int indexBaudRate;
|
||||
int iBaudRate;
|
||||
int indexParity, indexBytesize, indexStopBits; //Mode
|
||||
bool Hw;
|
||||
bool Sw;
|
||||
bool Dtr, Rts;
|
||||
QString FullPortName;
|
||||
tagTransportLayerInfomation() {
|
||||
iPortType = 0;
|
||||
indexParity = 0;
|
||||
iPortNumber = 8;
|
||||
iBaudRate = 9600;
|
||||
indexBytesize = 3;
|
||||
indexStopBits = 0;
|
||||
FullPortName = "";
|
||||
}
|
||||
|
||||
//Bit
|
||||
//Stop
|
||||
//MODEM CONTROL setting
|
||||
//MODEM LINE STATUS
|
||||
|
||||
//TCP UDP
|
||||
|
||||
}PortInfo;
|
||||
|
||||
typedef struct tagMotorStatusInfo
|
||||
{
|
||||
float fVelocity;
|
||||
int iPosition;
|
||||
ZZ_U32 uiFlags;
|
||||
}MSInfo;
|
||||
|
||||
typedef struct tagControllerParams
|
||||
{
|
||||
int bdr; //baud
|
||||
int mcs; //microsteps 0:full 1:half 2:4 3:8 4:16 5:32 6:64 7:128 8:256
|
||||
float spd; //velocity
|
||||
float acc; //acceleration
|
||||
float dec; //deceleration
|
||||
float cra; //acc state current
|
||||
float crn; //normal state current
|
||||
float crh; //hold state current
|
||||
ZZ_U8 s1f;
|
||||
ZZ_U8 s1r;
|
||||
ZZ_U8 s2f;
|
||||
ZZ_U8 s2r;
|
||||
ZZ_U8 zmd; //zero mode
|
||||
ZZ_U8 osv; //open state sensor value
|
||||
ZZ_U8 snr; //zero sensor
|
||||
ZZ_U8 zsp; //zero safe position
|
||||
float zsd; //zero velocity
|
||||
tagControllerParams() {
|
||||
bdr = 9600;
|
||||
|
||||
cra = 0.8;
|
||||
crh = 0.1;
|
||||
crn = 0.8;
|
||||
|
||||
acc = 100000;
|
||||
dec = 100000;
|
||||
spd = 64000;
|
||||
|
||||
osv = 0;
|
||||
snr = 0;
|
||||
zmd = 3;
|
||||
zsp = 20;
|
||||
zsd = 50000;
|
||||
|
||||
mcs = 6;
|
||||
}
|
||||
}ControllerParams;
|
||||
|
||||
typedef union
|
||||
{
|
||||
ZZ_U8 byteValue[4];
|
||||
short i16Value[2];
|
||||
ZZ_U16 u16Value[2];
|
||||
int i32Value;
|
||||
float fValue;
|
||||
ZZ_U32 u32Value;
|
||||
}unValue;
|
||||
|
||||
enum emVSMDTriggerEvent
|
||||
{
|
||||
NoAction =0, //<2F><EFBFBD><DEB6><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>״̬λ S1 <20>仯֪ͨ<CDA8><D6AA>
|
||||
ResetZeroPosition, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>λ<EFBFBD><CEBB>
|
||||
DecSpdStop, //<2F><><EFBFBD><EFBFBD>ֹͣ
|
||||
DecSpdStopRZP, //<2F><><EFBFBD><EFBFBD>ֹͣ<CDA3><D6B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹͣ<CDA3><D6B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>λ<EFBFBD><CEBB>
|
||||
Stop, //<2F><><EFBFBD><EFBFBD>ֹͣ
|
||||
StopRZP, //<2F><><EFBFBD><EFBFBD>ֹͣ<CDA3><D6B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹͣ<CDA3><D6B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>λ<EFBFBD><CEBB>
|
||||
RunningPosDirect, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD><EFBFBD>ٶȣ<D9B6>
|
||||
RunningNegDirect, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD><EFBFBD>ٶȣ<D9B6>
|
||||
OfflineModeOn, //<2F><><EFBFBD><EFBFBD>ģʽ<C4A3><CABD><EFBFBD><EFBFBD>
|
||||
OfflineModeOff //<2F><><EFBFBD><EFBFBD>ģʽֹͣ
|
||||
};
|
||||
|
||||
147
othersoft/movingliner/source/LinearShutter/ZZ_SeiralPort.cpp
Normal file
147
othersoft/movingliner/source/LinearShutter/ZZ_SeiralPort.cpp
Normal file
@ -0,0 +1,147 @@
|
||||
#include "pch.h"
|
||||
#include "ZZ_SeiralPort.h"
|
||||
|
||||
CZZ_SeiralPort_QT::CZZ_SeiralPort_QT()
|
||||
{
|
||||
m_pSerialPort = new QSerialPort();
|
||||
}
|
||||
|
||||
CZZ_SeiralPort_QT::~CZZ_SeiralPort_QT()
|
||||
{
|
||||
if (m_pSerialPort != NULL)
|
||||
{
|
||||
delete m_pSerialPort;
|
||||
}
|
||||
}
|
||||
|
||||
void CZZ_SeiralPort_QT::InitPort(PortInfo portinfo)
|
||||
{
|
||||
|
||||
m_piSettings = portinfo;
|
||||
|
||||
|
||||
}
|
||||
|
||||
bool CZZ_SeiralPort_QT::SetPort()
|
||||
{
|
||||
bool bRes = true;
|
||||
// int iRes = sio_ioctl(m_piSettings.iPortNumber, m_piSettings.indexBaudRate,
|
||||
// m_piSettings.indexParity | m_piSettings.indexBytesize | m_piSettings.indexStopBits);
|
||||
// if (iRes != SIO_OK)
|
||||
// {
|
||||
// bRes = false;
|
||||
// }
|
||||
QString qstrPortName;
|
||||
if (m_piSettings.FullPortName!="")
|
||||
{
|
||||
qstrPortName = m_piSettings.FullPortName;
|
||||
qDebug() << m_piSettings.FullPortName;
|
||||
}
|
||||
else {
|
||||
qstrPortName = QString("COM%1").arg(m_piSettings.iPortNumber);
|
||||
}
|
||||
// qstrPortName = "COM4";
|
||||
// QString qstrPortName = m_piSettings.FullPortName;//QString("COM%1").arg(m_piSettings.iPortNumber);
|
||||
m_pSerialPort->setPortName(qstrPortName);
|
||||
m_pSerialPort->setReadBufferSize(512);
|
||||
bRes = m_pSerialPort->setBaudRate(m_piSettings.iBaudRate);
|
||||
return bRes;
|
||||
}
|
||||
|
||||
bool CZZ_SeiralPort_QT::Open()
|
||||
{
|
||||
bool bRes = true;
|
||||
// int iRes = sio_open(m_piSettings.iPortNumber);
|
||||
// if (iRes!=SIO_OK)
|
||||
// {
|
||||
// bRes = false;
|
||||
// }
|
||||
bRes = m_pSerialPort->open(QIODevice::ReadWrite);
|
||||
if (!bRes)
|
||||
{
|
||||
qDebug() << "Err:open Failed.Exit Code:1";
|
||||
//std::cout << "Err.open Failed" << std::endl;
|
||||
return bRes;;
|
||||
}
|
||||
return bRes;
|
||||
}
|
||||
|
||||
void CZZ_SeiralPort_QT::Close()
|
||||
{
|
||||
m_pSerialPort->close();
|
||||
}
|
||||
|
||||
std::string CZZ_SeiralPort_QT::ReadAll(int waite)
|
||||
{
|
||||
if (!m_pSerialPort->waitForReadyRead(waite))
|
||||
{
|
||||
return "";
|
||||
|
||||
}
|
||||
if (
|
||||
m_pSerialPort->bytesAvailable() == 0
|
||||
)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
qbaRecv.clear();
|
||||
|
||||
qbaRecv = m_pSerialPort->readAll();
|
||||
|
||||
|
||||
std::string strRet(qbaRecv.constData(), qbaRecv.length());
|
||||
return strRet;
|
||||
|
||||
// std::string strRet;
|
||||
// char cBuf[MAXBUFFER];
|
||||
// int iRet = sio_read(m_piSettings.iPortNumber,cBuf, MAXBUFFER);
|
||||
// if (iRet==0)
|
||||
// {
|
||||
// strRet = "";
|
||||
//
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// char *pRecv = new char[iRet];
|
||||
// memcpy(pRecv, cBuf, iRet);
|
||||
// //std::string strRet(pRecv);
|
||||
// //delete pRecv;
|
||||
// //return strRet;
|
||||
//
|
||||
// strRet.resize(iRet);
|
||||
// for (int i=0;i<iRet;i++)
|
||||
// {
|
||||
// strRet[i] = pRecv[i];
|
||||
// }
|
||||
// delete pRecv;
|
||||
// }
|
||||
// return strRet;
|
||||
}
|
||||
|
||||
int CZZ_SeiralPort_QT::Write(const std::string strSend)
|
||||
{
|
||||
QByteArray qbaTest(strSend.c_str(),(int)strSend.length());
|
||||
qint64 qi64Write = m_pSerialPort->write(qbaTest);
|
||||
m_pSerialPort->waitForBytesWritten(5000);
|
||||
if (qi64Write != qbaTest.size())
|
||||
{
|
||||
qDebug() << "Err:write Failed.Exit Code:1" << qi64Write;
|
||||
return qi64Write;
|
||||
}
|
||||
|
||||
return 0;
|
||||
// char* pcSend = (char*)strSend.c_str();
|
||||
// int iRet = sio_write(m_piSettings.iPortNumber, pcSend, (int)strSend.length());
|
||||
//
|
||||
// //delete pcSend;
|
||||
// if (iRet!= (int)strSend.length())
|
||||
// {
|
||||
// return iRet;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return 0;
|
||||
// }
|
||||
// //sio_write();
|
||||
}
|
||||
26
othersoft/movingliner/source/LinearShutter/ZZ_SeiralPort.h
Normal file
26
othersoft/movingliner/source/LinearShutter/ZZ_SeiralPort.h
Normal file
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include "VSMD12XMiscDefines.h"
|
||||
#include "AbstractPort.h"
|
||||
#include"qobject.h"
|
||||
class CZZ_SeiralPort_QT :public CAbstractPort,QObject
|
||||
{
|
||||
|
||||
private:
|
||||
PortInfo m_piSettings;
|
||||
QByteArray qbaSend, qbaRecv;
|
||||
QSerialPort *m_pSerialPort;
|
||||
public:
|
||||
CZZ_SeiralPort_QT();
|
||||
virtual ~CZZ_SeiralPort_QT();
|
||||
public:
|
||||
virtual void InitPort(PortInfo portinfo);
|
||||
virtual bool SetPort();
|
||||
virtual bool Open();
|
||||
virtual void Close();
|
||||
|
||||
virtual std::string ReadAll(int waittime = 5000);
|
||||
|
||||
virtual int Write(const std::string strSend);
|
||||
|
||||
};
|
||||
|
||||
297
othersoft/movingliner/source/LinearShutter/ZZ_Types.h
Normal file
297
othersoft/movingliner/source/LinearShutter/ZZ_Types.h
Normal file
@ -0,0 +1,297 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//<2F><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>ļ<EFBFBD>
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
#include "pch.h"
|
||||
#include <string>
|
||||
#define MAX_DEVICENUMBER_FS 2
|
||||
#define MAX_LINEARSHUTTER_POSITION 12
|
||||
namespace ZZ_MISCDEF
|
||||
{
|
||||
typedef unsigned char ZZ_U8;
|
||||
typedef unsigned short int ZZ_U16;
|
||||
typedef unsigned long int ZZ_U32;
|
||||
|
||||
|
||||
namespace IRIS
|
||||
{
|
||||
//Fiber Spectrometer
|
||||
namespace FS
|
||||
{
|
||||
typedef struct tagDataFrame
|
||||
{
|
||||
ZZ_U16 usExposureTimeInMS;
|
||||
ZZ_U16 usData[4096];
|
||||
float fTemperature;
|
||||
double dTimes = 0;
|
||||
}DataFrame;
|
||||
|
||||
typedef struct tagDeviceInfo
|
||||
{
|
||||
std::string strPN;
|
||||
std::string strSN;
|
||||
}DeviceInfo;
|
||||
|
||||
typedef struct tagDeviceAttribute
|
||||
{
|
||||
int iPixels;
|
||||
int iMaxIntegrationTimeInMS;
|
||||
int iMinIntegrationTimeInMS;
|
||||
float fWaveLengthInNM[4096];
|
||||
|
||||
}DeviceAttribute;
|
||||
}
|
||||
|
||||
enum DeviceModel
|
||||
{
|
||||
OSIFAlpha=0,
|
||||
OSIFBeta,
|
||||
ISIF,
|
||||
IS1,
|
||||
IS2
|
||||
};
|
||||
|
||||
// inline std::string GetDeviceModelName(int iModel)
|
||||
// {
|
||||
// switch (iModel)
|
||||
// {
|
||||
// case DeviceModel::OSIFAlpha: return "OSIFAlpha"; break;
|
||||
// case DeviceModel::OSIFBeta: return "OSIFBeta"; break;
|
||||
// case DeviceModel::ISIF: return "ISIF"; break;
|
||||
// case DeviceModel::IS1: return "IS1"; break;
|
||||
// case DeviceModel::IS2: return "IS2"; break;
|
||||
// default: return "error"; break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// inline int GetIndex(std::string strDeviceModelName)
|
||||
// {
|
||||
// if (strDeviceModelName== "OSIFAlpha")
|
||||
// {
|
||||
// return DeviceModel::OSIFAlpha;
|
||||
// }
|
||||
// else if (strDeviceModelName == "OSIFBeta")
|
||||
// {
|
||||
// return DeviceModel::OSIFBeta;
|
||||
// }
|
||||
// else if (strDeviceModelName == "ISIF")
|
||||
// {
|
||||
// return DeviceModel::ISIF;
|
||||
// }
|
||||
// else if (strDeviceModelName == "IS1")
|
||||
// {
|
||||
// return DeviceModel::IS1;
|
||||
// }
|
||||
// else if(strDeviceModelName == "IS2")
|
||||
// {
|
||||
// return DeviceModel::IS2;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return -1;
|
||||
// }
|
||||
// }
|
||||
|
||||
};
|
||||
|
||||
//ATPָ<50><D6B8>ת<EFBFBD><D7AA>
|
||||
namespace ATP
|
||||
{
|
||||
const int MAX_SPECTRUM_SIZE = 4096;
|
||||
|
||||
const int GET_MODULECIRCUIT_TEMP = 0x01;
|
||||
const int GET_PN_NUMBER = 0x03;
|
||||
const int GET_SN_NUMBER = 0x04;
|
||||
const int GET_MANUFACTURE_DATA = 0x06;
|
||||
const int GET_MANUFACTURE_INFO = 0x09;
|
||||
const int GET_PIXEL_LENGTH = 0x0a;
|
||||
const int GET_TEC_TEMP = 0x13;
|
||||
const int SET_TEC_TEMP = 0x12;
|
||||
const int GET_OPTICS_TEMP = 0x35;
|
||||
const int GET_CIRCUITBOARD_TEMP = 0x36;
|
||||
const int SET_INTEGRATION_TIME = 0x14;
|
||||
const int GET_INTEGRATION_TIME = 0x41;
|
||||
const int GET_MAX_INTEGRATION_TIME = 0x42;
|
||||
const int GET_MIN_INTEGRATION_TIME = 0x43;
|
||||
const int ASYNC_COLLECT_DARK = 0x23;
|
||||
const int ASYNC_START_COLLECTION = 0x16;
|
||||
const int ASYNC_READ_DATA = 0x17;
|
||||
const int SET_AVERAGE_NUMBER = 0x28;
|
||||
const int SYNC_GET_DATA = 0x1e;
|
||||
const int SYNC_GET_DARK = 0x2f;
|
||||
const int EXTERNAL_TRIGGER_ENABLE = 0x1f;
|
||||
const int SET_XENON_LAMP_DELAY_TIME = 0x24;
|
||||
const int GET_WAVELENGTH_CALIBRATION_COEF = 0x55;
|
||||
const int GET_STAT_LAMPOUT = 0x60;
|
||||
const int SET_GPIO = 0x61;
|
||||
//const int SYNCHRONIZATION_GET_DARK = 0x23
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////device
|
||||
enum Model
|
||||
{
|
||||
ATP1010 = 0,
|
||||
ATP6500
|
||||
};
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>֡<EFBFBD><D6A1><EFBFBD><EFBFBD>
|
||||
typedef struct tagATPDataFrame
|
||||
{
|
||||
unsigned short usExposureTime;
|
||||
ZZ_U16 usData[4096];
|
||||
float fTemperature;
|
||||
double dTimes = 0;
|
||||
}ATPDataFrame;
|
||||
|
||||
//<2F>豸<EFBFBD><E8B1B8>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
||||
typedef struct tagATPDeviceInfo
|
||||
{
|
||||
std::string strPN;
|
||||
std::string strSN;
|
||||
}ATPDeviceInfo;
|
||||
|
||||
//<2F>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
typedef struct tagATPDeviceAttribute
|
||||
{
|
||||
int iPixels;
|
||||
int iMaxIntegrationTime;
|
||||
int iMinIntegrationTime;
|
||||
float fWaveLength[4096];
|
||||
|
||||
}ATPDeviceAttribute;
|
||||
//////////////////////////////////////////////////////////////////////////config file
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD>в<EFBFBD><D0B2><EFBFBD>
|
||||
namespace ZZ_RUNPARAMS
|
||||
{
|
||||
typedef struct tagFiberSpecContext
|
||||
{
|
||||
ZZ_U8 ucDeviceNumber;
|
||||
ZZ_U8 ucDeviceModel[MAX_DEVICENUMBER_FS];
|
||||
int iInterface[MAX_DEVICENUMBER_FS];
|
||||
std::string strSN[MAX_DEVICENUMBER_FS];
|
||||
}FSContext;
|
||||
|
||||
typedef struct tagLinearShutterContext
|
||||
{
|
||||
ZZ_U8 ucPort;
|
||||
ZZ_U8 ucProtocolType;
|
||||
ZZ_U8 ucCmdID;
|
||||
}LSContext;
|
||||
|
||||
typedef struct tagAcquisitionTimeSettings
|
||||
{
|
||||
QTime qtStartTime;
|
||||
QTime qtStopTime;
|
||||
QTime qtInterval;
|
||||
}AcqTimeSettings;
|
||||
|
||||
typedef struct tagAcquisitionPositionSettings
|
||||
{
|
||||
int iTotalPosition;
|
||||
int iPosition[MAX_LINEARSHUTTER_POSITION];
|
||||
}AcqPosSettings;
|
||||
|
||||
typedef struct tagRunTimeGrabberParams
|
||||
{
|
||||
LSContext lscParam;
|
||||
FSContext fscParams;
|
||||
AcqTimeSettings atsParams;
|
||||
AcqPosSettings apsParams;
|
||||
}RunTimeGrabberParams;
|
||||
|
||||
typedef struct tagATPCalibrationSettings
|
||||
{
|
||||
//Up0 Down1,2,3
|
||||
QString qsISIF_CalibrationFilePath[4];
|
||||
QString qsIS1_CalibrationFilePath[4];
|
||||
}ATPCalibrationSettings;
|
||||
}
|
||||
|
||||
//ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC>ṹ
|
||||
namespace ZZ_DATAFILE
|
||||
{
|
||||
typedef struct tagEnvironmentalContext
|
||||
{
|
||||
QString qstrUTCDateTime;
|
||||
QString qstrLocation;
|
||||
QString qstrGPS_Longtitude;
|
||||
QString qstrGPS_Latitude;
|
||||
QString qstrGPS_Altitude;
|
||||
QString qstrGPS_North;
|
||||
QString qstrCaseTemperature;
|
||||
QString qstrCaseHumidity;
|
||||
|
||||
}EContext;
|
||||
|
||||
typedef struct tagManmadeEnviromentalContext
|
||||
{
|
||||
QString qstrOriFileName;
|
||||
QString qstrInstallationTime;
|
||||
QString qstrISIFCalibrationTime;
|
||||
QString qstrIS1CalibrationTime;
|
||||
QString qstrNameOfMaintenanceStaff;
|
||||
QString qstrPhoneNumberOfMaintenanceStaff;
|
||||
QString qstrDownloadUserID;
|
||||
QString qstrDownlaodAddress;
|
||||
QString qstrHTTPServer;
|
||||
}MEContext;
|
||||
|
||||
|
||||
typedef struct tagIS1Information
|
||||
{
|
||||
QString qstrSN_ATP;
|
||||
QString qstrSN_IRIS;
|
||||
|
||||
QString qstrCalFile_U0;
|
||||
QString qstrCalFile_D1;
|
||||
QString qstrCalFile_D2;
|
||||
QString qstrCalFile_D3;
|
||||
|
||||
int iPixelCount;
|
||||
|
||||
int iExposureTimeInMS_U0;
|
||||
int iExposureTimeInMS_D1;
|
||||
int iExposureTimeInMS_D2;
|
||||
int iExposureTimeInMS_D3;
|
||||
|
||||
float fTemperature_U0;
|
||||
float fTemperature_D1;
|
||||
float fTemperature_D2;
|
||||
float fTemperature_D3;
|
||||
}IS1Info;
|
||||
|
||||
typedef struct tagISIFInformation
|
||||
{
|
||||
QString qstrSN_ATP;
|
||||
QString qstrSN_IRIS;
|
||||
|
||||
QString qstrCalFile_U0;
|
||||
QString qstrCalFile_D1;
|
||||
QString qstrCalFile_D2;
|
||||
QString qstrCalFile_D3;
|
||||
|
||||
int iPixelCount;
|
||||
|
||||
int iExposureTimeInMS_U0;
|
||||
int iExposureTimeInMS_D1;
|
||||
int iExposureTimeInMS_D2;
|
||||
int iExposureTimeInMS_D3;
|
||||
|
||||
float fTemperature_U0;
|
||||
float fTemperature_D1;
|
||||
float fTemperature_D2;
|
||||
float fTemperature_D3;
|
||||
}ISIFInfo;
|
||||
|
||||
typedef struct tagATPDataHeader
|
||||
{
|
||||
|
||||
|
||||
}ATPDataHeader;
|
||||
}
|
||||
|
||||
};
|
||||
28
othersoft/movingliner/source/LinearShutter/pch.h
Normal file
28
othersoft/movingliner/source/LinearShutter/pch.h
Normal file
@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
////////////////////////////setings
|
||||
#include <QSettings>
|
||||
#include <QMetaEnum>
|
||||
////////////////////////////Basic
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QString>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QObject>
|
||||
////////////////////////////Thread
|
||||
#include <QThread>
|
||||
#include <QMutex>
|
||||
#include <QWaitCondition>
|
||||
////////////////////////////json
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QJsonParseError>
|
||||
////////////////////////////time
|
||||
#include <QtCore/QTime>
|
||||
#include <QDateTime>
|
||||
#include <QTimer>
|
||||
////////////////////////////Serial I/O
|
||||
#include <QtSerialPort/QSerialPort>
|
||||
#include <QtSerialPort/QSerialPortInfo>
|
||||
191
othersoft/movingliner/source/Settings/SystemConfigger.cpp
Normal file
191
othersoft/movingliner/source/Settings/SystemConfigger.cpp
Normal file
@ -0,0 +1,191 @@
|
||||
#include "SystemConfigger.h"
|
||||
|
||||
|
||||
ZZ_SysConfigger::ZZ_SysConfigger(QObject *parent /*= nullptr*/)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_qstrDeviceConfigFilePath = "E:/WorkSpace/TowerOptoSifAndSpectral/config/DeviceSettings.ini";
|
||||
m_qstrJSONConfigFilePath = "E:/WorkSpace/TowerOptoSifAndSpectral/config/config.json";
|
||||
#else
|
||||
m_qstrJSONConfigFilePath = ("/home/data/Setting/config.json");
|
||||
#endif // DEBUG
|
||||
|
||||
m_qsDeviceConfig = NULL;
|
||||
}
|
||||
|
||||
ZZ_SysConfigger::~ZZ_SysConfigger()
|
||||
{
|
||||
if (qfJConfig.isOpen())
|
||||
{
|
||||
qfJConfig.close();
|
||||
}
|
||||
}
|
||||
|
||||
int ZZ_SysConfigger::Initialize()
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////load device settings
|
||||
using namespace ZZ_MISCDEF;
|
||||
QMetaEnum enumDeviceModel = QMetaEnum::fromType<ConfiggerDeviceModel>();
|
||||
|
||||
if (m_qsDeviceConfig!=NULL)
|
||||
{
|
||||
delete m_qsDeviceConfig;
|
||||
}
|
||||
m_qsDeviceConfig = new QSettings(m_qstrDeviceConfigFilePath, QSettings::IniFormat);
|
||||
m_struDeviceContext.ucDeviceNumber = m_qsDeviceConfig->value(QString("DEVICE INFO/TotalSpectrometer"),-1).toInt();
|
||||
if (m_struDeviceContext.ucDeviceNumber == -1)
|
||||
{
|
||||
qDebug() << "DEVICE INFO TotalSpectrometer Value Err.";
|
||||
return 3;
|
||||
}
|
||||
for (ZZ_U8 i=0;i< m_struDeviceContext.ucDeviceNumber;i++)
|
||||
{
|
||||
QString qstrTemp= m_qsDeviceConfig->value(QString("FS%1/Model").arg(i+1), "Null").toString();
|
||||
m_struDeviceContext.ucDeviceModel[i]= enumDeviceModel.keysToValue(qstrTemp.toLatin1().data());
|
||||
|
||||
int iInterface= m_qsDeviceConfig->value(QString("FS%1/Port").arg(i + 1), -2).toInt();
|
||||
m_struDeviceContext.iInterface[i] = iInterface;
|
||||
|
||||
qstrTemp = m_qsDeviceConfig->value(QString("FS%1/UID").arg(i + 1), "Null").toString();
|
||||
m_struDeviceContext.strSN[i] = qstrTemp.toStdString();
|
||||
}
|
||||
|
||||
m_struAcqPosition.iTotalPosition = m_qsDeviceConfig->value(QString("LINEAR SHUTTER/TotalPosition"), -1).toInt();
|
||||
if (m_struAcqPosition.iTotalPosition == -1)
|
||||
{
|
||||
qDebug() << "LINEAR SHUTTER TotalPosition Value Err.";
|
||||
return 4;
|
||||
}
|
||||
|
||||
for (ZZ_U8 i = 0; i < m_struAcqPosition.iTotalPosition; i++)
|
||||
{
|
||||
int iPosition = m_qsDeviceConfig->value(QString("LINEAR SHUTTER/Position%1").arg(i), -2).toInt();
|
||||
m_struAcqPosition.iPosition[i] = iPosition;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////load json settings
|
||||
qfJConfig.setFileName(m_qstrJSONConfigFilePath);
|
||||
bool bRes = qfJConfig.open(QIODevice::ReadOnly);
|
||||
if (!bRes)
|
||||
{
|
||||
qDebug() << "QFile open config file Err.";
|
||||
return 1;
|
||||
}
|
||||
|
||||
m_qbaJData = qfJConfig.readAll();
|
||||
m_qjdJDoc= QJsonDocument::fromJson(m_qbaJData, &m_qjpeJErr);
|
||||
if (m_qjpeJErr.error != QJsonParseError::NoError)
|
||||
{
|
||||
qDebug() << m_qjpeJErr.errorString();
|
||||
return 2;
|
||||
}
|
||||
m_qjoJObj = m_qjdJDoc.object();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_SysConfigger::GetGrabberRunParams(RunTimeGrabberParams &struGrabberRTParams)
|
||||
{
|
||||
struGrabberRTParams.atsParams = m_struAcqTime;
|
||||
struGrabberRTParams.fscParams = m_struDeviceContext;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_SysConfigger::LoadSettingsFromFile_IS1()
|
||||
{
|
||||
m_struIS1Info.qstrCalFile_U0 = m_qjoJObj.value("IS1UpCalFile").toString();
|
||||
m_struIS1Info.qstrCalFile_D1 = m_qjoJObj.value("IS1DownCalFile1").toString();
|
||||
m_struIS1Info.qstrCalFile_D2 = m_qjoJObj.value("IS1DownCalFile2").toString();
|
||||
m_struIS1Info.qstrCalFile_D3 = m_qjoJObj.value("IS1DownCalFile3").toString();
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_SysConfigger::LoadSettingsFromFile_iSIF()
|
||||
{
|
||||
m_struISIFInfo.qstrCalFile_U0 = m_qjoJObj.value("SIFUpCalFile").toString();
|
||||
m_struISIFInfo.qstrCalFile_D1 = m_qjoJObj.value("SIFDownCalFile1").toString();
|
||||
m_struISIFInfo.qstrCalFile_D2 = m_qjoJObj.value("SIFDownCalFile2").toString();
|
||||
m_struISIFInfo.qstrCalFile_D3 = m_qjoJObj.value("SIFDownCalFile3").toString();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_SysConfigger::LoadSettingsFromFile_System()
|
||||
{
|
||||
// QString qstr = m_qjoJObj.value("IntervalTime").toString();
|
||||
m_struAcqTime.qtStartTime=QTime::fromString(m_qjoJObj.value("BeginTime").toString(), "hh:mm");
|
||||
if (!m_struAcqTime.qtStartTime.isValid())
|
||||
{
|
||||
qDebug() << "Invalid BeginTime";
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_struAcqTime.qtInterval = QTime::fromString(m_qjoJObj.value("IntervalTime").toString(), "ss");
|
||||
if (!m_struAcqTime.qtInterval.isValid())
|
||||
{
|
||||
qDebug() << "Invalid IntervalTime";
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
m_struAcqTime.qtInterval = QTime::fromString(m_qjoJObj.value("IntervalTime").toString(), "mm");
|
||||
if (!m_struAcqTime.qtInterval.isValid())
|
||||
{
|
||||
qDebug() << "Invalid IntervalTime";
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
m_struAcqTime.qtStopTime = QTime::fromString(m_qjoJObj.value("EndTime").toString(), "hh:mm");
|
||||
if (!m_struAcqTime.qtStopTime.isValid())
|
||||
{
|
||||
qDebug() << "Invalid EndTime";
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_SysConfigger::LoadSettingsFromFile_MISC()
|
||||
{
|
||||
m_struEC.qstrLocation = m_qjoJObj.value("Location").toString();
|
||||
m_struEC.qstrGPS_Altitude = m_qjoJObj.value("GPS_Altitude").toString();
|
||||
m_struEC.qstrGPS_Latitude = m_qjoJObj.value("GPS_Latitude").toString();
|
||||
m_struEC.qstrGPS_Longtitude = m_qjoJObj.value("GPS_Longtitude").toString();
|
||||
m_struEC.qstrGPS_North = m_qjoJObj.value("GPS_North").toString();
|
||||
|
||||
m_struMEC.qstrInstallationTime = m_qjoJObj.value("InstallationTime").toString();
|
||||
m_struMEC.qstrISIFCalibrationTime = m_qjoJObj.value("ISIFCalibrationTime").toString();
|
||||
m_struMEC.qstrIS1CalibrationTime = m_qjoJObj.value("IS1CalibrationTime").toString();
|
||||
m_struMEC.qstrNameOfMaintenanceStaff = m_qjoJObj.value("NameOfMaintenanceStaff").toString();
|
||||
m_struMEC.qstrPhoneNumberOfMaintenanceStaff = m_qjoJObj.value("PhoneNumberOfMaintenanceStaff").toString();
|
||||
m_struMEC.qstrDownloadUserID = m_qjoJObj.value("DownloadUserID").toString();
|
||||
m_struMEC.qstrDownlaodAddress = m_qjoJObj.value("DownlaodAddress").toString();
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_SysConfigger::LoadSettings_Test()
|
||||
{
|
||||
QFile qfTest(m_qstrJSONConfigFilePath);
|
||||
|
||||
qfTest.open(QFile::ReadOnly);
|
||||
|
||||
QByteArray qbJData = qfTest.readAll();
|
||||
|
||||
QJsonParseError jerr;
|
||||
QJsonDocument jdoc(QJsonDocument::fromJson(qbJData, &jerr));
|
||||
if (jerr.error!= QJsonParseError::NoError)
|
||||
{
|
||||
qDebug() << jerr.errorString();
|
||||
}
|
||||
|
||||
QJsonObject rootobj = jdoc.object();
|
||||
QStringList key = rootobj.keys();
|
||||
QString qtest1 = rootobj.value(rootobj.keys().at(15)).toString();
|
||||
return 0;
|
||||
}
|
||||
57
othersoft/movingliner/source/Settings/SystemConfigger.h
Normal file
57
othersoft/movingliner/source/Settings/SystemConfigger.h
Normal file
@ -0,0 +1,57 @@
|
||||
#pragma once
|
||||
#include "pch.h"
|
||||
#include "ZZ_Types.h"
|
||||
using namespace ZZ_MISCDEF::ZZ_RUNPARAMS;
|
||||
using namespace ZZ_MISCDEF::ZZ_DATAFILE;
|
||||
|
||||
class ZZ_SysConfigger :public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ZZ_SysConfigger(QObject *parent = nullptr);
|
||||
virtual ~ZZ_SysConfigger();
|
||||
public:
|
||||
int Initialize();
|
||||
int GetGrabberRunParams(RunTimeGrabberParams &struGrabberRTParams);
|
||||
|
||||
int LoadSettingsFromFile_IS1();
|
||||
int LoadSettingsFromFile_iSIF();
|
||||
int LoadSettingsFromFile_System();
|
||||
int LoadSettingsFromFile_MISC();
|
||||
int LoadSettings_Test();
|
||||
public:
|
||||
enum ConfiggerDeviceModel
|
||||
{
|
||||
OSIFAlpha = 0,
|
||||
OSIFBeta,
|
||||
ISIF,
|
||||
IS1,
|
||||
IS2,
|
||||
Null
|
||||
};
|
||||
Q_ENUM(ConfiggerDeviceModel);
|
||||
//////////////////////////////////////////////////////////////////////////run-time settings
|
||||
AcqTimeSettings m_struAcqTime;
|
||||
FSContext m_struDeviceContext;
|
||||
AcqPosSettings m_struAcqPosition;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
EContext m_struEC;
|
||||
MEContext m_struMEC;
|
||||
IS1Info m_struIS1Info;
|
||||
ISIFInfo m_struISIFInfo;
|
||||
|
||||
private:
|
||||
QString m_qstrDeviceConfigFilePath;
|
||||
QString m_qstrJSONConfigFilePath;
|
||||
QFile qfJConfig/*,qfDeviceConfig*/;
|
||||
QSettings *m_qsDeviceConfig;
|
||||
|
||||
QByteArray m_qbaJData;
|
||||
QJsonParseError m_qjpeJErr;
|
||||
QJsonObject m_qjoJObj;
|
||||
QJsonDocument m_qjdJDoc;
|
||||
|
||||
|
||||
|
||||
};
|
||||
47
othersoft/shuttercali/project/LocationCali/CMakeLists.txt
Normal file
47
othersoft/shuttercali/project/LocationCali/CMakeLists.txt
Normal file
@ -0,0 +1,47 @@
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
|
||||
project(shutter_calibrate)
|
||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} C:/Qt/Qt5.12.7/5.12.7/mingw73_64)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(QT Core Gui Network WebSockets SerialPort Widgets)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
find_package(Qt5 REQUIRED ${QT})
|
||||
|
||||
|
||||
file(GLOB_RECURSE HDR_LIST "../../source/*.h")
|
||||
file(GLOB_RECURSE SRC_LIST "../../source/*.cpp")
|
||||
file(GLOB_RECURSE HDR_LIST1 "../../source_rlx/*.h")
|
||||
file(GLOB_RECURSE SRC_LIST1 "../../source_rlx/*.cpp")
|
||||
|
||||
include_directories("../../source")
|
||||
include_directories("../../source/FS")
|
||||
include_directories("../../source/Logger")
|
||||
include_directories("../../source/ZZ_SDK")
|
||||
include_directories("../../source/Settings")
|
||||
include_directories("../../source/Thread")
|
||||
include_directories("../../source/LinearShutter")
|
||||
include_directories("../../source_rlx/ShutterCali")
|
||||
include_directories("../../source_rlx/sensor")
|
||||
include_directories("../../source/OSIF/include")
|
||||
include_directories("D:/02Raspberry/2020-12-17/SeaBreeze/include")
|
||||
link_directories("D:/02Raspberry/2020-12-17/SeaBreeze/lib")
|
||||
link_directories("/home/pi/SeaBrease/lib")
|
||||
add_executable( shutter_calibrate main.cpp
|
||||
${HDR_LIST}
|
||||
${SRC_LIST}
|
||||
${HDR_LIST1}
|
||||
${SRC_LIST1}
|
||||
)
|
||||
qt5_use_modules(shutter_calibrate ${QT})
|
||||
#target_link_libraries(shutter_calibrate SeaBreeze)
|
||||
IF (WIN32)
|
||||
target_link_libraries(shutter_calibrate SeaBreeze)
|
||||
#target_link_libraries(shutter_calibrate seabreeze usb stdc++ m)
|
||||
ELSE ()
|
||||
target_link_libraries(shutter_calibrate seabreeze usb stdc++ m)
|
||||
ENDIF ()
|
||||
set_target_properties(shutter_calibrate PROPERTIES AUTOMOC ON)
|
||||
|
||||
|
||||
BIN
othersoft/shuttercali/project/LocationCali/SeaBreeze.dll
Normal file
BIN
othersoft/shuttercali/project/LocationCali/SeaBreeze.dll
Normal file
Binary file not shown.
BIN
othersoft/shuttercali/project/LocationCali/SeaBreeze.lib
Normal file
BIN
othersoft/shuttercali/project/LocationCali/SeaBreeze.lib
Normal file
Binary file not shown.
305
othersoft/shuttercali/project/LocationCali/main.cpp
Normal file
305
othersoft/shuttercali/project/LocationCali/main.cpp
Normal file
@ -0,0 +1,305 @@
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include<VSMD12XControl.h>
|
||||
#include "QTextCodec"
|
||||
#include "SensorMannager.h"
|
||||
#include"SensorOptoSky.h"
|
||||
#include"SensorQExPRO.h"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <QTextStream>
|
||||
#include <QSettings>
|
||||
|
||||
QTextStream cout1(stdout, QIODevice::WriteOnly);
|
||||
void logout(QString str){
|
||||
cout1<<str<<" <br>"<<flush;
|
||||
cout1<<endl;
|
||||
// std::fflush(stdout);
|
||||
}
|
||||
vector<int> FindFeng(vector<int > point1ist, vector<float> valuelist);
|
||||
vector<int> DengJianJu(int position, int distanc, int times = 10);
|
||||
vector <float> PingHua(vector <float> value, int step = 2);
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
||||
if (argc!=4)
|
||||
{
|
||||
logout("Some Thing error Please check the input");
|
||||
logout( "The Correct Should Be application sensor numberofposition");
|
||||
logout( "apllication Sensor positionneed shutter_time");
|
||||
logout("Senor: OSIFAlpha QEPRO");
|
||||
logout("Senor: OSIFBeta QE65");
|
||||
logout("Senor: ISIF ATP6500");
|
||||
logout("Senor: IS1 ATP1010");
|
||||
logout("Senor: IS2 ATP5020");
|
||||
|
||||
return 0;
|
||||
}
|
||||
// cali;
|
||||
int bandsnumber=1024;
|
||||
QString SensorTypestr(argv[1]);
|
||||
QString PositionNumberstr(argv[2]);
|
||||
int shuttertime=QString(argv[3]).toInt();
|
||||
int PositionNumber=PositionNumberstr.toInt();
|
||||
QCoreApplication aaaaa(argc, argv);
|
||||
|
||||
QString m_qstrDeviceConfigFilePath;
|
||||
|
||||
#ifdef WIN32
|
||||
m_qstrDeviceConfigFilePath = ("D:\\03MyGit\\linux\\movingliner\\DeviceSettings.ini");
|
||||
#else
|
||||
m_qstrDeviceConfigFilePath = ("/home/data/Setting/DeviceSettings.ini");
|
||||
#endif
|
||||
QSettings *m_qsDeviceConfig;
|
||||
m_qsDeviceConfig = new QSettings(m_qstrDeviceConfigFilePath, QSettings::IniFormat);
|
||||
int numberofsensor=m_qsDeviceConfig->value("DEVICE INFO/TotalSpectrometer").toInt();
|
||||
|
||||
|
||||
logout("Welcom to use the Auto Locate Application");
|
||||
string hdrPath = "/home/data/test.csv";
|
||||
std::ofstream outfile(hdrPath.c_str());
|
||||
string hdrPath1 = "/home/data/result.csv";
|
||||
std::ofstream outfile1(hdrPath1.c_str());
|
||||
|
||||
logout("Sensor is "+SensorTypestr);
|
||||
SensorBase* aa= nullptr;
|
||||
if (SensorTypestr=="OSIFAlpha")
|
||||
{
|
||||
aa = new SensorQExPRO(QE65PRO_QE);
|
||||
|
||||
} else if (SensorTypestr=="OSIFBeta")
|
||||
{
|
||||
aa = new SensorQExPRO(QE65PRO_QE);
|
||||
|
||||
}
|
||||
if(aa== nullptr)
|
||||
{
|
||||
QString portname="";
|
||||
for (int i = 0; i < numberofsensor; ++i) {
|
||||
QString key="FS"+QString::number(i+1)+"/Model";
|
||||
qDebug()<<key;
|
||||
if (m_qsDeviceConfig->value(key).toString()==SensorTypestr)
|
||||
{
|
||||
QString portstr=m_qsDeviceConfig->value("FS"+QString::number(i+1)+"/Port").toString();
|
||||
QStringList strlist=portstr.split('/');
|
||||
portname=strlist.at(strlist.length()-1);
|
||||
}
|
||||
}
|
||||
// qDebug()<<portname;
|
||||
|
||||
if (portname=="")
|
||||
{
|
||||
logout("<b style=\"color:red\">Can not find the sensor"+SensorTypestr+"<\/b>");
|
||||
return 1;
|
||||
}
|
||||
logout("Sensor Port is "+portname);
|
||||
aa=new SensorOptoSky(ATP6500,portname);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//SensorBase* aa = new SensorOptoSky(ATP6500,"ttyUSB0");
|
||||
|
||||
aa->initSensor();
|
||||
STRSensorInfo info= aa->SensorInfo;
|
||||
int bandsshow=info.BandNum/2;
|
||||
logout("Sensor Bands to Show is "+QString::number(bandsshow));
|
||||
STROnePlot oneplot;
|
||||
|
||||
|
||||
CVSMD12XControl Motercontrol;
|
||||
//Motercontrol.ILMES_InitializeComm("COM16");
|
||||
if ( m_qsDeviceConfig->value("LINEAR SHUTTER/Port").toString()!="")
|
||||
{
|
||||
logout("Find the motor port:"+m_qsDeviceConfig->value("LINEAR SHUTTER/Port").toString());
|
||||
Motercontrol.ILMES_InitializeComm( m_qsDeviceConfig->value("LINEAR SHUTTER/Port").toString());
|
||||
} else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
logout("The max Postion is "+QString::number(550000/4*PositionNumber));
|
||||
ControllerParams cpTest;
|
||||
bool res = Motercontrol.ILMES_InitializeParams(cpTest);
|
||||
|
||||
|
||||
|
||||
|
||||
aa->Settingshuttertime(shuttertime);
|
||||
aa->GetOnePlot(oneplot);
|
||||
|
||||
|
||||
|
||||
|
||||
logout("GO TO ZERO");
|
||||
Motercontrol.StartBackZero();
|
||||
Motercontrol.SetRunSpeed(10000);
|
||||
logout("GO TO ZERO OK");
|
||||
logout("Start Moving to "+QString::number(550000/4*PositionNumber));
|
||||
Motercontrol.MoveTo_NoSyn(550000/4*PositionNumber);
|
||||
aa->GetOnePlot(oneplot);
|
||||
MSInfo temp;
|
||||
Motercontrol.GetStatus(temp);
|
||||
vector<int > point1ist;
|
||||
vector<float> valuelist;
|
||||
int i = 0;
|
||||
Motercontrol.GetStatus(temp);
|
||||
//outfile <<i<<"," << oneplot.Plot[1024] << "," << temp.iPosition << std::endl;
|
||||
|
||||
point1ist.push_back(temp.iPosition);
|
||||
valuelist.push_back(oneplot.Plot[bandsshow]);
|
||||
while (temp.fVelocity!=0)
|
||||
{
|
||||
aa->GetOnePlot(oneplot);
|
||||
//qDebug() << oneplot.BandNum;
|
||||
//std::cout << temp.iPosition << std::endl;
|
||||
|
||||
Motercontrol.GetStatus(temp);
|
||||
i++;
|
||||
outfile << i << "," << oneplot.Plot[bandsshow] << "," << temp.iPosition << std::endl;
|
||||
point1ist.push_back(temp.iPosition);
|
||||
valuelist.push_back(oneplot.Plot[bandsshow]);
|
||||
|
||||
}
|
||||
logout("FINISH Moving");
|
||||
vector<float> valuepinghua1 = PingHua(valuelist, 3);
|
||||
vector<int>loction1=FindFeng(point1ist, valuepinghua1);
|
||||
|
||||
int lenth = loction1.size();
|
||||
if (lenth!=PositionNumber)
|
||||
{
|
||||
logout("<b style=\"color:red\">can not find all position please change the shutter time and try agin<\/b>");
|
||||
}
|
||||
cout1<<"First find "<<lenth<<" point "<<"<br>"<<flush;
|
||||
|
||||
logout("GO TO ZERO");
|
||||
Motercontrol.StartBackZero();
|
||||
logout("GO TO ZERO OK");
|
||||
logout("Start Moving");
|
||||
for (size_t i = 0; i < lenth; i++)
|
||||
{
|
||||
vector<int> location1point = DengJianJu(loction1[i], 5000, 25);
|
||||
vector<float> valuepoint;
|
||||
int lennow = location1point.size();
|
||||
cout1<<"Detail find "<<i<<" point begin"<<"<br>"<<flush;
|
||||
for (size_t ii = 0; ii < lennow; ii++)
|
||||
{
|
||||
|
||||
Motercontrol.MoveTo(location1point[ii]);
|
||||
aa->GetOnePlot(oneplot);
|
||||
valuepoint.push_back(oneplot.Plot[bandsshow]);
|
||||
//outfile << ii << "," << oneplot.Plot[1024] << "," << location1point[ii] << std::endl;
|
||||
|
||||
}
|
||||
vector<float> valuepinghua = PingHua(valuepoint,3);
|
||||
vector<int>loction2 = FindFeng(location1point, valuepinghua);
|
||||
|
||||
if (loction2.size() == 1)
|
||||
{ cout1<<"find "<<i<<"point value is <b color=\'green\'>"<<loction2[0]<<"<\/b><br>"<<flush;
|
||||
outfile1 <<i+1<<"," << loction2[0]<< std::endl;
|
||||
}
|
||||
|
||||
int cc = 10;
|
||||
cc++;
|
||||
|
||||
}
|
||||
logout("FINISH Moving");
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
std::cout<<"totle:" << i;
|
||||
outfile.close();
|
||||
outfile.close();
|
||||
if (!res)
|
||||
{
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
return aaaaa.exec();
|
||||
|
||||
}
|
||||
|
||||
|
||||
vector<int> FindFeng(vector<int > point1ist, vector<float> valuelist)
|
||||
{
|
||||
vector<int> ret;
|
||||
int lenth = point1ist.size();
|
||||
if (lenth<10)
|
||||
{
|
||||
ret.push_back(0);
|
||||
return ret;
|
||||
}
|
||||
for (size_t i = 5; i < lenth-5; i++)
|
||||
{
|
||||
if (valuelist[i] > 5000&&valuelist[i]>valuelist[i-1]&& valuelist[i] > valuelist[i - 4]&& valuelist[i] >valuelist[i + 1]&& valuelist[i] > valuelist[i + 4]
|
||||
&& valuelist[i-1] > 5000 && valuelist[i-4]&& valuelist[i +1] > 5000 && valuelist[i + 4])
|
||||
{
|
||||
if (ret.size()!=0)
|
||||
{
|
||||
if (point1ist[i]-ret[ret.size()-1]<5000)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
ret.push_back(point1ist[i]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
return ret;
|
||||
|
||||
|
||||
|
||||
}
|
||||
vector<int> DengJianJu(int position, int distanc, int times )
|
||||
{
|
||||
int begin = position - distanc;
|
||||
vector<int> ret;
|
||||
int eachstep = distanc / times;
|
||||
for (size_t i = 0; i < 2*times; i++)
|
||||
{
|
||||
ret.push_back(begin + i * eachstep);
|
||||
}
|
||||
return ret;
|
||||
|
||||
}
|
||||
vector <float> PingHua(vector <float> value,int step)
|
||||
{
|
||||
vector <float> ret;
|
||||
if (value.size()<2*step)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
int len = value.size();
|
||||
for (size_t i = 0; i < step; i++)
|
||||
{
|
||||
ret.push_back(value[i]);
|
||||
}
|
||||
for (size_t i = step; i <len-step; i++)
|
||||
{
|
||||
float sumi = 0;
|
||||
for (size_t ii = 0; ii < 2*step+1; ii++)
|
||||
{
|
||||
sumi += value[i - step + ii];
|
||||
}
|
||||
ret.push_back(sumi / (2 * step + 1));
|
||||
}
|
||||
for (size_t i = len - step; i < len; i++)
|
||||
{
|
||||
ret.push_back(value[i]);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
591
othersoft/shuttercali/source/FS/ATPControl_Serial_QT.cpp
Normal file
591
othersoft/shuttercali/source/FS/ATPControl_Serial_QT.cpp
Normal file
@ -0,0 +1,591 @@
|
||||
#include "pch.h"
|
||||
#include "ATPControl_Serial_QT.h"
|
||||
#include "ZZ_Math_HDRONLY.h"
|
||||
|
||||
ZZ_ATPControl_Serial_Qt::ZZ_ATPControl_Serial_Qt()
|
||||
{
|
||||
m_pSerialPort = new QSerialPort;
|
||||
//connect(m_pSerialPort, &QSerialPort::readyRead, this, &ZZ_ATPControl_Serial_Qt::ReadMessage);
|
||||
m_iBaudRate = 115200;
|
||||
}
|
||||
|
||||
ZZ_ATPControl_Serial_Qt::~ZZ_ATPControl_Serial_Qt()
|
||||
{
|
||||
if (m_pSerialPort != NULL)
|
||||
{
|
||||
delete m_pSerialPort;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// int ZZ_ATPControl_Serial_Qt::SetBaudRate(int iBaud)
|
||||
// {
|
||||
// m_iBaudRate = iBaud;
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::Initialize(bool bIsUSBMode, ZZ_U8 ucPortNumber, std::string strDeviceName)
|
||||
{
|
||||
QString qstrPortName = QString("COM%1").arg(ucPortNumber);
|
||||
|
||||
m_pSerialPort->setPortName(qstrPortName);
|
||||
m_pSerialPort->setReadBufferSize(512);
|
||||
bool bRes = m_pSerialPort->setBaudRate(m_iBaudRate);
|
||||
if (!bRes)
|
||||
{
|
||||
qDebug() << "Err:setBaudRate Failed.Exit Code:1";
|
||||
//std::cout << "Err.setBaudRate Failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
bRes = m_pSerialPort->open(QIODevice::ReadWrite);
|
||||
if (!bRes)
|
||||
{
|
||||
qDebug() << "Err:open Failed.Exit Code:2";
|
||||
//std::cout << "Err.open Failed" << std::endl;
|
||||
return 2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ZZ_ATPControl_Serial_Qt::Close()
|
||||
{
|
||||
m_pSerialPort->close();
|
||||
}
|
||||
int ZZ_ATPControl_Serial_Qt::GetDeviceInfo(DeviceInfo &Info)
|
||||
{
|
||||
QByteArray qbSend, qbRecv;
|
||||
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(GET_PN_NUMBER);
|
||||
int iRes = SendCommand(qbSend);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceInfo Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = RecvData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceInfo Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceInfo Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
m_diDeviceInfo.strPN = qbRecv.data();
|
||||
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(GET_SN_NUMBER);
|
||||
iRes = SendCommand(qbSend);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceInfo Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = RecvData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceInfo Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceInfo Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
m_diDeviceInfo.strSN = qbRecv.data();
|
||||
|
||||
|
||||
Info = m_diDeviceInfo;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::GetDeviceAttribute(DeviceAttribute &Attr)
|
||||
{
|
||||
QByteArray qbSend, qbRecv;
|
||||
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(GET_MIN_INTEGRATION_TIME);
|
||||
int iRes = SendCommand(qbSend);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = RecvData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
m_daDeviceAttr.iMinIntegrationTimeInMS = (ZZ_U8)qbRecv[1] + (ZZ_U8)qbRecv[0] * 256;
|
||||
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(GET_MAX_INTEGRATION_TIME);
|
||||
iRes = SendCommand(qbSend);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = RecvData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
m_daDeviceAttr.iMaxIntegrationTimeInMS = (ZZ_U8)qbRecv[1] + (ZZ_U8)qbRecv[0] * 256;
|
||||
|
||||
|
||||
iRes = SetExposureTime(m_daDeviceAttr.iMinIntegrationTimeInMS);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Call SetExposureTime error.Exit Code:2";
|
||||
return 2;
|
||||
}
|
||||
iRes = SingleShot(m_daDeviceAttr.iPixels);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Call SingleShot error.Exit Code:3";
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(GET_WAVELENGTH_CALIBRATION_COEF);
|
||||
qbSend.resize(3);
|
||||
qbSend[1] = 0x00;
|
||||
qbSend[2] = 0x01;
|
||||
iRes = SendCommand(qbSend);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = RecvData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
iRes = ParseData(qbRecv);
|
||||
if (iRes != 0)
|
||||
{
|
||||
qDebug() << "Err:GetDeviceAttribute Failed,Communication error.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
float fWaveLengthCoef[4];
|
||||
memcpy(fWaveLengthCoef, qbRecv.data()+16, 4 * sizeof(float));
|
||||
for (int i=0;i< m_daDeviceAttr.iPixels;i++)
|
||||
{
|
||||
m_daDeviceAttr.fWaveLengthInNM[i] = fWaveLengthCoef[0] * i*i*i + fWaveLengthCoef[1] * i*i + fWaveLengthCoef[2] * i + fWaveLengthCoef[3];
|
||||
}
|
||||
|
||||
Attr = m_daDeviceAttr;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::SetDeviceTemperature(float fTemperature)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::SendCommand(QByteArray qbCommand)
|
||||
{
|
||||
int iSize = qbCommand.size() + 3;
|
||||
QByteArray qbSend;
|
||||
qbSend.resize(4);
|
||||
qbSend[0] = (ZZ_U8)0xAA;
|
||||
qbSend[1] = 0x55;
|
||||
qbSend[2] = iSize / 256;
|
||||
qbSend[3] = iSize % 256;
|
||||
qbSend.append(qbCommand);
|
||||
|
||||
int iSum = 0;
|
||||
for (int i = 0; i < iSize - 1; i++)
|
||||
{
|
||||
iSum = iSum + qbSend[i + 2];
|
||||
}
|
||||
|
||||
qbSend.append(iSum % 256);
|
||||
|
||||
qint64 qi64Write= m_pSerialPort->write(qbSend);
|
||||
if (qi64Write != qbSend.size())
|
||||
{
|
||||
qDebug() << "Err:write Failed.Exit Code:1"<< qi64Write;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::RecvData(QByteArray &qbData)
|
||||
{
|
||||
qbData.clear();
|
||||
qbData = m_pSerialPort->readAll();
|
||||
|
||||
int iCounter = 0;
|
||||
while (qbData.size() < 4)
|
||||
{
|
||||
m_pSerialPort->waitForReadyRead(50);
|
||||
QByteArray qbTemp = m_pSerialPort->readAll();
|
||||
qbData.append(qbTemp);
|
||||
|
||||
if (iCounter > 10)
|
||||
{
|
||||
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(50);
|
||||
qbData.append(m_pSerialPort->readAll());
|
||||
|
||||
if (iCounter > 100)
|
||||
{
|
||||
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" << qbData.size();
|
||||
qbData.clear();
|
||||
return 4;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::ParseData(QByteArray &qbData)
|
||||
{
|
||||
if (qbData.size() < 6)
|
||||
{
|
||||
qDebug() << "Err:ParseData Failed,Not Enough Data.Exit Code:1" << qbData.size();
|
||||
return 1;
|
||||
}
|
||||
qbData.remove(0, 5);
|
||||
qbData.remove(qbData.size() - 1, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
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.usData, m_daDeviceAttr.iPixels);
|
||||
|
||||
double dSum = 0;
|
||||
int iCount = m_daDeviceAttr.iPixels / 100;
|
||||
for (int i = 0; i < iCount; i++)
|
||||
{
|
||||
dSum += dfTemp.usData[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 ZZ_ATPControl_Serial_Qt::SetExtShutter(int iShutterUP0, int iShutterDOWN1, int iShutterDOWN2, int iShutterDOWN3)
|
||||
// {
|
||||
// qDebug() << "stub code not implemented";
|
||||
// return -1;
|
||||
// }
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::SetExposureTime(int iExposureTimeInMS)
|
||||
{
|
||||
QByteArray qbExposureTime,qbRecv;
|
||||
qbExposureTime.append(SET_INTEGRATION_TIME);
|
||||
qbExposureTime.resize(3);
|
||||
qbExposureTime[1] = iExposureTimeInMS >> 8;
|
||||
qbExposureTime[2] = iExposureTimeInMS & 0xFF;
|
||||
|
||||
SendCommand(qbExposureTime);
|
||||
RecvData(qbRecv);
|
||||
ParseData(qbRecv);
|
||||
|
||||
if ((ZZ_U8)qbRecv[0] != 0)
|
||||
{
|
||||
qDebug() << "Err:SetExposureTime Failed.Exit Code:1" ;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::GetExposureTime(int &iExposureTimeInMS)
|
||||
{
|
||||
QByteArray qbSend, qbRecv;
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(GET_INTEGRATION_TIME);
|
||||
qbSend.resize(3);
|
||||
qbSend[1] = 0x00;
|
||||
qbSend[2] = 0x01;
|
||||
SendCommand(qbSend);
|
||||
RecvData(qbRecv);
|
||||
ParseData(qbRecv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::SingleShot(DataFrame &dfData)
|
||||
{
|
||||
QByteArray qbSend, qbRecv;
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(SYNC_GET_DATA);
|
||||
qbSend.resize(3);
|
||||
qbSend[1] = 0x00;
|
||||
qbSend[2] = 0x01;
|
||||
SendCommand(qbSend);
|
||||
RecvData(qbRecv);
|
||||
ParseData(qbRecv);
|
||||
|
||||
if ((ZZ_U8)qbRecv[0] != 0)
|
||||
{
|
||||
qDebug() << "Err:SingleShot Failed.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
int iDataSizeInPixel = (qbRecv.size() - 1) / 2;
|
||||
memcpy(dfData.usData, qbRecv.data() + 1, iDataSizeInPixel * 2);
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::SingleShot(int &iPixels)
|
||||
{
|
||||
QByteArray qbSend, qbRecv;
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(SYNC_GET_DATA);
|
||||
qbSend.resize(3);
|
||||
qbSend[1] = 0x00;
|
||||
qbSend[2] = 0x01;
|
||||
SendCommand(qbSend);
|
||||
RecvData(qbRecv);
|
||||
ParseData(qbRecv);
|
||||
|
||||
if ((ZZ_U8)qbRecv[0] != 0)
|
||||
{
|
||||
qDebug() << "Err:SingleShot Failed.Exit Code:1";
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
iPixels = (qbRecv.size() - 1) / 2;
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// int ZZ_ATPControl_Serial_Qt::SingleShotDark(ATPDataFrame &dfData)
|
||||
// {
|
||||
// SetExtShutter(0,0,0,0);
|
||||
// SingleShot(dfData);
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
int ZZ_ATPControl_Serial_Qt::GetDeviceTemperature(float &fTemperature)
|
||||
{
|
||||
QByteArray qbSend, qbRecv;
|
||||
qbSend.clear();
|
||||
qbRecv.clear();
|
||||
qbSend.append(GET_TEC_TEMP);
|
||||
qbSend.resize(3);
|
||||
qbSend[1] = 0x00;
|
||||
qbSend[2] = 0x01;
|
||||
SendCommand(qbSend);
|
||||
RecvData(qbRecv);
|
||||
ParseData(qbRecv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//void ZZ_ATPControl_Serial_Qt::ReadMessage()
|
||||
//{
|
||||
// QByteArray qbTemp, qbTemp1;
|
||||
// qbTemp = m_pSerialPort->readAll();
|
||||
// while (qbTemp.size()<2)
|
||||
// {
|
||||
// m_pSerialPort->waitForReadyRead(50);
|
||||
// qbTemp1 = m_pSerialPort->readAll();
|
||||
// qbTemp.append(qbTemp1);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
//return;
|
||||
// }
|
||||
84
othersoft/shuttercali/source/FS/ATPControl_Serial_QT.h
Normal file
84
othersoft/shuttercali/source/FS/ATPControl_Serial_QT.h
Normal file
@ -0,0 +1,84 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//ATP<54><50><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
#include "pch.h"
|
||||
#include "ZZ_Types.h"
|
||||
#include "IrisFiberSpectrometerBase.h"
|
||||
|
||||
using namespace ZZ_MISCDEF;
|
||||
using namespace ZZ_MISCDEF::ATP;
|
||||
using namespace ZZ_MISCDEF::IRIS::FS;
|
||||
|
||||
class ZZ_ATPControl_Serial_Qt:public CIrisFSBase
|
||||
{
|
||||
//Q_OBJECT
|
||||
public:
|
||||
ZZ_ATPControl_Serial_Qt();
|
||||
virtual ~ZZ_ATPControl_Serial_Qt();
|
||||
|
||||
public:
|
||||
//<2F><><EFBFBD>ò<EFBFBD><C3B2><EFBFBD><EFBFBD><EFBFBD>
|
||||
//int SetBaudRate(int iBaud);
|
||||
//<2F><>ʼ<EFBFBD><CABC><EFBFBD>豸
|
||||
int Initialize(bool bIsUSBMode, ZZ_U8 ucPortNumber, std::string strDeviceName);
|
||||
//<2F>ر<EFBFBD><D8B1>豸
|
||||
void Close();
|
||||
|
||||
//<2F><><EFBFBD>β<EFBFBD><CEB2>Բɼ<D4B2> <20><><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int SingleShot(int &iPixels);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲɼ<DDB2>
|
||||
int SingleShot(DataFrame &dfData);
|
||||
|
||||
//<2F><><EFBFBD>ΰ<EFBFBD><CEB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɼ<EFBFBD>
|
||||
//int SingleShotDark(ATPDataFrame &dfData);
|
||||
|
||||
//int SingleShotDeducted(ATPDataFrame &dfData);
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ع<EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
int SetExposureTime(int iExposureTimeInMS);
|
||||
|
||||
//<2F><>ȡ<EFBFBD>ع<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int GetExposureTime(int &iExposureTimeInMS);
|
||||
|
||||
//int GetWaveLength(float *pfWaveLength);
|
||||
|
||||
//<2F><>ȡ<EFBFBD>豸<EFBFBD><E8B1B8>Ϣ
|
||||
int GetDeviceInfo(DeviceInfo &Info);
|
||||
|
||||
//<2F><>ȡ<EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int GetDeviceAttribute(DeviceAttribute &Attr);
|
||||
|
||||
//int GetDeviceListInfo(); //use type name to enum
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>
|
||||
int SetDeviceTemperature(float fTemperature);
|
||||
|
||||
//<2F><>ȡ<EFBFBD>¶<EFBFBD>
|
||||
int GetDeviceTemperature(float &fTemperature);
|
||||
|
||||
//<2F>Զ<EFBFBD><D4B6>ع<EFBFBD>
|
||||
int PerformAutoExposure(float fMinScaleFactor, float fMaxScaleFactor, float &fPredictedExposureTime);
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
#else //
|
||||
private:
|
||||
#endif
|
||||
//port
|
||||
int m_iBaudRate;
|
||||
QSerialPort *m_pSerialPort;
|
||||
|
||||
//ATP
|
||||
DeviceInfo m_diDeviceInfo;
|
||||
DeviceAttribute m_daDeviceAttr;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////shutter control stub code s
|
||||
//int SetExtShutter(int iShutterUP0, int iShutterDOWN1,int iShutterDOWN2,int iShutterDOWN3); //0:close 1:open
|
||||
//////////////////////////////////////////////////////////////////////////shutter control stub code e
|
||||
int SendCommand(QByteArray qbCommand);
|
||||
int RecvData(QByteArray &qbData);
|
||||
int ParseData(QByteArray &qbData);
|
||||
//private slots :
|
||||
//void ReadMessage();
|
||||
};
|
||||
1
othersoft/shuttercali/source/FS/ATPDataFileProcessor.h
Normal file
1
othersoft/shuttercali/source/FS/ATPDataFileProcessor.h
Normal file
@ -0,0 +1 @@
|
||||
#pragma once
|
||||
42
othersoft/shuttercali/source/FS/IrisFiberSpectrometerBase.h
Normal file
42
othersoft/shuttercali/source/FS/IrisFiberSpectrometerBase.h
Normal file
@ -0,0 +1,42 @@
|
||||
#include <string>
|
||||
#include "ZZ_Types.h"
|
||||
#pragma once
|
||||
using namespace ZZ_MISCDEF;
|
||||
using namespace ZZ_MISCDEF::IRIS::FS;
|
||||
|
||||
class CIrisFSBase
|
||||
{
|
||||
public:
|
||||
//CIrisFSBase();
|
||||
//virtual ~CIrisFSBase()= 0;
|
||||
public:
|
||||
//<2F><>ʼ<EFBFBD><CABC><EFBFBD>豸
|
||||
//<2F>˴<EFBFBD>stringΪָ<CEAA><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĸ<EFBFBD>ocean<61><6E><EFBFBD><EFBFBD><EFBFBD>ǵIJ<C7B5><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>и<EFBFBD><D0B8><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>c/c++<2B><><EFBFBD><D7BC><EFBFBD><EFBFBD>
|
||||
//0Ϊ<30><EFBFBD><DEB4><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD>뷵<EFBFBD>ز<EFBFBD>ֵͬ
|
||||
virtual int Initialize(bool bIsUSBMode,ZZ_U8 ucPortNumber,std::string strDeviceName) = 0;
|
||||
|
||||
//<2F>ر<EFBFBD><D8B1>豸
|
||||
virtual void Close() = 0;
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲɼ<DDB2>
|
||||
virtual int SingleShot(DataFrame &dfData) = 0;
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ع<EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
virtual int SetExposureTime(int iExposureTimeInMS) = 0;
|
||||
|
||||
//<2F><>ȡ<EFBFBD>ع<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
virtual int GetExposureTime(int &iExposureTimeInMS) = 0;
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD>¶<EFBFBD>
|
||||
virtual int SetDeviceTemperature(float fTemperature) = 0;
|
||||
|
||||
//<2F><>ȡ<EFBFBD>¶<EFBFBD><C2B6><EFBFBD><EFBFBD><EFBFBD>
|
||||
virtual int GetDeviceTemperature(float &fTemperature) = 0;
|
||||
|
||||
//<2F><>ȡ<EFBFBD>豸<EFBFBD><E8B1B8>Ϣ
|
||||
virtual int GetDeviceInfo(DeviceInfo &Info) = 0;
|
||||
|
||||
//<2F><>ȡ<EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
virtual int GetDeviceAttribute(DeviceAttribute &Attr) = 0;
|
||||
|
||||
};
|
||||
297
othersoft/shuttercali/source/FS/ZZ_Types.h
Normal file
297
othersoft/shuttercali/source/FS/ZZ_Types.h
Normal file
@ -0,0 +1,297 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//<2F><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>ļ<EFBFBD>
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
#include "pch.h"
|
||||
#include <string>
|
||||
#define MAX_DEVICENUMBER_FS 2
|
||||
#define MAX_LINEARSHUTTER_POSITION 12
|
||||
namespace ZZ_MISCDEF
|
||||
{
|
||||
typedef unsigned char ZZ_U8;
|
||||
typedef unsigned short int ZZ_U16;
|
||||
typedef unsigned long int ZZ_U32;
|
||||
|
||||
|
||||
namespace IRIS
|
||||
{
|
||||
//Fiber Spectrometer
|
||||
namespace FS
|
||||
{
|
||||
typedef struct tagDataFrame
|
||||
{
|
||||
ZZ_U16 usExposureTimeInMS;
|
||||
ZZ_U16 usData[4096];
|
||||
float fTemperature;
|
||||
double dTimes = 0;
|
||||
}DataFrame;
|
||||
|
||||
typedef struct tagDeviceInfo
|
||||
{
|
||||
std::string strPN;
|
||||
std::string strSN;
|
||||
}DeviceInfo;
|
||||
|
||||
typedef struct tagDeviceAttribute
|
||||
{
|
||||
int iPixels;
|
||||
int iMaxIntegrationTimeInMS;
|
||||
int iMinIntegrationTimeInMS;
|
||||
float fWaveLengthInNM[4096];
|
||||
|
||||
}DeviceAttribute;
|
||||
}
|
||||
|
||||
enum DeviceModel
|
||||
{
|
||||
OSIFAlpha=0,
|
||||
OSIFBeta,
|
||||
ISIF,
|
||||
IS1,
|
||||
IS2
|
||||
};
|
||||
|
||||
// inline std::string GetDeviceModelName(int iModel)
|
||||
// {
|
||||
// switch (iModel)
|
||||
// {
|
||||
// case DeviceModel::OSIFAlpha: return "OSIFAlpha"; break;
|
||||
// case DeviceModel::OSIFBeta: return "OSIFBeta"; break;
|
||||
// case DeviceModel::ISIF: return "ISIF"; break;
|
||||
// case DeviceModel::IS1: return "IS1"; break;
|
||||
// case DeviceModel::IS2: return "IS2"; break;
|
||||
// default: return "error"; break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// inline int GetIndex(std::string strDeviceModelName)
|
||||
// {
|
||||
// if (strDeviceModelName== "OSIFAlpha")
|
||||
// {
|
||||
// return DeviceModel::OSIFAlpha;
|
||||
// }
|
||||
// else if (strDeviceModelName == "OSIFBeta")
|
||||
// {
|
||||
// return DeviceModel::OSIFBeta;
|
||||
// }
|
||||
// else if (strDeviceModelName == "ISIF")
|
||||
// {
|
||||
// return DeviceModel::ISIF;
|
||||
// }
|
||||
// else if (strDeviceModelName == "IS1")
|
||||
// {
|
||||
// return DeviceModel::IS1;
|
||||
// }
|
||||
// else if(strDeviceModelName == "IS2")
|
||||
// {
|
||||
// return DeviceModel::IS2;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return -1;
|
||||
// }
|
||||
// }
|
||||
|
||||
};
|
||||
|
||||
//ATPָ<50><D6B8>ת<EFBFBD><D7AA>
|
||||
namespace ATP
|
||||
{
|
||||
const int MAX_SPECTRUM_SIZE = 4096;
|
||||
|
||||
const int GET_MODULECIRCUIT_TEMP = 0x01;
|
||||
const int GET_PN_NUMBER = 0x03;
|
||||
const int GET_SN_NUMBER = 0x04;
|
||||
const int GET_MANUFACTURE_DATA = 0x06;
|
||||
const int GET_MANUFACTURE_INFO = 0x09;
|
||||
const int GET_PIXEL_LENGTH = 0x0a;
|
||||
const int GET_TEC_TEMP = 0x13;
|
||||
const int SET_TEC_TEMP = 0x12;
|
||||
const int GET_OPTICS_TEMP = 0x35;
|
||||
const int GET_CIRCUITBOARD_TEMP = 0x36;
|
||||
const int SET_INTEGRATION_TIME = 0x14;
|
||||
const int GET_INTEGRATION_TIME = 0x41;
|
||||
const int GET_MAX_INTEGRATION_TIME = 0x42;
|
||||
const int GET_MIN_INTEGRATION_TIME = 0x43;
|
||||
const int ASYNC_COLLECT_DARK = 0x23;
|
||||
const int ASYNC_START_COLLECTION = 0x16;
|
||||
const int ASYNC_READ_DATA = 0x17;
|
||||
const int SET_AVERAGE_NUMBER = 0x28;
|
||||
const int SYNC_GET_DATA = 0x1e;
|
||||
const int SYNC_GET_DARK = 0x2f;
|
||||
const int EXTERNAL_TRIGGER_ENABLE = 0x1f;
|
||||
const int SET_XENON_LAMP_DELAY_TIME = 0x24;
|
||||
const int GET_WAVELENGTH_CALIBRATION_COEF = 0x55;
|
||||
const int GET_STAT_LAMPOUT = 0x60;
|
||||
const int SET_GPIO = 0x61;
|
||||
//const int SYNCHRONIZATION_GET_DARK = 0x23
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////device
|
||||
enum Model
|
||||
{
|
||||
ATP1010 = 0,
|
||||
ATP6500
|
||||
};
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>֡<EFBFBD><D6A1><EFBFBD><EFBFBD>
|
||||
typedef struct tagATPDataFrame
|
||||
{
|
||||
unsigned short usExposureTime;
|
||||
ZZ_U16 usData[4096];
|
||||
float fTemperature;
|
||||
double dTimes = 0;
|
||||
}ATPDataFrame;
|
||||
|
||||
//<2F>豸<EFBFBD><E8B1B8>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
||||
typedef struct tagATPDeviceInfo
|
||||
{
|
||||
std::string strPN;
|
||||
std::string strSN;
|
||||
}ATPDeviceInfo;
|
||||
|
||||
//<2F>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
typedef struct tagATPDeviceAttribute
|
||||
{
|
||||
int iPixels;
|
||||
int iMaxIntegrationTime;
|
||||
int iMinIntegrationTime;
|
||||
float fWaveLength[4096];
|
||||
|
||||
}ATPDeviceAttribute;
|
||||
//////////////////////////////////////////////////////////////////////////config file
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD>в<EFBFBD><D0B2><EFBFBD>
|
||||
namespace ZZ_RUNPARAMS
|
||||
{
|
||||
typedef struct tagFiberSpecContext
|
||||
{
|
||||
ZZ_U8 ucDeviceNumber;
|
||||
ZZ_U8 ucDeviceModel[MAX_DEVICENUMBER_FS];
|
||||
int iInterface[MAX_DEVICENUMBER_FS];
|
||||
std::string strSN[MAX_DEVICENUMBER_FS];
|
||||
}FSContext;
|
||||
|
||||
typedef struct tagLinearShutterContext
|
||||
{
|
||||
ZZ_U8 ucPort;
|
||||
ZZ_U8 ucProtocolType;
|
||||
ZZ_U16 usCmdID;
|
||||
}LSContext;
|
||||
|
||||
typedef struct tagAcquisitionTimeSettings
|
||||
{
|
||||
QTime qtStartTime;
|
||||
QTime qtStopTime;
|
||||
QTime qtInterval;
|
||||
}AcqTimeSettings;
|
||||
|
||||
typedef struct tagAcquisitionPositionSettings
|
||||
{
|
||||
int iTotalPosition;
|
||||
int iPosition[MAX_LINEARSHUTTER_POSITION];
|
||||
}AcqPosSettings;
|
||||
|
||||
typedef struct tagRunTimeGrabberParams
|
||||
{
|
||||
LSContext lscParam;
|
||||
FSContext fscParams;
|
||||
AcqTimeSettings atsParams;
|
||||
AcqPosSettings apsParams;
|
||||
}RunTimeGrabberParams;
|
||||
|
||||
typedef struct tagATPCalibrationSettings
|
||||
{
|
||||
//Up0 Down1,2,3
|
||||
QString qsISIF_CalibrationFilePath[4];
|
||||
QString qsIS1_CalibrationFilePath[4];
|
||||
}ATPCalibrationSettings;
|
||||
}
|
||||
|
||||
//ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC>ṹ
|
||||
namespace ZZ_DATAFILE
|
||||
{
|
||||
typedef struct tagEnvironmentalContext
|
||||
{
|
||||
QString qstrUTCDateTime;
|
||||
QString qstrLocation;
|
||||
QString qstrGPS_Longtitude;
|
||||
QString qstrGPS_Latitude;
|
||||
QString qstrGPS_Altitude;
|
||||
QString qstrGPS_North;
|
||||
QString qstrCaseTemperature;
|
||||
QString qstrCaseHumidity;
|
||||
|
||||
}EContext;
|
||||
|
||||
typedef struct tagManmadeEnviromentalContext
|
||||
{
|
||||
QString qstrOriFileName;
|
||||
QString qstrInstallationTime;
|
||||
QString qstrISIFCalibrationTime;
|
||||
QString qstrIS1CalibrationTime;
|
||||
QString qstrNameOfMaintenanceStaff;
|
||||
QString qstrPhoneNumberOfMaintenanceStaff;
|
||||
QString qstrDownloadUserID;
|
||||
QString qstrDownlaodAddress;
|
||||
QString qstrHTTPServer;
|
||||
}MEContext;
|
||||
|
||||
|
||||
typedef struct tagIS1Information
|
||||
{
|
||||
QString qstrSN_ATP;
|
||||
QString qstrSN_IRIS;
|
||||
|
||||
QString qstrCalFile_U0;
|
||||
QString qstrCalFile_D1;
|
||||
QString qstrCalFile_D2;
|
||||
QString qstrCalFile_D3;
|
||||
|
||||
int iPixelCount;
|
||||
|
||||
int iExposureTimeInMS_U0;
|
||||
int iExposureTimeInMS_D1;
|
||||
int iExposureTimeInMS_D2;
|
||||
int iExposureTimeInMS_D3;
|
||||
|
||||
float fTemperature_U0;
|
||||
float fTemperature_D1;
|
||||
float fTemperature_D2;
|
||||
float fTemperature_D3;
|
||||
}IS1Info;
|
||||
|
||||
typedef struct tagISIFInformation
|
||||
{
|
||||
QString qstrSN_ATP;
|
||||
QString qstrSN_IRIS;
|
||||
|
||||
QString qstrCalFile_U0;
|
||||
QString qstrCalFile_D1;
|
||||
QString qstrCalFile_D2;
|
||||
QString qstrCalFile_D3;
|
||||
|
||||
int iPixelCount;
|
||||
|
||||
int iExposureTimeInMS_U0;
|
||||
int iExposureTimeInMS_D1;
|
||||
int iExposureTimeInMS_D2;
|
||||
int iExposureTimeInMS_D3;
|
||||
|
||||
float fTemperature_U0;
|
||||
float fTemperature_D1;
|
||||
float fTemperature_D2;
|
||||
float fTemperature_D3;
|
||||
}ISIFInfo;
|
||||
|
||||
typedef struct tagATPDataHeader
|
||||
{
|
||||
|
||||
|
||||
}ATPDataHeader;
|
||||
}
|
||||
|
||||
};
|
||||
16
othersoft/shuttercali/source/LinearShutter/AbstractPort.h
Normal file
16
othersoft/shuttercali/source/LinearShutter/AbstractPort.h
Normal file
@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
#include "VSMD12XMiscDefines.h"
|
||||
#include <string>
|
||||
class CAbstractPort
|
||||
{
|
||||
public:
|
||||
virtual void InitPort(PortInfo portinfo) = 0;
|
||||
virtual bool SetPort() = 0;
|
||||
virtual bool Open() = 0;
|
||||
virtual void Close() = 0;
|
||||
|
||||
virtual std::string ReadAll(int waite=5000) = 0;
|
||||
virtual int Write(const std::string strSend) = 0;
|
||||
|
||||
};
|
||||
|
||||
1458
othersoft/shuttercali/source/LinearShutter/VSMD12XControl.cpp
Normal file
1458
othersoft/shuttercali/source/LinearShutter/VSMD12XControl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user