mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-25 07:40:03 +02:00
Merge branch 'developer' into copyserver
This commit is contained in:
commit
43bbf66e85
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv6.0.0-rc2
|
|
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer
Executable file
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer
Executable file
Binary file not shown.
Binary file not shown.
@ -2197,17 +2197,21 @@ int getFilterCell() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setFilterCell(int iCell) {
|
void setFilterCell(int iCell) {
|
||||||
uint32_t value = 0;
|
if (iCell > MAX_FILTER_CELL_VAL) {
|
||||||
// sets the corresponding cell and the cells before it
|
return;
|
||||||
if (iCell != 0) {
|
|
||||||
value = iCell;
|
|
||||||
if (value > 1) {
|
|
||||||
value += (value - 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t addr = CONFIG_V11_REG;
|
uint32_t addr = CONFIG_V11_REG;
|
||||||
bus_w(addr, bus_r(addr) &~ CONFIG_V11_FLTR_CLL_MSK);
|
bus_w(addr, bus_r(addr) &~ CONFIG_V11_FLTR_CLL_MSK);
|
||||||
|
|
||||||
|
if (iCell > 0) {
|
||||||
|
// enables as many cells
|
||||||
|
uint32_t value = 0;
|
||||||
|
for (int i = 0; i != iCell; ++i) {
|
||||||
|
value |= (1 << i);
|
||||||
|
}
|
||||||
bus_w(addr, bus_r(addr) | ((value << CONFIG_V11_FLTR_CLL_OFST) & CONFIG_V11_FLTR_CLL_MSK));
|
bus_w(addr, bus_r(addr) | ((value << CONFIG_V11_FLTR_CLL_OFST) & CONFIG_V11_FLTR_CLL_MSK));
|
||||||
|
}
|
||||||
LOG(logINFO, ("Setting Filter Cell to %d [Reg:0x%x]\n", iCell, bus_r(addr)));
|
LOG(logINFO, ("Setting Filter Cell to %d [Reg:0x%x]\n", iCell, bus_r(addr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user