mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 01:58:00 +02:00
* merge fix from #721 PR (sync) 7.0.2.rc -> developer * row and column for jungfrau mixed up * multi module jungfrau sync must do slaves first then master for start acquisition and send software trigger, and master first and then slaves for stopacquisition * non blocking to slaves first and only then blocking/nonblocking to the master for sending software trigger(jungfrau multi mod sync) * fixed get/set timing jungfrau when sync enabled, getsync during blocking acquire (for trigger or stop) will get stuck as it should ask the stop server * switching between 1 and 2 interfaces did not set gui/client zmq port properly. Resulted in dummy streaming forever. fixed * formatting, refactoring: const & for positions, multi mod M3 stop first master first * adding missing cstdint for gcc 13 * Refactoring handle sync out, handling synchronization also for softwaretrigger for m3, for start/sync/stop for g2/g1 --------- Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com> * fixed row and col for moench 2 interfaces * fix moench getTiming and also allow moench to handle sync --------- Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
This commit is contained in:
Binary file not shown.
@ -1345,7 +1345,7 @@ void setTiming(enum timingMode arg) {
|
||||
}
|
||||
|
||||
enum timingMode getTiming() {
|
||||
if (bus_r(EXT_SIGNAL_REG) == EXT_SIGNAL_MSK)
|
||||
if ((bus_r(EXT_SIGNAL_REG) & EXT_SIGNAL_MSK) >> EXT_SIGNAL_OFST)
|
||||
return TRIGGER_EXPOSURE;
|
||||
return AUTO_TIMING;
|
||||
}
|
||||
@ -1632,40 +1632,40 @@ int setDetectorPosition(int pos[]) {
|
||||
detPos[2] = outerPos[X];
|
||||
detPos[3] = outerPos[Y];
|
||||
|
||||
// row
|
||||
// row [Y]
|
||||
// outer
|
||||
uint32_t addr = COORD_ROW_REG;
|
||||
bus_w(addr,
|
||||
(bus_r(addr) & ~COORD_ROW_OUTER_MSK) |
|
||||
((outerPos[X] << COORD_ROW_OUTER_OFST) & COORD_ROW_OUTER_MSK));
|
||||
((outerPos[Y] << COORD_ROW_OUTER_OFST) & COORD_ROW_OUTER_MSK));
|
||||
if (((bus_r(addr) & COORD_ROW_OUTER_MSK) >> COORD_ROW_OUTER_OFST) !=
|
||||
outerPos[X])
|
||||
ret = FAIL;
|
||||
// inner
|
||||
bus_w(addr,
|
||||
(bus_r(addr) & ~COORD_ROW_INNER_MSK) |
|
||||
((innerPos[X] << COORD_ROW_INNER_OFST) & COORD_ROW_INNER_MSK));
|
||||
if (((bus_r(addr) & COORD_ROW_INNER_MSK) >> COORD_ROW_INNER_OFST) !=
|
||||
innerPos[X])
|
||||
ret = FAIL;
|
||||
|
||||
// col
|
||||
// outer
|
||||
addr = COORD_COL_REG;
|
||||
bus_w(addr,
|
||||
(bus_r(addr) & ~COORD_COL_OUTER_MSK) |
|
||||
((outerPos[Y] << COORD_COL_OUTER_OFST) & COORD_COL_OUTER_MSK));
|
||||
if (((bus_r(addr) & COORD_COL_OUTER_MSK) >> COORD_COL_OUTER_OFST) !=
|
||||
outerPos[Y])
|
||||
ret = FAIL;
|
||||
// inner
|
||||
bus_w(addr,
|
||||
(bus_r(addr) & ~COORD_COL_INNER_MSK) |
|
||||
((innerPos[Y] << COORD_COL_INNER_OFST) & COORD_COL_INNER_MSK));
|
||||
if (((bus_r(addr) & COORD_COL_INNER_MSK) >> COORD_COL_INNER_OFST) !=
|
||||
(bus_r(addr) & ~COORD_ROW_INNER_MSK) |
|
||||
((innerPos[Y] << COORD_ROW_INNER_OFST) & COORD_ROW_INNER_MSK));
|
||||
if (((bus_r(addr) & COORD_ROW_INNER_MSK) >> COORD_ROW_INNER_OFST) !=
|
||||
innerPos[Y])
|
||||
ret = FAIL;
|
||||
|
||||
// col [X]
|
||||
// outer
|
||||
addr = COORD_COL_REG;
|
||||
bus_w(addr,
|
||||
(bus_r(addr) & ~COORD_COL_OUTER_MSK) |
|
||||
((outerPos[X] << COORD_COL_OUTER_OFST) & COORD_COL_OUTER_MSK));
|
||||
if (((bus_r(addr) & COORD_COL_OUTER_MSK) >> COORD_COL_OUTER_OFST) !=
|
||||
outerPos[X])
|
||||
ret = FAIL;
|
||||
// inner
|
||||
bus_w(addr,
|
||||
(bus_r(addr) & ~COORD_COL_INNER_MSK) |
|
||||
((innerPos[X] << COORD_COL_INNER_OFST) & COORD_COL_INNER_MSK));
|
||||
if (((bus_r(addr) & COORD_COL_INNER_MSK) >> COORD_COL_INNER_OFST) !=
|
||||
innerPos[X])
|
||||
ret = FAIL;
|
||||
|
||||
if (ret == OK) {
|
||||
if (getNumberofUDPInterfaces() == 1) {
|
||||
LOG(logINFOBLUE, ("Position set to [%d, %d] #(col, row)\n",
|
||||
|
Reference in New Issue
Block a user