- Reworked the connection object and the IO system
- Reworked the support for TRICS - Added a second generation motor
This commit is contained in:
10
maximize.c
10
maximize.c
@ -50,7 +50,7 @@
|
||||
#include "motor.h"
|
||||
|
||||
#define MAXPTS 100
|
||||
#define DEBUG 1
|
||||
#define DEBUG 0
|
||||
|
||||
typedef struct __MAXIMIZE {
|
||||
pObjectDescriptor pDes;
|
||||
@ -382,8 +382,14 @@
|
||||
fCent = x[i] +(fDisc -y[i])/fS;
|
||||
}
|
||||
/* finished ! */
|
||||
for(i = 0; i < iTop-1; i++){
|
||||
if(fCent >= x[i] && fCent < x[i+1] ){
|
||||
lCts = y[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
maxDrive(pVar,pVarName,fCent,pCon);
|
||||
sprintf(pBueffel,"Found peak center at %8.2f", fCent);
|
||||
sprintf(pBueffel,"Found peak center at %8.2f, Count = %ld", fCent, lCts);
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user