mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-19 11:49:42 +08:00
(1)将atp光谱仪的控制类更新到卓哥最新版,解决连接atp的问题;
(2)将读取OceanOptics的非线性校正文件 集成到定标程序中;
This commit is contained in:
@ -516,6 +516,77 @@ const char* OceanOptics_lib::get_error_string(int error)
|
||||
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];
|
||||
|
Reference in New Issue
Block a user