修复连续采集时没有时间间隔导致通讯失败从而导致无有法正常连续采集的问题 修改如下

This commit is contained in:
xin
2025-03-31 13:53:01 +08:00
parent 62a5415e97
commit 8820b28ab8
206 changed files with 19735 additions and 572 deletions

View File

@ -25,12 +25,12 @@ int IS3SensorInit()
return 1;
}
void Set_Serial_FUN(SERIALWRITE writefunc,SERIALWRITE readfunc)
void IS3Set_Serial_FUN(SERIALWRITE writefunc,SERIALWRITE readfunc)
{
InitFunction(writefunc,readfunc);
}
STRsensorinfo_C Get_SensorInfo() {
STRsensorinfo_C IS3Get_SensorInfo() {
STRSensorInfo sensorinfo= thissensorIS3->SensorInfo;
STRsensorinfo_C sensorinfo_c;
//把sensorname 拷贝到sensorinfo_c
@ -55,6 +55,20 @@ int IS3OptSnenser(int percent) {
int IS3GetData(uint16_t *outdata, int shuttertime) {
thissensorIS3->GetOneDate(shuttertime);
memcpy(outdata,thissensorIS3->DATABUFF, sizeof(int16_t)*thissensorIS3->SensorInfo.BandNum);
float averageofdrift=(thissensorIS3->DATABUFF[thissensorIS3->SensorInfo.BandNum-1]+thissensorIS3->DATABUFF[thissensorIS3->SensorInfo.BandNum-0]+thissensorIS3->DATABUFF[thissensorIS3->SensorInfo.BandNum+1])/3;
// for(int i=0;i<thissensorIS3->SensorInfo.BandNum;i++)
// {
// outdata[i]-=averageofdrift;
// if (outdata[i]<0)
// outdata[i]=0;
// }
return thissensorIS3->SensorInfo.BandNum;
}
int IS3SetWeaveLenthCoeff(double *a,int lenth) {
// printf("IS3SetWeaveLenthCoeff\n");
// printf("lenth=%d\n",lenth);
// printf("a[0]=%f\n",a[0]);
thissensorIS3->SetWeaveLenthCoeff(a,lenth);
return 1;
}