mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
dacs and adcs work
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@27 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
@ -128,8 +128,8 @@ void qTabDeveloper::SetupWidgetWindow(){
|
||||
void qTabDeveloper::Initialization(){
|
||||
connect(adcTimer, SIGNAL(timeout()), this, SLOT(RefreshAdcs()));
|
||||
|
||||
//for(int i=0;i<NUM_DAC_WIDGETS;i++){
|
||||
//connect(spinDacs[i], SIGNAL(editingFinished()), this, SLOT(SetFileSteps()));
|
||||
for(int i=0;i<NUM_DAC_WIDGETS;i++)
|
||||
connect(spinDacs[i], SIGNAL(editingFinished(int)), this, SLOT(SetDacValues(int)));
|
||||
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ void qTabDeveloper::CreateDACWidgets(){
|
||||
|
||||
for(int i=0;i<NUM_DAC_WIDGETS;i++){
|
||||
lblDacs[i] = new QLabel(QString(dacNames[i].c_str()),boxDacs);
|
||||
spinDacs[i] = new QDoubleSpinBox(boxDacs);
|
||||
spinDacs[i] = new MyDoubleSpinBox(i,boxDacs);
|
||||
spinDacs[i]->setMaximum(10000);
|
||||
|
||||
dacLayout->addWidget(lblDacs[i],(int)(i/2),((i%2)==0)?1:4);
|
||||
@ -181,6 +181,18 @@ void qTabDeveloper::CreateADCWidgets(){
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabDeveloper::SetDacValues(int id){
|
||||
#ifdef VERYVERBOSE
|
||||
cout << "Setting dac:" <<dacNames[id] << " : " << spinDacs[id]->value() << endl;
|
||||
#endif
|
||||
|
||||
spinDacs[id]->setValue(myDet->setDAC(spinDacs[id]->value(),getSLSIndex(id)));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
slsDetectorDefs::dacIndex qTabDeveloper::getSLSIndex(int index){
|
||||
switch(detType){
|
||||
case slsDetectorDefs::MYTHEN:
|
||||
|
Reference in New Issue
Block a user