diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index e20bc492a..16d4a95e3 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -8,7 +8,8 @@ target_link_libraries(_sls_detector PUBLIC slsProjectWarnings slsDetectorShared slsReceiverShared - slsSupportLib ) + slsSupportLib + zmq ) diff --git a/slsDetectorSoftware/include/slsDetector.h b/slsDetectorSoftware/include/slsDetector.h index 6a724b233..6069aaea7 100644 --- a/slsDetectorSoftware/include/slsDetector.h +++ b/slsDetectorSoftware/include/slsDetector.h @@ -1632,7 +1632,7 @@ class slsDetector : public virtual slsDetectorDefs{ * @param word 64bit word to be written, -1 gets * @returns actual value */ - uint64_t setPatternWord(int addr, uint64_t word = -1); + uint64_t setPatternWord(uint64_t addr, uint64_t word = -1); /** * Sets the pattern or loop limits in the CTB diff --git a/slsDetectorSoftware/src/slsDetector.cpp b/slsDetectorSoftware/src/slsDetector.cpp index 74429ba12..374aa7300 100644 --- a/slsDetectorSoftware/src/slsDetector.cpp +++ b/slsDetectorSoftware/src/slsDetector.cpp @@ -4283,7 +4283,7 @@ int slsDetector::restreamStopFromReceiver() { int slsDetector::setPattern(const std::string &fname) { uint64_t word; - int addr = 0; + uint64_t addr = 0; FILE *fd = fopen(fname.c_str(), "r"); if (fd != nullptr) { while (fread(&word, sizeof(word), 1, fd) != 0u) { @@ -4298,11 +4298,11 @@ int slsDetector::setPattern(const std::string &fname) { return addr; } -uint64_t slsDetector::setPatternWord(int addr, uint64_t word) { +uint64_t slsDetector::setPatternWord(uint64_t addr, uint64_t word) { int fnum = F_SET_PATTERN; int ret = FAIL; - int mode = 0; // sets word - uint64_t args[3] = {(uint64_t)mode, (uint64_t)addr, word}; + uint64_t mode = 0; // sets word + uint64_t args[]{mode, addr, word}; uint64_t retval = -1; FILE_LOG(logDEBUG1) << "Setting Pattern word, addr: 0x" << std::hex << addr << ", word: 0x" << word << std::dec; @@ -4622,14 +4622,18 @@ slsDetector::readSettingsFile(const std::string &fname, sls_detector_module *myM // eiger if (detector_shm()->myDetectorType == EIGER) { bool allread = false; - infile.read((char *)myMod->dacs, sizeof(int) * (myMod->ndac)); + infile.read(reinterpret_cast(myMod->dacs), + sizeof(int) * (myMod->ndac)); if (infile.good()) { - infile.read((char *)&myMod->iodelay, sizeof(myMod->iodelay)); + infile.read(reinterpret_cast(&myMod->iodelay), + sizeof(myMod->iodelay)); if (infile.good()) { - infile.read((char *)&myMod->tau, sizeof(myMod->tau)); + infile.read(reinterpret_cast(&myMod->tau), + sizeof(myMod->tau)); if (tb) { if (infile.good()) { - infile.read((char *)myMod->chanregs, sizeof(int) * (myMod->nchan)); + infile.read(reinterpret_cast(myMod->chanregs), + sizeof(int) * (myMod->nchan)); if (infile) { allread = true; }