- Fixed a bug fix with Fixed motor in TAS code

- Made AMOR write HDF-5 data in chunks
- Added  driver for a PSI-DSP magnet controller as used at SLS
- Added code for directly accessing RS232 controllers connected to a
  terminal server, thereby bypassing the SerPortServer
- A rounding problem in the PSD histogram memory was resolved.
This commit is contained in:
cvs
2001-10-25 13:57:59 +00:00
parent 22688ac0fc
commit 3c916c9a7d
32 changed files with 2247 additions and 758 deletions

View File

@@ -733,7 +733,7 @@
uchar ui1[4];
} lwl_hdr, xData, yData, edData;
int xPos, yPos, iTime, dataPos, edNum;
int xPos, yPos, iTime, dataPos, edNum, xOff, yOff;
signed int sPosx, sPosy;
int i, j, is, ts, left, right, middl, not_finished;
uint *edge_pntr;
@@ -743,6 +743,13 @@
usint *histsPtr = (usint *)Hist_base_addr;
uchar *histcPtr = (uchar *)Hist_base_addr;
/*
precalculate some offsets
*/
xOff = psdXOffset*psdXFactor;
yOff = psdYOffset*psdYFactor;
/*-----------------------------------------------
** Make register copies of some items for speed.
*/
@@ -803,14 +810,28 @@
*/
xPos = xData.ui2[1];
if(xPos > 32767)
xPos -= 65536 + psdXFactor;
xPos -= 65536;
yPos = yData.ui2[1];
if(yPos > 32767)
yPos -= 65536 + psdYFactor;
yPos -= 65536;
/*
if(xPos > 0)
xPos =(int)((float)xPos/(float)psdXFactor +.5 + psdXOffset);
else
xPos =(int)((float)xPos/(float)psdXFactor -.49999 + psdXOffset);
if(yPos > 0)
yPos =(int)((float)yPos/(float)psdYFactor +.5 + psdYOffset);
else
yPos =(int)((float)yPos/(float)psdYFactor -.49999 + psdYOffset);
*/
xPos = (int) ( (float)(xPos+xOff)/(float)psdXFactor);
yPos = (int)( (float)(yPos+yOff)/(float)psdYFactor);
xPos = xPos/psdXFactor + psdXOffset;
yPos = yPos/psdYFactor + psdYOffset;
if(xPos < 0 || xPos > psdXSize)
{
printf("X position out of range: %d, alllowed 0 - %d\n",