Changeset 13718


Ignore:
Timestamp:
05/14/12 14:39:02 (12 years ago)
Author:
tbretz
Message:
Implemented blocking which makes sure that if only a single channel's threshold is set it is not set twice without break. Due to a firmware bug the FTU would stop counting otherwise and we always get the same rate.
File:
1 edited

Legend:

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

    r13549 r13718  
    4848    bool fTriggerOn;
    4949
     50    vector<bool> fBlock;
     51
    5052    DimServiceInfoList fNetwork;
    5153
     
    154156        const uint32_t val[2] = { idx,  diff };
    155157        DimClient::sendCommandNB("FTM_CONTROL/SET_THRESHOLD", (void*)val, 8);
     158
     159        fBlock[idx] = true;
    156160    }
    157161
     
    214218            }
    215219
     220            vector<bool> block(160);
     221
    216222            for (int j=0; j<4; j++)
    217223            {
     224                if (fBlock[i*4+j])
     225                {
     226                    fBlock[i*4+j] = false;
     227                    continue;
     228                }
     229
    218230                // For the noise pixel correct down to median+3*deviation
    219231                if (maxi==j)
     
    532544public:
    533545    StateMachineRateControl(ostream &out=cout) : StateMachineDim(out, "RATE_CONTROL"),
    534         fTriggerOn(false),
     546        fTriggerOn(false), fBlock(160),
    535547        fStatusDim(make_pair(Time(), -2)),
    536548        fStatusFTM(make_pair(Time(), -2)),
Note: See TracChangeset for help on using the changeset viewer.