diff --git a/slsDetectorSoftware/include/sls/Detector.h b/slsDetectorSoftware/include/sls/Detector.h index b617eb33a..4667a9c40 100644 --- a/slsDetectorSoftware/include/sls/Detector.h +++ b/slsDetectorSoftware/include/sls/Detector.h @@ -1787,7 +1787,7 @@ class Detector { void updateFirmwareAndServer(const std::string &sname, const std::string &fname, Positions pos = {}); - Result getUpdateMode(Positions pos = {}); + Result getUpdateMode(Positions pos = {}) const; /** Restarts detector server in update mode. This is useful when * server-firmware compatibility is at its worst and server cannot start up diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index 3ad9108cb..3a4c6d42e 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -2195,7 +2195,7 @@ void Detector::updateFirmwareAndServer(const std::string &sname, programFPGA(fname, pos); } -Result Detector::getUpdateMode(Positions pos) { +Result Detector::getUpdateMode(Positions pos) const { return pimpl->Parallel(&Module::getUpdateMode, pos); } diff --git a/slsDetectorSoftware/src/Module.cpp b/slsDetectorSoftware/src/Module.cpp index ce287feaf..1f357e5de 100644 --- a/slsDetectorSoftware/src/Module.cpp +++ b/slsDetectorSoftware/src/Module.cpp @@ -2568,7 +2568,9 @@ void Module::rebootController() { << "): Controller rebooted successfully!"; } -bool Module::getUpdateMode() { return sendToDetector(F_GET_UPDATE_MODE); } +bool Module::getUpdateMode() const { + return sendToDetector(F_GET_UPDATE_MODE); +} void Module::setUpdateMode(const bool updatemode) { sendToDetector(F_SET_UPDATE_MODE, static_cast(updatemode), nullptr); diff --git a/slsDetectorSoftware/src/Module.h b/slsDetectorSoftware/src/Module.h index a11de9065..ed553378d 100644 --- a/slsDetectorSoftware/src/Module.h +++ b/slsDetectorSoftware/src/Module.h @@ -545,7 +545,7 @@ class Module : public virtual slsDetectorDefs { const std::string &serverName); void updateKernel(std::vector buffer); void rebootController(); - bool getUpdateMode(); + bool getUpdateMode() const; void setUpdateMode(const bool updatemode); uint32_t readRegister(uint32_t addr) const; uint32_t writeRegister(uint32_t addr, uint32_t val);