Changeset 14452 for trunk/FACT++/src


Ignore:
Timestamp:
10/02/12 21:39:30 (12 years ago)
Author:
tbretz
Message:
Removed the obsolete fEnabled. Now somthing can only be stopped but not restarted; fixed the problem that by default the ratecontrol was not switched on anymore
File:
1 edited

Legend:

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

    r14439 r14452  
    5252
    5353    bool fVerbose;
    54     bool fEnabled;
    5554
    5655    uint64_t fCounter;
     
    379378    }
    380379
    381     int StartRC()
    382     {
    383         fEnabled = true;
    384         return GetCurrentState();
    385     }
    386 
    387380    int StopRC()
    388381    {
    389         fEnabled = false;
    390         return GetCurrentState();
     382        return RateControl::State::kConnected;
    391383    }
    392384
     
    441433            return RateControl::State::kDisconnected;
    442434
    443         const bool inprog = fEnabled && fTriggerOn && fDimRS.state()<RateScan::State::kConfiguring;
     435        const bool inprog = fTriggerOn && fDimRS.state()<RateScan::State::kConfiguring;
    444436
    445437        switch (GetCurrentState())
     
    465457        fDimFTM("FTM_CONTROL"),
    466458        fDimRS("RATE_SCAN"),
    467         fDimThreshold("RATE_CONTROL/THRESHOLD", "S:1", "Resulting threshold after calibration|threshold[dac]:Resulting threshold from calibration"),
    468         fEnabled(false)
     459        fDimThreshold("RATE_CONTROL/THRESHOLD", "S:1", "Resulting threshold after calibration|threshold[dac]:Resulting threshold from calibration")
    469460    {
    470461        // ba::io_service::work is a kind of keep_alive for the loop.
     
    507498            ("Start a search for a reasonable minimum global threshold");
    508499
    509         AddEvent("START", "", RateControl::State::kConnected, RateControl::State::kGlobalThresholdSet)
    510             (bind(&StateMachineRateControl::StartRC, this))
    511             ("Enable rate control (it will start when the trigger is on and a calibration was successfull)");
    512 
    513500        AddEvent("STOP", "", RateControl::State::kSettingGlobalThreshold, RateControl::State::kInProgress)
    514501            (bind(&StateMachineRateControl::StopRC, this))
    515             ("Stop rat control");
     502            ("Stop a calibration or ratescan in progress");
    516503
    517504        AddEvent("SET_MIN_THRESHOLD", "I:1")
Note: See TracChangeset for help on using the changeset viewer.