Attempt to remove incorrect submodule myis11/src/third (path not found by rm)
This commit is contained in:
60
myis11/src/IRIS_IS3/IS3_INST.cpp
Normal file
60
myis11/src/IRIS_IS3/IS3_INST.cpp
Normal file
@ -0,0 +1,60 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file : IS11_INST.cpp
|
||||
* @author : xin
|
||||
* @brief : None
|
||||
* @attention : None
|
||||
* @date : 2024/8/14
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
//
|
||||
// Created by xin on 2024/8/14.
|
||||
//
|
||||
#include "SensorIS3.h"
|
||||
#include "IS3_INST.h"
|
||||
#include "iostream"
|
||||
#include "cstring"
|
||||
|
||||
SensorIS3 *thissensorIS3;
|
||||
int IS3SensorInit()
|
||||
{
|
||||
std::cout<< "IS3SensorInit" << std::endl;
|
||||
thissensorIS3 = new SensorIS3();
|
||||
thissensorIS3->initSensor(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void Set_Serial_FUN(SERIALWRITE writefunc,SERIALWRITE readfunc)
|
||||
{
|
||||
InitFunction(writefunc,readfunc);
|
||||
}
|
||||
|
||||
STRsensorinfo_C Get_SensorInfo() {
|
||||
STRSensorInfo sensorinfo= thissensorIS3->SensorInfo;
|
||||
STRsensorinfo_C sensorinfo_c;
|
||||
//把sensorname 拷贝到sensorinfo_c
|
||||
strcpy_s(sensorinfo_c.SensorName,sensorinfo.SensorName.c_str());
|
||||
sensorinfo_c.BandNum = sensorinfo.BandNum;
|
||||
sensorinfo_c.maxValue = sensorinfo.maxValue;
|
||||
strcpy_s(sensorinfo_c.serialnumber,sensorinfo.serialnumber.c_str());
|
||||
sensorinfo_c.a1 = sensorinfo.a1;
|
||||
sensorinfo_c.a2 = sensorinfo.a2;
|
||||
sensorinfo_c.a3 = sensorinfo.a3;
|
||||
sensorinfo_c.a4 = sensorinfo.a4;
|
||||
sensorinfo_c.issensorinit= sensorinfo.isSensorInit;
|
||||
return sensorinfo_c;
|
||||
|
||||
|
||||
}
|
||||
|
||||
int IS3OptSnenser(int percent) {
|
||||
return thissensorIS3->OptSnenser(percent);
|
||||
}
|
||||
|
||||
int IS3GetData(uint16_t *outdata, int shuttertime) {
|
||||
thissensorIS3->GetOneDate(shuttertime);
|
||||
memcpy(outdata,thissensorIS3->DATABUFF, sizeof(int16_t)*thissensorIS3->SensorInfo.BandNum);
|
||||
return thissensorIS3->SensorInfo.BandNum;
|
||||
|
||||
}
|
Reference in New Issue
Block a user