format GUI

This commit is contained in:
Erik Frojdh 2020-05-05 10:12:05 +02:00
parent ea4044e4b1
commit 8ff9b0cdac
29 changed files with 151 additions and 170 deletions

View File

@ -53,7 +53,6 @@ set(ClangFormat_EXCLUDE_PATTERNS "build/"
"slsDetectorServers/"
"ctbGui/"
"manual/"
"slsDetectorGui/"
"python/"
"sample/"
${CMAKE_BINARY_DIR})

View File

@ -14,7 +14,8 @@ class qCloneWidget : public QMainWindow, private Ui::ClonePlotObject {
qCloneWidget(QWidget *parent, SlsQt1DPlot *p1, SlsQt2DPlot *p2,
SlsQt1DPlot *gp1, SlsQt2DPlot *gp, QString title,
QString filePath, QString fileName, int64_t aIndex,
bool displayStats, QString min, QString max, QString sum, bool completeImage);
bool displayStats, QString min, QString max, QString sum,
bool completeImage);
~qCloneWidget();

View File

@ -1,7 +1,7 @@
#pragma once
#include "ui_form_dac.h"
#include "Detector.h"
#include "sls_detector_defs.h"
#include "ui_form_dac.h"
#include <string>
class qDacWidget : public QWidget, private Ui::WidgetDacObject {

View File

@ -6,9 +6,9 @@
#include <QMessageBox>
#include <chrono>
#include <cstdint>
#include <iostream>
#include <ostream>
#include <cstdint>
#include <string>
using std::chrono::duration;

View File

@ -1,7 +1,7 @@
#pragma once
#include "ui_form_detectormain.h"
#include "qDefs.h"
#include "Detector.h"
#include "qDefs.h"
#include "ui_form_detectormain.h"
#include <QTabWidget>
class qDrawPlot;

View File

@ -1,7 +1,7 @@
#pragma once
#include "ui_form_plot.h"
#include "qDefs.h"
#include "Detector.h"
#include "qDefs.h"
#include "ui_form_plot.h"
#include <mutex>
class SlsQt1DPlot;

View File

@ -1,6 +1,6 @@
#pragma once
#include "ui_form_tab_advanced.h"
#include "Detector.h"
#include "ui_form_tab_advanced.h"
class qDrawPlot;

View File

@ -1,6 +1,6 @@
#pragma once
#include "ui_form_tab_dataoutput.h"
#include "Detector.h"
#include "ui_form_tab_dataoutput.h"
class qTabDataOutput : public QWidget, private Ui::TabDataOutputObject {
Q_OBJECT

View File

@ -1,6 +1,6 @@
#pragma once
#include "ui_form_tab_debugging.h"
#include "Detector.h"
#include "ui_form_tab_debugging.h"
class QTreeWidget;
class QTreeWidgetItem;

View File

@ -1,7 +1,7 @@
#pragma once
#include "ui_form_tab_developer.h"
#include "Detector.h"
#include "sls_detector_defs.h"
#include "ui_form_tab_developer.h"
#include <vector>
class qDacWidget;

View File

@ -1,6 +1,6 @@
#pragma once
#include "ui_form_tab_measurement.h"
#include "Detector.h"
#include "ui_form_tab_measurement.h"
class qDrawPlot;
class QStandardItemModel;

View File

@ -1,6 +1,6 @@
#pragma once
#include "ui_form_tab_plot.h"
#include "Detector.h"
#include "ui_form_tab_plot.h"
class qDrawPlot;
class QButtonGroup;

View File

@ -1,6 +1,6 @@
#pragma once
#include "ui_form_tab_settings.h"
#include "Detector.h"
#include "ui_form_tab_settings.h"
class qTabSettings : public QWidget, private Ui::TabSettingsObject {
Q_OBJECT

View File

@ -1,8 +1,8 @@
#ifndef SLSQT1DPLOT_H
#define SLSQT1DPLOT_H
#include "ansi.h"
#include "SlsQt1DZoomer.h"
#include "ansi.h"
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
#include <qwt_plot_marker.h>

View File

@ -1,9 +1,9 @@
#ifndef SLSQT2DZOOMER_H
#define SLSQT2DZOOMER_H
#include "SlsQt2DHist.h"
#include <cstdio>
#include <qwt_plot_panner.h>
#include <qwt_plot_zoomer.h>
#include <cstdio>
class SlsQt2DZoomer : public QwtPlotZoomer {
private:

View File

@ -1,7 +1,7 @@
/* TODO! short description */
#include "SlsQt1DPlot.h"
#include <qwt_symbol.h>
#include <iostream>
#include <qwt_legend.h>
#include <qwt_math.h>
#include <qwt_painter.h>
@ -10,8 +10,8 @@
#include <qwt_scale_draw.h>
#include <qwt_scale_engine.h>
#include <qwt_scale_widget.h>
#include <qwt_symbol.h>
#include <stdlib.h>
#include <iostream>
#define QwtLog10ScaleEngine QwtLogScaleEngine // hmm
@ -314,7 +314,8 @@ void SlsQtH1DList::Remove(SlsQtH1D *hist) {
hl = hl->the_next;
else { // match
if (!hl->the_next)
hl->the_hist = nullptr; // first the_hist is zero when there's no next
hl->the_hist =
nullptr; // first the_hist is zero when there's no next
else {
SlsQtH1DList *t = hl->the_next;
hl->the_hist = t->the_hist;

View File

@ -1,9 +1,9 @@
/* TODO! short description */
#include "SlsQt1DZoomer.h"
#include "SlsQt1DPlot.h"
#include <iostream>
#include <qwt_plot.h>
#include <qwt_scale_div.h>
#include <iostream>
void SlsQt1DZoomer::ResetZoomBase() {
SetZoomBase(x0, y0, x1 - x0,

View File

@ -224,7 +224,6 @@ QwtLinearColorMap *SlsQt2DPlot::myColourMap(int log) {
return myColourMap(cs);
}
void SlsQt2DPlot::Update() {
if (isLog)
hist->SetMinimumToFirstGreaterThanZero();

View File

@ -1,7 +1,6 @@
#include "qDacWidget.h"
#include "qDefs.h"
qDacWidget::qDacWidget(QWidget *parent, sls::Detector *detector, bool d,
std::string n, slsDetectorDefs::dacIndex i)
: QWidget(parent), det(detector), isDac(d), index(i) {
@ -56,8 +55,8 @@ void qDacWidget::GetDac() {
void qDacWidget::SetDac() {
int val = (int)spinDac->value();
LOG(logINFO) << "Setting dac:" << lblDac->text().toAscii().data()
<< " : " << val;
LOG(logINFO) << "Setting dac:" << lblDac->text().toAscii().data() << " : "
<< val;
try {
det->setDAC(index, val, 0, {detectorIndex});

View File

@ -19,8 +19,8 @@
#include <QScrollArea>
#include <QSizePolicy>
#include <string>
#include <getopt.h>
#include <string>
#include <sys/stat.h>
int main(int argc, char **argv) {
@ -57,8 +57,7 @@ int main(int argc, char **argv) {
case 'f':
fname = optarg;
LOG(logDEBUG)
<< long_options[option_index].name << " " << optarg;
LOG(logDEBUG) << long_options[option_index].name << " " << optarg;
break;
case 'd':
@ -105,9 +104,10 @@ int main(int argc, char **argv) {
return 0;
}
qDetectorMain::qDetectorMain(int multiId, const std::string& fname, bool isDevel)
: QMainWindow(nullptr), detType(slsDetectorDefs::GENERIC), isDeveloper(isDevel),
heightPlotWindow(0), heightCentralWidget(0) {
qDetectorMain::qDetectorMain(int multiId, const std::string &fname,
bool isDevel)
: QMainWindow(nullptr), detType(slsDetectorDefs::GENERIC),
isDeveloper(isDevel), heightPlotWindow(0), heightCentralWidget(0) {
setupUi(this);
SetUpDetector(fname, multiId);
@ -115,8 +115,7 @@ qDetectorMain::qDetectorMain(int multiId, const std::string& fname, bool isDevel
}
qDetectorMain::~qDetectorMain() {
disconnect(tabs, SIGNAL(currentChanged(int)), this,
SLOT(Refresh(int)));
disconnect(tabs, SIGNAL(currentChanged(int)), this, SLOT(Refresh(int)));
}
void qDetectorMain::SetUpWidgetWindow() {
@ -132,8 +131,7 @@ void qDetectorMain::SetUpWidgetWindow() {
layoutTabs->addWidget(tabs);
// creating all the other tab widgets
tabMeasurement =
new qTabMeasurement(this, det.get(), plot);
tabMeasurement = new qTabMeasurement(this, det.get(), plot);
tabDataOutput = new qTabDataOutput(this, det.get());
tabPlot = new qTabPlot(this, det.get(), plot);
tabSettings = new qTabSettings(this, det.get());
@ -260,8 +258,8 @@ void qDetectorMain::Initialization() {
// Measurement tab
connect(tabMeasurement, SIGNAL(EnableTabsSignal(bool)), this,
SLOT(EnableTabs(bool)));
connect(tabMeasurement, SIGNAL(FileNameChangedSignal(QString)),
plot, SLOT(SetSaveFileName(QString)));
connect(tabMeasurement, SIGNAL(FileNameChangedSignal(QString)), plot,
SLOT(SetSaveFileName(QString)));
// Plot tab
connect(tabPlot, SIGNAL(DisableZoomSignal(bool)), this,
SLOT(SetZoomToolTip(bool)));
@ -269,8 +267,7 @@ void qDetectorMain::Initialization() {
// Plotting
connect(plot, SIGNAL(AcquireFinishedSignal()), tabMeasurement,
SLOT(AcquireFinished()));
connect(plot, SIGNAL(AbortSignal()), tabMeasurement,
SLOT(AbortAcquire()));
connect(plot, SIGNAL(AbortSignal()), tabMeasurement, SLOT(AbortAcquire()));
// menubar
// Modes Menu
@ -372,8 +369,7 @@ void qDetectorMain::ExecuteUtilities(QAction *action) {
"The Configuration Parameters have been "
"configured successfully.",
"qDetectorMain::ExecuteUtilities");
LOG(logINFO)
<< "Configuration Parameters loaded successfully";
LOG(logINFO) << "Configuration Parameters loaded successfully";
}
}

View File

@ -277,8 +277,7 @@ void qDrawPlot::SetPlotTitlePrefix(QString title) {
}
void qDrawPlot::SetXAxisTitle(QString title) {
LOG(logINFO) << "Setting X Axis Title to "
<< title.toAscii().constData();
LOG(logINFO) << "Setting X Axis Title to " << title.toAscii().constData();
if (is1d) {
xTitle1d = title;
} else {
@ -287,8 +286,7 @@ void qDrawPlot::SetXAxisTitle(QString title) {
}
void qDrawPlot::SetYAxisTitle(QString title) {
LOG(logINFO) << "Setting Y Axis Title to "
<< title.toAscii().constData();
LOG(logINFO) << "Setting Y Axis Title to " << title.toAscii().constData();
if (is1d) {
yTitle1d = title;
} else {
@ -297,8 +295,7 @@ void qDrawPlot::SetYAxisTitle(QString title) {
}
void qDrawPlot::SetZAxisTitle(QString title) {
LOG(logINFO) << "Setting Z Axis Title to "
<< title.toAscii().constData();
LOG(logINFO) << "Setting Z Axis Title to " << title.toAscii().constData();
zTitle2d = title;
}
@ -309,8 +306,8 @@ void qDrawPlot::SetXYRangeChanged(bool disable, double *xy, bool *isXY) {
std::copy(xy, xy + 4, xyRange);
std::copy(isXY, isXY + 4, isXYRange);
LOG(logDEBUG) << "Setting Disable zoom to " << std::boolalpha
<< disable << std::noboolalpha;
LOG(logDEBUG) << "Setting Disable zoom to " << std::boolalpha << disable
<< std::noboolalpha;
disableZoom = disable;
}
@ -348,8 +345,8 @@ double qDrawPlot::GetYMaximum() {
}
void qDrawPlot::SetDataCallBack(bool enable) {
LOG(logINFO) << "Setting data call back to " << std::boolalpha
<< enable << std::noboolalpha;
LOG(logINFO) << "Setting data call back to " << std::boolalpha << enable
<< std::noboolalpha;
try {
if (enable) {
isPlot = true;
@ -360,7 +357,8 @@ void qDrawPlot::SetDataCallBack(bool enable) {
det->registerDataCallback(nullptr, this);
det->setRxZmqDataStream(false);
}
} CATCH_DISPLAY("Could not get set rxr data streaming enable.",
}
CATCH_DISPLAY("Could not get set rxr data streaming enable.",
"qDrawPlot::SetDataCallBack")
}
@ -570,8 +568,8 @@ void qDrawPlot::ClonePlot() {
new qCloneWidget(this, cloneplot1D, cloneplot2D, clonegainplot1D,
clonegainplot2D, boxPlot->title(), fileSavePath,
fileSaveName, currentAcqIndex, displayStatistics,
lblMinDisp->text(), lblMaxDisp->text(),
lblSumDisp->text(), completeImage);
lblMinDisp->text(), lblMaxDisp->text(), lblSumDisp->text(),
completeImage);
}
void qDrawPlot::SavePlot() {
@ -673,8 +671,7 @@ void qDrawPlot::AcquireThread() {
// exception in acquire will not call acquisition finished call back, so
// handle it
if (!mess.empty()) {
LOG(logERROR) << "Acquisition Finished with an exception: "
<< mess;
LOG(logERROR) << "Acquisition Finished with an exception: " << mess;
qDefs::ExceptionMessage("Acquire unsuccessful.", mess,
"qDrawPlot::AcquireFinished");
try {
@ -739,8 +736,7 @@ void qDrawPlot::GetData(detectorData *data, uint64_t frameIndex,
<< " \t nx: " << data->nx << std::endl
<< " \t ny: " << data->ny << std::endl
<< " \t data bytes: " << data->databytes << std::endl
<< " \t dynamic range: " << data->dynamicRange
<< std::endl
<< " \t dynamic range: " << data->dynamicRange << std::endl
<< " \t file index: " << data->fileIndex << std::endl
<< " \t complete image: " << data->completeImage << std::endl
<< " ]";
@ -748,8 +744,8 @@ void qDrawPlot::GetData(detectorData *data, uint64_t frameIndex,
progress = (int)data->progressIndex;
currentAcqIndex = data->fileIndex;
currentFrame = frameIndex;
LOG(logDEBUG) << "[ Progress:" << progress
<< ", Frame:" << currentFrame << " ]";
LOG(logDEBUG) << "[ Progress:" << progress << ", Frame:" << currentFrame
<< " ]";
// 2d (only image, not gain data, not pedestalvals),
// check if npixelsX and npixelsY is the same (quad is different)
@ -757,8 +753,8 @@ void qDrawPlot::GetData(detectorData *data, uint64_t frameIndex,
static_cast<int>(nPixelsY) != data->ny)) {
nPixelsX = data->nx;
nPixelsY = data->ny;
LOG(logINFO) << "Change in Detector Shape:\n\tnPixelsX:"
<< nPixelsX << " nPixelsY:" << nPixelsY;
LOG(logINFO) << "Change in Detector Shape:\n\tnPixelsX:" << nPixelsX
<< " nPixelsY:" << nPixelsY;
delete[] data2d;
data2d = new double[nPixelsY * nPixelsX];
@ -815,8 +811,8 @@ void qDrawPlot::GetData(detectorData *data, uint64_t frameIndex,
}
// calculate the pedestal value
if (pedestalCount == NUM_PEDESTAL_FRAMES) {
LOG(logINFO) << "Pedestal Calculated after "
<< NUM_PEDESTAL_FRAMES << " frames";
LOG(logINFO) << "Pedestal Calculated after " << NUM_PEDESTAL_FRAMES
<< " frames";
for (unsigned int px = 0; px < nPixels; ++px)
tempPedestalVals[px] =
tempPedestalVals[px] / (double)NUM_PEDESTAL_FRAMES;

View File

@ -531,8 +531,7 @@ void qTabAdvanced::SetROI() {
roi.xmax = spinXmax->value();
// set roi
LOG(logINFO) << "Setting ROI: [" << roi.xmin << ", " << roi.xmax
<< "]";
LOG(logINFO) << "Setting ROI: [" << roi.xmin << ", " << roi.xmax << "]";
try {
det->setROI(roi, {comboReadout->currentIndex()});
}
@ -586,8 +585,7 @@ void qTabAdvanced::GetNumStoragecells() {
}
void qTabAdvanced::SetNumStoragecells(int value) {
LOG(logINFO) << "Setting number of additional stoarge cells: "
<< value;
LOG(logINFO) << "Setting number of additional stoarge cells: " << value;
try {
det->setNumberOfAdditionalStorageCells(value);
}
@ -621,8 +619,8 @@ void qTabAdvanced::SetSubExposureTime() {
auto timeNS = qDefs::getNSTime(std::make_pair(
spinSubExpTime->value(),
static_cast<qDefs::timeUnit>(comboSubExpTimeUnit->currentIndex())));
LOG(logINFO)
<< "Setting sub frame acquisition time to " << timeNS.count() << " ns"
LOG(logINFO) << "Setting sub frame acquisition time to " << timeNS.count()
<< " ns"
<< "/" << spinSubExpTime->value()
<< qDefs::getUnitString(
(qDefs::timeUnit)comboSubExpTimeUnit->currentIndex());
@ -661,8 +659,7 @@ void qTabAdvanced::SetSubDeadTime() {
spinSubDeadTime->value(),
static_cast<qDefs::timeUnit>(comboSubDeadTimeUnit->currentIndex())));
LOG(logINFO)
<< "Setting sub frame dead time to " << timeNS.count() << " ns"
LOG(logINFO) << "Setting sub frame dead time to " << timeNS.count() << " ns"
<< "/" << spinSubDeadTime->value()
<< qDefs::getUnitString(
(qDefs::timeUnit)comboSubDeadTimeUnit->currentIndex());

View File

@ -334,15 +334,13 @@ void qTabDataOutput::SetRateCorrection() {
// custom dead time
if (radioCustomDeadtime->isChecked()) {
int64_t deadtime = spinCustomDeadTime->value();
LOG(logINFO)
<< "Setting Rate Correction with custom dead time: "
LOG(logINFO) << "Setting Rate Correction with custom dead time: "
<< deadtime;
det->setRateCorrection(sls::ns(deadtime));
}
// default dead time
else {
LOG(logINFO)
<< "Setting Rate Correction with default dead time";
LOG(logINFO) << "Setting Rate Correction with default dead time";
det->setDefaultRateCorrection();
}
}
@ -398,8 +396,7 @@ void qTabDataOutput::SetFlags() {
auto mode =
comboEigerParallelFlag->currentIndex() == PARALLEL ? true : false;
try {
LOG(logINFO)
<< "Setting Readout Flags to "
LOG(logINFO) << "Setting Readout Flags to "
<< comboEigerParallelFlag->currentText().toAscii().data();
det->setParallelMode(mode);
}

View File

@ -1,6 +1,6 @@
#include "qTabDebugging.h"
#include "qDefs.h"
#include "ToString.h"
#include "qDefs.h"
#include <QDesktopWidget>
#include <QGridLayout>
#include <QTreeWidget>
@ -105,8 +105,9 @@ void qTabDebugging::GetInfo() {
treeDet->setHeaderLabel("Eiger Detector");
// get num modules
for (int i = 0; i < comboDetector->count() / 2; ++i)
items.append(new QTreeWidgetItem(
(QTreeWidget *)nullptr, QStringList(QString("Module %1").arg(i))));
items.append(
new QTreeWidgetItem((QTreeWidget *)nullptr,
QStringList(QString("Module %1").arg(i))));
treeDet->insertTopLevelItems(0, items);
// gets det names
for (int i = 0; i < comboDetector->count(); ++i) {

View File

@ -771,8 +771,7 @@ void qTabMeasurement::AcquireFinished() {
if (startingFnumImplemented) {
GetStartingFrameNumber();
}
LOG(logDEBUG) << "Measurement " << currentMeasurement
<< " finished";
LOG(logDEBUG) << "Measurement " << currentMeasurement << " finished";
// next measurement if acq is not stopped
if (!isAcquisitionStopped &&
((currentMeasurement + 1) < numMeasurements)) {
@ -801,8 +800,9 @@ void qTabMeasurement::Enable(bool enable) {
frameNotTimeResolved->setEnabled(enable);
// shortcut each time, else it doesnt work a second time
btnStart->setShortcut(QApplication::translate(
"TabMeasurementObject", "Shift+Space", nullptr, QApplication::UnicodeUTF8));
btnStart->setShortcut(QApplication::translate("TabMeasurementObject",
"Shift+Space", nullptr,
QApplication::UnicodeUTF8));
}
void qTabMeasurement::Refresh() {

View File

@ -6,7 +6,6 @@
#include <QStackedLayout>
#include <QStandardItemModel>
QString qTabPlot::defaultPlotTitle("");
QString qTabPlot::defaultHistXAxisTitle("Channel Number");
QString qTabPlot::defaultHistYAxisTitle("Counts");
@ -290,16 +289,14 @@ void qTabPlot::SetBinary() {
bool binary1D = chkBinary->isChecked();
bool binary2D = chkBinary_2->isChecked();
if (is1d) {
LOG(logINFO) << "Binary Plot "
<< (binary1D ? "enabled" : "disabled");
LOG(logINFO) << "Binary Plot " << (binary1D ? "enabled" : "disabled");
lblFrom->setEnabled(binary1D);
lblTo->setEnabled(binary1D);
spinFrom->setEnabled(binary1D);
spinTo->setEnabled(binary1D);
plot->SetBinary(binary1D, spinFrom->value(), spinTo->value());
} else {
LOG(logINFO) << "Binary Plot "
<< (binary2D ? "enabled" : "disabled");
LOG(logINFO) << "Binary Plot " << (binary2D ? "enabled" : "disabled");
lblFrom_2->setEnabled(binary2D);
lblTo_2->setEnabled(binary2D);
spinFrom_2->setEnabled(binary2D);
@ -434,9 +431,9 @@ void qTabPlot::SetXYRange() {
for (int i = 0; i < 4; ++i) {
if (chkVal[i] && !dispVal[i].isEmpty()) {
double val = dispVal[i].toDouble();
LOG(logDEBUG)
<< "Setting "
<< qDefs::getRangeAsString(static_cast<qDefs::range>(i))
LOG(logDEBUG) << "Setting "
<< qDefs::getRangeAsString(
static_cast<qDefs::range>(i))
<< " to " << val;
xyRange[i] = val;
isRange[i] = true;
@ -482,10 +479,10 @@ void qTabPlot::MaintainAspectRatio(int dimension) {
ranges[qDefs::YMAX] = plot->GetYMaximum();
double idealAspectratio = (ranges[qDefs::XMAX] - ranges[qDefs::XMIN]) /
(ranges[qDefs::YMAX] - ranges[qDefs::YMIN]);
LOG(logDEBUG) << "Ideal Aspect ratio: " << idealAspectratio
<< " for x(" << ranges[qDefs::XMIN] << " - "
<< ranges[qDefs::XMAX] << "), y(" << ranges[qDefs::YMIN]
<< " - " << ranges[qDefs::YMAX] << ")";
LOG(logDEBUG) << "Ideal Aspect ratio: " << idealAspectratio << " for x("
<< ranges[qDefs::XMIN] << " - " << ranges[qDefs::XMAX]
<< "), y(" << ranges[qDefs::YMIN] << " - "
<< ranges[qDefs::YMAX] << ")";
// calculate current aspect ratio
ranges[qDefs::XMIN] = dispXMin->text().toDouble();
@ -494,10 +491,10 @@ void qTabPlot::MaintainAspectRatio(int dimension) {
ranges[qDefs::YMAX] = dispYMax->text().toDouble();
double currentAspectRatio = (ranges[qDefs::XMAX] - ranges[qDefs::XMIN]) /
(ranges[qDefs::YMAX] - ranges[qDefs::YMIN]);
LOG(logDEBUG) << "Current Aspect ratio: " << currentAspectRatio
<< " for x(" << ranges[qDefs::XMIN] << " - "
<< ranges[qDefs::XMAX] << "), y(" << ranges[qDefs::YMIN]
<< " - " << ranges[qDefs::YMAX] << ")";
LOG(logDEBUG) << "Current Aspect ratio: " << currentAspectRatio << " for x("
<< ranges[qDefs::XMIN] << " - " << ranges[qDefs::XMAX]
<< "), y(" << ranges[qDefs::YMIN] << " - "
<< ranges[qDefs::YMAX] << ")";
if (currentAspectRatio != idealAspectratio) {
// dimension: 1(x changed: y adjusted), 0(y changed: x adjusted),

View File

@ -1,6 +1,6 @@
#include "qTabSettings.h"
#include "qDefs.h"
#include "ToString.h"
#include "qDefs.h"
#include <QStandardItemModel>
qTabSettings::qTabSettings(QWidget *parent, sls::Detector *detector)

View File

@ -344,9 +344,8 @@ uint32_t Listener::ListenToAnImage(char *buf) {
// copy packet
switch (myDetectorType) {
// for gotthard, 1st packet: 4 bytes fnum, CACA
// + CACA, 639*2 bytes data 2nd packet: 4 bytes
// fnum, previous 1*2 bytes
// data + 640*2 bytes data !!
// + CACA, 639*2 bytes data 2nd packet: 4
// bytes fnum, previous 1*2 bytes data + 640*2 bytes data !!
case GOTTHARD:
if (!pnum)
memcpy(buf + fifohsize, &carryOverPacket[hsize + 4], dsize - 2);
@ -515,9 +514,8 @@ uint32_t Listener::ListenToAnImage(char *buf) {
// copy packet
switch (myDetectorType) {
// for gotthard, 1st packet: 4 bytes fnum, CACA
// + CACA, 639*2 bytes data 2nd packet: 4 bytes
// fnum, previous 1*2 bytes
// data + 640*2 bytes data !!
// + CACA, 639*2 bytes data 2nd packet: 4
// bytes fnum, previous 1*2 bytes data + 640*2 bytes data !!
case GOTTHARD:
if (!pnum)
memcpy(buf + fifohsize + (pnum * dsize),