mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 13:57:13 +02:00
minor
This commit is contained in:
@ -45,9 +45,7 @@ void CmdParser::Parse(const std::string &s) {
|
|||||||
auto old_size = arguments_.size();
|
auto old_size = arguments_.size();
|
||||||
arguments_.erase(std::remove_if(begin(arguments_), end(arguments_),
|
arguments_.erase(std::remove_if(begin(arguments_), end(arguments_),
|
||||||
[](const std::string &item) {
|
[](const std::string &item) {
|
||||||
if (item == "-h" || item == "--help")
|
return (item == "-h" || item == "--help");
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}),
|
}),
|
||||||
end(arguments_));
|
end(arguments_));
|
||||||
if (old_size - arguments_.size() > 0)
|
if (old_size - arguments_.size() > 0)
|
||||||
|
@ -1288,7 +1288,7 @@ std::string CmdProxy::Counters(int action) {
|
|||||||
std::vector <int> result;
|
std::vector <int> result;
|
||||||
for (size_t i = 0; i < 32; ++i) {
|
for (size_t i = 0; i < 32; ++i) {
|
||||||
if (mask & (1 << i)) {
|
if (mask & (1 << i)) {
|
||||||
result.push_back((int)i);
|
result.push_back(static_cast<int>(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
os << sls::ToString(result) << '\n';
|
os << sls::ToString(result) << '\n';
|
||||||
|
@ -369,8 +369,8 @@ void DetectorImpl::addSlsDetector(const std::string &hostname) {
|
|||||||
|
|
||||||
// get type by connecting
|
// get type by connecting
|
||||||
detectorType type = slsDetector::getTypeFromDetector(host, port);
|
detectorType type = slsDetector::getTypeFromDetector(host, port);
|
||||||
int pos = (int)detectors.size();
|
auto pos = detectors.size();
|
||||||
detectors.push_back(
|
detectors.emplace_back(
|
||||||
sls::make_unique<slsDetector>(type, multiId, pos, false));
|
sls::make_unique<slsDetector>(type, multiId, pos, false));
|
||||||
multi_shm()->numberOfDetectors = detectors.size();
|
multi_shm()->numberOfDetectors = detectors.size();
|
||||||
detectors[pos]->setControlPort(port);
|
detectors[pos]->setControlPort(port);
|
||||||
@ -657,18 +657,18 @@ void DetectorImpl::readFrameFromReceiver() {
|
|||||||
|
|
||||||
if (eiger && (flippedDataX != 0U)) {
|
if (eiger && (flippedDataX != 0U)) {
|
||||||
for (uint32_t i = 0; i < nPixelsY; ++i) {
|
for (uint32_t i = 0; i < nPixelsY; ++i) {
|
||||||
memcpy(((char *)multiframe) +
|
memcpy((multiframe) +
|
||||||
((yoffset + (nPixelsY - 1 - i)) *
|
((yoffset + (nPixelsY - 1 - i)) *
|
||||||
rowoffset) +
|
rowoffset) +
|
||||||
xoffset,
|
xoffset,
|
||||||
(char *)image + (i * singledetrowoffset),
|
image + (i * singledetrowoffset),
|
||||||
singledetrowoffset);
|
singledetrowoffset);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (uint32_t i = 0; i < nPixelsY; ++i) {
|
for (uint32_t i = 0; i < nPixelsY; ++i) {
|
||||||
memcpy(((char *)multiframe) +
|
memcpy((multiframe) +
|
||||||
((yoffset + i) * rowoffset) + xoffset,
|
((yoffset + i) * rowoffset) + xoffset,
|
||||||
(char *)image + (i * singledetrowoffset),
|
image + (i * singledetrowoffset),
|
||||||
singledetrowoffset);
|
singledetrowoffset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user