Changeset 11949


Ignore:
Timestamp:
09/02/11 12:50:08 (13 years ago)
Author:
tbretz
Message:
Added some controls in the bias tab to increase/decrease the voltage globally
Location:
trunk/FACT++/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/MainWindow.cc

    r11935 r11949  
    570570}
    571571
     572void MainWindow::on_fBiasOffsetDac_valueChanged(int val)
     573{
     574    fBiasOffsetVolt->setValue(val*90./4096);
     575}
     576
    572577void MainWindow::on_fBiasRequestStatus_clicked()
    573578{
     
    592597    if (!fInHandler)
    593598        Dim::SendCommand("BIAS_CONTROL/RESET_OVER_CURRENT_STATUS");
     599}
     600
     601void MainWindow::on_fBiasDecrease_clicked()
     602{
     603    if (!fInHandler)
     604        Dim::SendCommand("BIAS_CONTROL/DECREASE_GLOBAL_DAC", uint16_t(fBiasOffsetDac->value()));
     605}
     606
     607void MainWindow::on_fBiasIncrease_clicked()
     608{
     609    if (!fInHandler)
     610        Dim::SendCommand("BIAS_CONTROL/INCREASE_GLOBAL_DAC", -int16_t(fBiasOffsetDac->value()));
     611}
     612
     613void MainWindow::on_fBiasApplyOffset_clicked()
     614{
     615    if (!fInHandler)
     616        Dim::SendCommand("BIAS_CONTROL/SET_GAPD_REFERENCE_OFFSET", fBiasOffsetDac->value()*90./4096);
    594617}
    595618
  • trunk/FACT++/gui/MainWindow.h

    r11935 r11949  
    164164    void on_fBiasCamPixel_valueChanged(int)  { BiasCamChannelChanged(); }
    165165    void on_fBiasVoltDac_valueChanged(int);
     166    void on_fBiasOffsetDac_valueChanged(int);
    166167
    167168    void on_fBiasVoltMin_valueChanged(int); // FIXME: Could be set as slot in the designer
     
    177178    void on_fBiasSetToZero_clicked();
    178179    void on_fBiasReset_clicked();
     180    void on_fBiasDecrease_clicked();
     181    void on_fBiasIncrease_clicked();
     182    void on_fBiasApplyOffset_clicked();
    179183
    180184    virtual void on_fBiasDispRefVolt_stateChanged(int) = 0;
  • trunk/FACT++/gui/design.ui

    r11934 r11949  
    33023302               <string>Controls</string>
    33033303              </property>
    3304               <layout class="QHBoxLayout" name="horizontalLayout_46" stretch="0,0,0,0,0">
     3304              <layout class="QHBoxLayout" name="horizontalLayout_46" stretch="0,0,0,0,0,0">
    33053305               <item>
    33063306                <layout class="QGridLayout" name="gridLayout_87">
     
    36803680                   <property name="text">
    36813681                    <string>Global Apply</string>
     3682                   </property>
     3683                  </widget>
     3684                 </item>
     3685                </layout>
     3686               </item>
     3687               <item>
     3688                <layout class="QVBoxLayout" name="verticalLayout_18">
     3689                 <item>
     3690                  <widget class="QLabel" name="label_237">
     3691                   <property name="text">
     3692                    <string>Global voltage offset</string>
     3693                   </property>
     3694                  </widget>
     3695                 </item>
     3696                 <item>
     3697                  <widget class="QSpinBox" name="fBiasOffsetDac">
     3698                   <property name="alignment">
     3699                    <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
     3700                   </property>
     3701                   <property name="maximum">
     3702                    <number>4095</number>
     3703                   </property>
     3704                  </widget>
     3705                 </item>
     3706                 <item>
     3707                  <widget class="QDoubleSpinBox" name="fBiasOffsetVolt">
     3708                   <property name="alignment">
     3709                    <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
     3710                   </property>
     3711                   <property name="readOnly">
     3712                    <bool>true</bool>
     3713                   </property>
     3714                   <property name="buttonSymbols">
     3715                    <enum>QAbstractSpinBox::NoButtons</enum>
     3716                   </property>
     3717                   <property name="suffix">
     3718                    <string> V</string>
     3719                   </property>
     3720                   <property name="maximum">
     3721                    <double>90.000000000000000</double>
     3722                   </property>
     3723                  </widget>
     3724                 </item>
     3725                 <item>
     3726                  <layout class="QHBoxLayout" name="horizontalLayout_45">
     3727                   <item>
     3728                    <widget class="QPushButton" name="fBiasDecrease">
     3729                     <property name="text">
     3730                      <string>Decrease</string>
     3731                     </property>
     3732                    </widget>
     3733                   </item>
     3734                   <item>
     3735                    <widget class="QPushButton" name="fBiasIncrease">
     3736                     <property name="text">
     3737                      <string>Increase</string>
     3738                     </property>
     3739                    </widget>
     3740                   </item>
     3741                  </layout>
     3742                 </item>
     3743                 <item>
     3744                  <widget class="QPushButton" name="fBiasApplyOffset">
     3745                   <property name="text">
     3746                    <string>Set to G-APD ref + offset</string>
    36823747                   </property>
    36833748                  </widget>
Note: See TracChangeset for help on using the changeset viewer.