Changeset 15187


Ignore:
Timestamp:
03/30/13 11:50:31 (12 years ago)
Author:
tbretz
Message:
Adapted the detection of very low trigger rates to the changes in ftmctrl.
File:
1 edited

Legend:

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

    r15110 r15187  
    13881388    }
    13891389
     1390    /*
    13901391    int HandleFtmControlStateChange()
    13911392    {
     
    14001401
    14011402        return StateMachineImp::kSM_KeepState;
    1402     }
     1403    }*/
    14031404
    14041405
     
    14151416        const FTM::DimTriggerRates &dim = d.Ref<FTM::DimTriggerRates>();
    14161417
    1417         // New run started
    1418         if (dim.fTriggerRate<0)
    1419         {
    1420             fFtmControlTriggerRateTooLow = -1;
    1421             return GetCurrentState();
    1422         }
    1423 
    1424         // At the end of a run sometimes the trigger rate drops (the
    1425         // service is trasmitted) before the run is 'officially' finished
    1426         // by the MCP. Hence, we get a warning. So we have to require
    14271418        // two consecutive low rates.
    1428         if (dim.fTriggerRate<1)
    1429             fFtmControlTriggerRateTooLow++;
    1430         else
    1431             fFtmControlTriggerRateTooLow=0;
     1419        fFtmControlTriggerRateTooLow = (fFtmControlState&FTM::kFtmStates)==FTM::kRunning && dim.fTriggerRate<1;
    14321420
    14331421        const float *brates = dim.fBoardRate; // Board rate
     
    14841472        // If the FTM is in state Configuring, the clock conditioner
    14851473        // is always reported to be unlocked
    1486         if (d.GetQoS()!=2)
    1487             fFtmControlState = d.GetQoS();
     1474        fFtmControlState = d.GetQoS();
    14881475
    14891476        const FTM::DimStaticData &dat = d.Ref<FTM::DimStaticData>();
     
    23792366                           "Sensor temperature exceeds outside temperature by more than 9&deg;C");
    23802367
    2381         newerr |= SetError(fFtmControlTriggerRateTooLow>2 && fDimFtmControl.state()==FTM::State::kTriggerOn,
     2368        newerr |= SetError(fFtmControlTriggerRateTooLow>1,
    23822369                           "Trigger rate below 1Hz while trigger switched on");
    23832370
    2384         newerr |= SetError((fDimFtmControl.state()==FTM::State::kTriggerOn||fDimFtmControl.state()==FTM::State::kIdle) &&
    2385                            (fFtmControlState&FTM::kFtmLocked)==0,
     2371        newerr |= SetError(fFtmControlState!=FTM::kConfiguring && (fFtmControlState&FTM::kFtmLocked)==0,
    23862372                           "FTM - clock conditioner not locked!");
    23872373
Note: See TracChangeset for help on using the changeset viewer.