mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 15:20:02 +02:00
WIP
This commit is contained in:
parent
fc2cc7e00c
commit
975076043f
@ -145,7 +145,7 @@ class qDrawPlot : public QWidget {
|
||||
unsigned int nHists{1};
|
||||
double *datax1d{nullptr};
|
||||
std::vector<double *> datay1d;
|
||||
double *data2d;
|
||||
double *data2d{nullptr};
|
||||
|
||||
//options
|
||||
bool isPlot{true};
|
||||
|
@ -229,6 +229,8 @@ void qDetectorMain::SetUpWidgetWindow() {
|
||||
heightCentralWidget = centralwidget->size().height();
|
||||
// Default zoom Tool Tip
|
||||
zoomToolTip = dockWidgetPlot->toolTip();
|
||||
|
||||
Initialization();
|
||||
}
|
||||
|
||||
void qDetectorMain::SetUpDetector(const std::string fName, int multiID) {
|
||||
@ -273,8 +275,6 @@ void qDetectorMain::SetUpDetector(const std::string fName, int multiID) {
|
||||
//FIXME: not needed anymore due to client creating socket each time
|
||||
//myDet->setOnline(slsDetectorDefs::ONLINE_FLAG);
|
||||
//myDet->setReceiverOnline(slsDetectorDefs::ONLINE_FLAG);
|
||||
|
||||
Initialization();
|
||||
}
|
||||
|
||||
void qDetectorMain::Initialization() {
|
||||
|
@ -111,8 +111,8 @@ void qDrawPlot::SetupWidgetWindow() {
|
||||
fileSaveName = "Image";
|
||||
}
|
||||
|
||||
SetupStatistics();
|
||||
SetupPlots();
|
||||
SetupStatistics();
|
||||
SetDataCallBack(true);
|
||||
myDet->registerAcquisitionFinishedCallback(&(GetAcquisitionFinishedCallBack), this);
|
||||
myDet->registerProgressCallback(&(GetProgressCallBack), this);
|
||||
|
@ -178,11 +178,11 @@ void qTabDeveloper::CreateDACWidgets() {
|
||||
dacLayout = new QGridLayout(boxDacs);
|
||||
|
||||
for (int i = 0; i < numDACWidgets; ++i) {
|
||||
lblDacs[i] = new QLabel(QString(dacNames[i].c_str()), boxDacs);
|
||||
spinDacs[i] = new MyDoubleSpinBox(i, boxDacs);
|
||||
lblDacs.push_back(new QLabel(QString(dacNames[i].c_str()), boxDacs));
|
||||
spinDacs.push_back(new MyDoubleSpinBox(i, boxDacs));
|
||||
spinDacs[i]->setMinimum(-1);
|
||||
spinDacs[i]->setMaximum(10000);
|
||||
lblDacsmV[i] = new QLabel("", boxDacs);
|
||||
lblDacsmV.push_back(new QLabel("", boxDacs));
|
||||
|
||||
dacLayout->addWidget(lblDacs[i], (int)(i / 2), ((i % 2) == 0) ? 1 : 5);
|
||||
dacLayout->addWidget(spinDacs[i], (int)(i / 2), ((i % 2) == 0) ? 2 : 6);
|
||||
@ -210,8 +210,8 @@ void qTabDeveloper::CreateADCWidgets() {
|
||||
QGridLayout *adcLayout = new QGridLayout(boxAdcs);
|
||||
|
||||
for (int i = 0; i < numADCWidgets; ++i) {
|
||||
lblAdcs[i] = new QLabel(QString(adcNames[i].c_str()), boxAdcs);
|
||||
spinAdcs[i] = new QLineEdit(boxAdcs);
|
||||
lblAdcs.push_back(new QLabel(QString(adcNames[i].c_str()), boxAdcs));
|
||||
spinAdcs.push_back(new QLineEdit(boxAdcs));
|
||||
spinAdcs[i]->setReadOnly(true);
|
||||
|
||||
adcLayout->addWidget(lblAdcs[i], (int)(i / 2), ((i % 2) == 0) ? 1 : 4);
|
||||
|
@ -224,7 +224,7 @@ void qTabMeasurement::SetTimingMode(int val) {
|
||||
void qTabMeasurement::GetNumMeasurements() {
|
||||
FILE_LOG(logDEBUG) << "Getting number of measurements";
|
||||
disconnect(spinNumMeasurements, SIGNAL(valueChanged(int)), this, SLOT(SetNumMeasurements(int)));
|
||||
spinNumFrames->setValue(myPlot->GetNumMeasurements());
|
||||
spinNumMeasurements->setValue(myPlot->GetNumMeasurements());
|
||||
connect(spinNumMeasurements, SIGNAL(valueChanged(int)), this, SLOT(SetNumMeasurements(int)));
|
||||
}
|
||||
|
||||
@ -606,7 +606,7 @@ void qTabMeasurement::Refresh() {
|
||||
GetExposureTime();
|
||||
GetAcquisitionPeriod();
|
||||
GetNumTriggers();
|
||||
if (delayImplemented) {
|
||||
if (delayImplemented) {cprintf(BLUE, "Delay implemented\n");
|
||||
GetDelay();
|
||||
}
|
||||
if (sampleImplemented) {
|
||||
|
@ -4185,6 +4185,7 @@ int multiSlsDetector::acquire() {
|
||||
multi_shm()->stoppedFlag = 1;
|
||||
}
|
||||
// let processing thread listen to these packets
|
||||
if (multi_shm()->stoppedFlag == 0)
|
||||
sem_post(&sem_newRTAcquisition);
|
||||
}
|
||||
|
||||
@ -4192,8 +4193,8 @@ int multiSlsDetector::acquire() {
|
||||
startAndReadAll();
|
||||
|
||||
// stop receiver
|
||||
std::lock_guard<std::mutex> lock(mg);
|
||||
if (receiver) {
|
||||
std::lock_guard<std::mutex> lock(mg);
|
||||
if (stopReceiver() == FAIL) {
|
||||
multi_shm()->stoppedFlag = 1;
|
||||
} else {
|
||||
@ -4203,10 +4204,8 @@ int multiSlsDetector::acquire() {
|
||||
// external process to be
|
||||
// done sending data to gui
|
||||
}
|
||||
}
|
||||
|
||||
incrementFileIndex();
|
||||
|
||||
}
|
||||
|
||||
// waiting for the data processing thread to finish!
|
||||
setJoinThreadFlag(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user