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