jungfrau server bug fix: setting detector position gave error when switching between different sized detector configurations

This commit is contained in:
2019-04-08 18:05:05 +02:00
parent 06a50520c1
commit 4be0b5d436
2 changed files with 10 additions and 0 deletions

View File

@ -18,6 +18,7 @@ This document describes the differences between 4.0.2 and 4.0.1 releases.
====================
- Jungfrau receiver as root user
- Jungfrau server detector position error when switching between different detector sizes
@ -33,6 +34,12 @@ This document describes the differences between 4.0.2 and 4.0.1 releases.
sls_detector_put rx_udpsocksize 1048576000
This has been fixed now to allow a greater size (including the default size).
Detector Server (Jungfrau)
--------------------------
1. Switching between different detector size configurations, the detector gave an
error "Could not set detector position". This is fixed now.
3. Known Issues
===============

View File

@ -1313,14 +1313,17 @@ int configureMAC(uint32_t destip, uint64_t destmac, uint64_t sourcemac, uint32_t
int setDetectorPosition(int pos[]) {
int ret = OK;
bus_w(COORD_0_REG, bus_r(COORD_0_REG) & (~COORD_0_X_MSK));
bus_w(COORD_0_REG, bus_r(COORD_0_REG) | ((pos[0] << COORD_0_X_OFST) & COORD_0_X_MSK));
if ((bus_r(COORD_0_REG) & COORD_0_X_MSK) != ((pos[0] << COORD_0_X_OFST) & COORD_0_X_MSK))
ret = FAIL;
bus_w(COORD_0_REG, bus_r(COORD_0_REG) & (~COORD_0_Y_MSK));
bus_w(COORD_0_REG, bus_r(COORD_0_REG) | ((pos[1] << COORD_0_Y_OFST) & COORD_0_Y_MSK));
if ((bus_r(COORD_0_REG) & COORD_0_Y_MSK) != ((pos[1] << COORD_0_Y_OFST) & COORD_0_Y_MSK))
ret = FAIL;
bus_w(COORD_1_REG, bus_r(COORD_1_REG) & (~COORD_0_Z_MSK));
bus_w(COORD_1_REG, bus_r(COORD_1_REG) | ((pos[2] << COORD_0_Z_OFST) & COORD_0_Z_MSK));
if ((bus_r(COORD_1_REG) & COORD_0_Z_MSK) != ((pos[2] << COORD_0_Z_OFST) & COORD_0_Z_MSK))
ret = FAIL;