Changeset 12271 for trunk/FACT++/src


Ignore:
Timestamp:
10/25/11 19:59:52 (13 years ago)
Author:
tbretz
Message:
Added the possibility to apply a global offset to the temperature controlled feedback values
File:
1 edited

Legend:

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

    r12234 r12271  
    9696    double fT21;
    9797
     98    double fBiasOffset;
     99
    98100    bool fOutputEnabled;
    99101
     
    186188
    187189
    188             const float diff = (avg-25)*0.057;
     190            const float diff = (avg-25)*4./70 + fBiasOffset;
    189191
    190192            vector<float> vec(2*BIAS::kNumChannels);
     
    534536    }
    535537
    536     int StartTempCtrl()
    537     {
     538    int StartTempCtrl(const EventImp &evt)
     539    {
     540        if (!CheckEventSize(evt.GetSize(), "StartTempCtrl", 4))
     541            return kSM_FatalError;
     542
     543        fBiasOffset = evt.GetFloat();
    538544        fCameraTemp = new DimStampedInfo("FSC_CONTROL/TEMPERATURE", (void*)NULL, 0, this);
     545
     546        ostringstream out;
     547        out << "Starting temperature feedback with an offset of " << fBiasOffset << "V";
     548        Message(out);
    539549
    540550        return GetCurrentState();
     
    690700            ("Start the feedback control loop");
    691701
    692         AddEvent("START_TEMP_CONTROL", kStateConnected)
    693             (bind(&StateMachineFeedback::StartTempCtrl, this))
     702        AddEvent("START_TEMP_CONTROL", "F:1", kStateConnected)
     703            (bind(&StateMachineFeedback::StartTempCtrl, this, placeholders::_1))
    694704            ("Start the temperature control loop");
    695705
Note: See TracChangeset for help on using the changeset viewer.