- Changes to SLS magnet controller
- Added nxscript putsicsdata to nxscript
This commit is contained in:
10
hmdata.c
10
hmdata.c
@ -320,6 +320,9 @@ static long SumRow(HistInt *iData, int iDataLength, int iStart, int iEnd){
|
||||
for(i = iStart; i < iEnd; i++){
|
||||
lSum += iData[i];
|
||||
}
|
||||
if(lSum < 0){
|
||||
lSum = -lSum;
|
||||
}
|
||||
return lSum;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
@ -329,7 +332,7 @@ long sumHMDataRectangle(pHistMem hist, SConnection *pCon,
|
||||
pHMdata self = hist->pDriv->data;
|
||||
int i, iHistLength, status, iIndex;
|
||||
char pBueffel[256];
|
||||
long lSum;
|
||||
unsigned long lSum;
|
||||
|
||||
assert(self);
|
||||
|
||||
@ -386,8 +389,11 @@ long sumHMDataRectangle(pHistMem hist, SConnection *pCon,
|
||||
"ERROR: summing in %d dimensions not yet implemented",
|
||||
self->rank);
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
lSum = -1;
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
if(lSum < 0){
|
||||
lSum = -lSum;
|
||||
}
|
||||
return lSum;
|
||||
}
|
||||
|
Reference in New Issue
Block a user