From 8af11832209bdb49419943ef5e33a0aab8606b9a Mon Sep 17 00:00:00 2001 From: Erik Frojdh Date: Thu, 6 Aug 2020 16:50:29 +0200 Subject: [PATCH] house keeping --- slsDetectorSoftware/src/Module.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/slsDetectorSoftware/src/Module.cpp b/slsDetectorSoftware/src/Module.cpp index a61c05d91..7bb36c449 100644 --- a/slsDetectorSoftware/src/Module.cpp +++ b/slsDetectorSoftware/src/Module.cpp @@ -672,7 +672,7 @@ std::string Module::printReceiverConfiguration() { } bool Module::getTenGiga() const { - return static_cast(sendToDetector(F_ENABLE_TEN_GIGA, GET_FLAG)); + return sendToDetector(F_ENABLE_TEN_GIGA, GET_FLAG); } void Module::setTenGiga(bool value) { @@ -854,7 +854,7 @@ void Module::setReceiverUDPSocketBufferSize(int64_t udpsockbufsize) { } bool Module::getReceiverLock() const { - return static_cast(sendToReceiver(F_LOCK_RECEIVER, GET_FLAG)); + return sendToReceiver(F_LOCK_RECEIVER, GET_FLAG); } void Module::setReceiverLock(bool lock) { @@ -1103,8 +1103,7 @@ std::string Module::setSettingsDir(const std::string &dir) { } bool Module::getParallelMode() const { - auto r = sendToDetector(F_GET_PARALLEL_MODE); - return static_cast(r); + return sendToDetector(F_GET_PARALLEL_MODE); } void Module::setParallelMode(const bool enable) { @@ -1112,8 +1111,7 @@ void Module::setParallelMode(const bool enable) { } bool Module::getOverFlowMode() const { - auto r = sendToDetector(F_GET_OVERFLOW_MODE); - return static_cast(r); + return sendToDetector(F_GET_OVERFLOW_MODE); } void Module::setOverFlowMode(const bool enable) { @@ -1189,8 +1187,7 @@ void Module::setReadNLines(const int value) { } bool Module::getInterruptSubframe() const { - auto r = sendToDetector(F_GET_INTERRUPT_SUBFRAME); - return static_cast(r); + return sendToDetector(F_GET_INTERRUPT_SUBFRAME); } void Module::setInterruptSubframe(const bool enable) { @@ -2277,7 +2274,7 @@ void Module::setStopPort(int port_number) { } bool Module::getLockDetector() const { - return static_cast(sendToDetector(F_LOCK_SERVER, GET_FLAG)); + return sendToDetector(F_LOCK_SERVER, GET_FLAG); } void Module::setLockDetector(bool lock) { @@ -3169,13 +3166,12 @@ void Module::programFPGAviaBlackfin(std::vector buffer) { } void Module::programFPGAviaNios(std::vector buffer) { - uint64_t filesize = buffer.size(); LOG(logINFO) << "Sending programming binary (from rbf) to detector " << moduleId << " (" << shm()->hostname << ")"; auto client = DetectorSocket(shm()->hostname, shm()->controlPort); client.Send(F_PROGRAM_FPGA); - // filesize + uint64_t filesize = buffer.size(); client.Send(filesize); if (client.Receive() == FAIL) { std::ostringstream os; @@ -3183,7 +3179,6 @@ void Module::programFPGAviaNios(std::vector buffer) { << " returned error: " << client.readErrorMessage(); throw RuntimeError(os.str()); } - // program client.Send(buffer); if (client.Receive() == FAIL) { std::ostringstream os;