M3: fixed gain bits with negative polarity

This commit is contained in:
Erik Frojdh
2021-04-12 16:44:47 +02:00
parent d9cd780386
commit be5fee8126
14 changed files with 97 additions and 9 deletions

View File

@ -1314,6 +1314,8 @@ class Detector {
void setGainCaps(int caps, Positions pos = {});
Result<int> getGainCaps(Positions pos = {});
///@{
/** @name CTB / Moench Specific */

View File

@ -1992,7 +1992,7 @@ std::string CmdProxy::GainCaps(int action){
if (!args.empty())
WrongNumberOfParameters(0);
auto tmp = det->getChipStatusRegister();
auto tmp = det->getGainCaps();
sls::Result<defs::M3_GainCaps> csr;
for (auto val : tmp){
if (val)

View File

@ -1623,6 +1623,10 @@ void Detector::setGainCaps(int caps, Positions pos){
return pimpl->Parallel(&Module::setGainCaps, pos, caps);
}
Result<int> Detector::getGainCaps(Positions pos){
return pimpl->Parallel(&Module::getGainCaps, pos);
}
// CTB/ Moench Specific

View File

@ -2006,6 +2006,10 @@ void Module::setGainCaps(int caps){
sendToDetector<int>(F_SET_GAIN_CAPS, caps);
}
int Module::getGainCaps(){
return sendToDetector<int>(F_GET_GAIN_CAPS);
}
// CTB / Moench Specific
int Module::getNumberOfAnalogSamples() const {
return sendToDetector<int>(F_GET_NUM_ANALOG_SAMPLES);

View File

@ -428,6 +428,7 @@ class Module : public virtual slsDetectorDefs {
bool isMaster() const;
int getChipStatusRegister() const;
void setGainCaps(int caps);
int getGainCaps();
/**************************************************
* *