mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-19 18:40:01 +02:00
merge fix
This commit is contained in:
commit
cf257cbc65
@ -2244,6 +2244,7 @@ class Detector(CppDetectorApi):
|
||||
"resistance.
|
||||
Note
|
||||
----
|
||||
Advanced user command.
|
||||
[Gotthard2] Default is 0. Options: 0-3.
|
||||
[Jungfrau] Default is 1. Options: 0-1.
|
||||
"""
|
||||
@ -2253,6 +2254,21 @@ class Detector(CppDetectorApi):
|
||||
def filterresistor(self, value):
|
||||
ut.set_using_dict(self.setFilterResistor, value)
|
||||
|
||||
@property
|
||||
@element
|
||||
def filtercell(self):
|
||||
"""
|
||||
[Jungfrau] Set filter capacitor.
|
||||
Note
|
||||
----
|
||||
[Jungfrau] Options: 0-12. Default: 0. Advanced user command.
|
||||
"""
|
||||
return self.getFilterCell()
|
||||
|
||||
@filtercell.setter
|
||||
def filtercell(self, value):
|
||||
ut.set_using_dict(self.setFilterCell, value)
|
||||
|
||||
@property
|
||||
def maxclkphaseshift(self):
|
||||
"""
|
||||
|
@ -1104,6 +1104,13 @@ void init_det(py::module &m) {
|
||||
.def("setFilterResistor",
|
||||
(void (Detector::*)(int, sls::Positions)) & Detector::setFilterResistor,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getFilterCell",
|
||||
(Result<int>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getFilterCell,
|
||||
py::arg() = Positions{})
|
||||
.def("setFilterCell",
|
||||
(void (Detector::*)(int, sls::Positions)) & Detector::setFilterCell,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getCurrentSource",
|
||||
(Result<bool>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getCurrentSource,
|
||||
|
Binary file not shown.
@ -2670,7 +2670,28 @@ enum vetoAlgorithm getVetoAlgorithm(enum ethernetInterface interface) {
|
||||
}
|
||||
|
||||
void setVetoAlgorithm(enum ethernetInterface interface,
|
||||
enum vetoAlgorithm alg) {}
|
||||
enum vetoAlgorithm alg) {
|
||||
uint32_t addr = CONFIG_REG;
|
||||
uint32_t value = bus_r(addr);
|
||||
switch (alg) {
|
||||
// more to follow
|
||||
case DEFAULT_ALGORITHM:
|
||||
if (interface == I3GBE) {
|
||||
LOG(logINFO, ("Setting default veto algorithm for 3Gbe\n"));
|
||||
value &= (~CONFIG_VETO_CH_3GB_ALG_MSK);
|
||||
value |= CONFIG_VETO_CH_3GB_ALG_DEFAULT_VAL;
|
||||
} else {
|
||||
LOG(logINFO, ("Setting default veto algorithm for 10Gbe\n"));
|
||||
value &= (~CONFIG_VETO_CH_10GB_ALG_MSK);
|
||||
value |= CONFIG_VETO_CH_10GB_ALG_DEFAULT_VAL;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOG(logERROR, ("unknown algorithm %d for 3gbe\n", alg));
|
||||
return;
|
||||
}
|
||||
bus_w(addr, value);
|
||||
}
|
||||
|
||||
void setBadChannels(int nch, int *channels) {
|
||||
LOG(logINFO, ("Setting %d bad channels\n", nch));
|
||||
|
@ -1521,6 +1521,14 @@ void Detector::setGainMode(const defs::gainMode mode, Positions pos) {
|
||||
pimpl->Parallel(&Module::setGainMode, pos, mode);
|
||||
}
|
||||
|
||||
Result<int> Detector::getFilterCell(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getFilterCell, pos);
|
||||
}
|
||||
|
||||
void Detector::setFilterCell(int cell, Positions pos) {
|
||||
pimpl->Parallel(&Module::setFilterCell, pos, cell);
|
||||
}
|
||||
|
||||
// Gotthard Specific
|
||||
|
||||
Result<defs::ROI> Detector::getROI(Positions pos) const {
|
||||
|
@ -375,6 +375,8 @@ class Module : public virtual slsDetectorDefs {
|
||||
void setStorageCellDelay(int64_t value);
|
||||
gainMode getGainMode() const;
|
||||
void setGainMode(const gainMode mode);
|
||||
int getStorageCellStart() const;
|
||||
void setStorageCellStart(int pos);
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
|
@ -5,8 +5,8 @@
|
||||
#define APIGUI 0x210225
|
||||
#define APICTB 0x210729
|
||||
#define APIGOTTHARD 0x210729
|
||||
#define APIGOTTHARD2 0x210729
|
||||
#define APIMYTHEN3 0x210729
|
||||
#define APIMOENCH 0x210729
|
||||
#define APIEIGER 0x210729
|
||||
#define APIJUNGFRAU 0x210802
|
||||
#define APIGOTTHARD2 0x210806
|
||||
|
Loading…
x
Reference in New Issue
Block a user