Changeset 13224 for trunk


Ignore:
Timestamp:
03/26/12 08:48:53 (13 years ago)
Author:
tbretz
Message:
Made the number of requests during calibration an option.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/feedback.cc

    r13178 r13224  
    124124
    125125    uint16_t fCurrentRequestInterval;
     126    uint16_t fNumCalibIgnore;
     127    uint16_t fNumCalibRequests;
    126128
    127129    bool fOutputEnabled;
     
    250252            return;
    251253
    252         if (fCursorCur<100)
     254        if (fCursorCur<fNumCalibRequests)
    253255        {
    254256            if (fStatusBias.second==BIAS::kVoltageOn)
     
    271273        fOutputEnabled = false;
    272274        fControlType = kIdle;
     275
     276        Info("Calibration successfully done.");
    273277
    274278        if (fStatusBias.second==BIAS::kVoltageOn)
     
    921925        fBiasOffset = -2;
    922926        fControlType = kTemp;
    923         fCursorCur  = -10;
    924         fCursorTemp =  0;
     927        fCursorCur  = -fNumCalibIgnore;
    925928        fCursorTemp = 0;
    926929        fCurrentsAvg.assign(BIAS::kNumChannels, 0);
     
    10211024            if (fControlType==kTemp)
    10221025            {
    1023                 if (GetCurrentState()==kStateCalibrating && fCursorCur<100)
     1026                if (GetCurrentState()==kStateCalibrating && fCursorCur<fNumCalibRequests)
    10241027                    return GetCurrentState();
    10251028
     
    10751078        fKp(0), fKi(0), fKd(0), fT(-1),
    10761079        fCurrentRequestInterval(0),
     1080        fNumCalibIgnore(30),
     1081        fNumCalibRequests(300),
    10771082        fOutputEnabled(false)
    10781083    {
     
    12321237
    12331238        fCurrentRequestInterval = conf.Get<uint16_t>("current-request-interval");
     1239        fNumCalibIgnore  = conf.Get<uint16_t>("num-calib-ignore");
     1240        fNumCalibRequest = conf.Get<uint16_t>("num-calib-average");
    12341241
    12351242        return -1;
     
    12531260        ("pixel-map-file",  var<string>("FACTmapV5a.txt"), "Pixel mapping file. Used here to get the default reference voltage.")
    12541261        ("current-request-interval",  var<uint16_t>(1000), "Interval between two current requests.")
     1262        ("num-calib-ignore",  var<uint16_t>(30), "Number of current requests to be ignored before averaging")
     1263        ("num-calib-average",  var<uint16_t>(300), "Number of current requests to be averaged")
    12551264        ;
    12561265
Note: See TracChangeset for help on using the changeset viewer.