Guidetector (#54)

* WIP

* dacWidget

* main WIP

* advanced WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* works

* updated gui to chrono

* review fixes

* unitque ptrs in gui
This commit is contained in:
Dhanya Thattil
2019-08-26 19:14:22 +02:00
committed by GitHub
parent 7a4c1161ab
commit aafe049a9b
31 changed files with 709 additions and 1138 deletions

View File

@ -250,14 +250,14 @@ void Detector::setTimingMode(defs::timingMode value, Positions pos) {
void Detector::acquire() { pimpl->acquire(); }
void Detector::startAcquisition() {
if (getUseReceiverFlag({}).squash())
if (getUseReceiverFlag().squash(true))
pimpl->Parallel(&slsDetector::startReceiver, {});
pimpl->Parallel(&slsDetector::startAcquisition, {});
}
void Detector::stopAcquisition() {
pimpl->Parallel(&slsDetector::stopAcquisition, {});
if (getUseReceiverFlag({}).squash()) // TODO: problem for acquire()
if (getUseReceiverFlag().squash(true))
pimpl->Parallel(&slsDetector::stopReceiver, {});
}
@ -768,9 +768,9 @@ void Detector::setRxAddGapPixels(bool enable) {
Result<bool> Detector::getParallelMode(Positions pos) const {
auto res = pimpl->Parallel(&slsDetector::setReadOutFlags, pos,
defs::GET_READOUT_FLAGS);
Result<bool> booleanRes;
for (unsigned int i = 0; i < res.size(); ++i) {
booleanRes[i] = (res[i] & defs::PARALLEL) ? true : false;
Result<bool> booleanRes(res.size());
for (size_t i = 0; i < res.size(); ++i) {
booleanRes[i] = res[i] & defs::PARALLEL;
}
return booleanRes;
}
@ -783,9 +783,9 @@ void Detector::setParallelMode(bool value, Positions pos) {
Result<bool> Detector::getOverFlowMode(Positions pos) const {
auto res = pimpl->Parallel(&slsDetector::setReadOutFlags, pos,
defs::GET_READOUT_FLAGS);
Result<bool> booleanRes;
for (unsigned int i = 0; i < res.size(); ++i) {
booleanRes[i] = (res[i] & defs::SHOW_OVERFLOW) ? true : false;
Result<bool> booleanRes(res.size());
for (size_t i = 0; i < res.size(); ++i) {
booleanRes[i] = res[i] & defs::SHOW_OVERFLOW;
}
return booleanRes;
}
@ -824,6 +824,10 @@ Result<ns> Detector::getRateCorrection(Positions pos) const {
return pimpl->Parallel(&slsDetector::getRateCorrection, pos);
}
void Detector::setDefaultRateCorrection(Positions pos) {
pimpl->Parallel(&slsDetector::setDefaultRateCorrection, pos);
}
void Detector::setRateCorrection(ns dead_time, Positions pos) {
pimpl->Parallel(&slsDetector::setRateCorrection, pos, dead_time.count());
}