Changeset 11935
- Timestamp:
- 09/01/11 17:45:15 (13 years ago)
- Location:
- trunk/FACT++/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/MainWindow.cc
r11925 r11935 567 567 void MainWindow::on_fBiasVoltDac_valueChanged(int val) 568 568 { 569 fBiasVolt->setValue(val*90/4096); 570 /* 571 if (fBiasApplyGlobal->isChecked()) 569 fBiasVolt->setValue(val*90./4096); 570 } 571 572 void MainWindow::on_fBiasRequestStatus_clicked() 573 { 574 if (!fInHandler) 575 Dim::SendCommand("BIAS_CONTROL/REQUEST_STATUS"); 576 } 577 578 void MainWindow::on_fBiasApplyReference_clicked() 579 { 580 if (!fInHandler) 581 Dim::SendCommand("BIAS_CONTROL/SET_GAPD_REFERENCE_VOLTAGE"); 582 } 583 584 void MainWindow::on_fBiasSetToZero_clicked() 585 { 586 if (!fInHandler) 587 Dim::SendCommand("BIAS_CONTROL/SET_ZERO_VOLTAGE"); 588 } 589 590 void MainWindow::on_fBiasReset_clicked() 591 { 592 if (!fInHandler) 593 Dim::SendCommand("BIAS_CONTROL/RESET_OVER_CURRENT_STATUS"); 594 } 595 596 void MainWindow::on_fBiasApply_clicked() 597 { 598 const uint16_t cmd[2] = 572 599 { 573 Dim::SendCommand("BIAS_CONTROL/SET_GLOBAL_DAC", uint16_t(val)); 574 return; 575 } 576 577 const int b = fBiasHvBoard->value(); 578 const int c = fBiasHvChannel->value(); 579 580 const uint16_t ihw = b*32+c; 581 582 const uint16_t dat[2] = { ihw, uint16_t(val) }; 583 Dim::SendCommand("BIAS_CONTROL/SET_CHANNEL_DAC", dat);*/ 584 } 585 586 void MainWindow::on_fBiasRequestStatus_clicked() 587 { 588 Dim::SendCommand("BIAS_CONTROL/REQUEST_STATUS"); 589 } 590 591 void MainWindow::on_fBiasApplyReference_clicked() 592 { 593 // Dim::SendCommand("BIAS_CONTROL/APPLY_REFERENCE_VOLTAGE"); 594 } 595 596 void MainWindow::on_fBiasSetToZero_clicked() 597 { 598 // Dim::SendCommand("BIAS_CONTROL/SET_GLOBAL_DAC", uint16_t(0)); 599 } 600 601 void MainWindow::on_fBiasReset_clicked() 602 { 603 // Dim::SendCommand("BIAS_CONTROL/RESET"); 600 uint16_t(fBiasHvBoard->value()*32+fBiasHvChannel->value()), 601 uint16_t(fBiasVoltDac->value()) 602 }; 603 604 if (!fInHandler) 605 Dim::SendCommand("BIAS_CONTROL/SET_CHANNEL_DAC", cmd); 606 } 607 void MainWindow::on_fBiasApplyGlobal_clicked() 608 { 609 if (!fInHandler) 610 Dim::SendCommand("BIAS_CONTROL/SET_GLOBAL_DAC", uint16_t(fBiasVoltDac->value())); 604 611 } 605 612 -
trunk/FACT++/gui/MainWindow.h
r11925 r11935 172 172 173 173 void on_fBiasRequestStatus_clicked(); 174 void on_fBiasApply_clicked(); 175 void on_fBiasApplyGlobal_clicked(); 174 176 void on_fBiasApplyReference_clicked(); 175 177 void on_fBiasSetToZero_clicked();
Note:
See TracChangeset
for help on using the changeset viewer.