mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 14:39:00 +01:00
client gives now 3d positions of detector to be configured in udp header, only in jungfrau firmware till now
This commit is contained in:
Binary file not shown.
BIN
slsDetectorSoftware/jungfrauDetectorServer/bin/jungfrauDetectorServerv3.0.0.9
Executable file
BIN
slsDetectorSoftware/jungfrauDetectorServer/bin/jungfrauDetectorServerv3.0.0.9
Executable file
Binary file not shown.
@@ -1043,7 +1043,25 @@ int configureMAC(uint32_t destip, uint64_t destmac, uint64_t sourcemac, uint32_t
|
||||
}
|
||||
|
||||
|
||||
int setDetectorPosition(int pos[]) {
|
||||
int ret = OK;
|
||||
|
||||
bus_w(COORD_0, bus_r(COORD_0) | ((pos[0] << COORD_0_X_OFST) & COORD_0_X_MSK));
|
||||
if ((bus_r(COORD_0) & COORD_0_X_MSK) != ((pos[0] << COORD_0_X_OFST) & COORD_0_X_MSK))
|
||||
ret = FAIL;
|
||||
|
||||
bus_w(COORD_0, bus_r(COORD_0) | ((pos[1] << COORD_0_Y_OFST) & COORD_0_Y_MSK));
|
||||
if ((bus_r(COORD_0) & COORD_0_Y_MSK) != ((pos[1] << COORD_0_Y_OFST) & COORD_0_Y_MSK))
|
||||
ret = FAIL;
|
||||
|
||||
bus_w(COORD_1, bus_r(COORD_1) | ((pos[2] << COORD_0_Z_OFST) & COORD_0_Z_MSK));
|
||||
if ((bus_r(COORD_1) & COORD_0_Z_MSK) != ((pos[2] << COORD_0_Z_OFST) & COORD_0_Z_MSK))
|
||||
ret = FAIL;
|
||||
|
||||
if (ret == OK)
|
||||
printf("Position set to [%d, %d, %d]\n", pos[0], pos[1], pos[2]);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user