Changeset 19924


Ignore:
Timestamp:
Jan 16, 2020, 5:36:04 PM (6 weeks ago)
Author:
tbretz
Message:
Set Temp Limit to 60°C
File:
1 edited

Legend:

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

    r19923 r19924  
    3636    uint16_t fTempMax;
    3737
    38     uint16_t fTempExceeded55;
     38    uint16_t fTempExceeded;
     39    float    fTempLimit;
    3940
    4041    size_t fNumConsecutiveErrors;   // Number of consecutive messages with errors
     
    284285
    285286        if (tempgt50)
    286             fTempExceeded55++;
     287            fTempExceeded++;
    287288        else
    288             fTempExceeded55 = 0;
    289 
    290         if (fTempExceeded55==3)
    291         {
    292             Error("EMERGENCY: This is the third time in a row that any of the tempereture sensors exceeds 50 degC.");
     289            fTempExceeded = 0;
     290
     291        if (fTempExceeded==3)
     292        {
     293            Error("EMERGENCY: This is the third time in a row that any of the tempereture sensors exceeds "+to_string(fTempLimit)+" degC.");
    293294            Dim::SendCommandNB("BIAS_CONTROL/VOLTAGE_OFF");
    294295            Error("Sending 'BIAS_CONTROL/VOLTAGE_OFF'.");
     
    607608    ConnectionFSC(ba::io_service& ioservice, MessageImp &imp) : Connection(ioservice, imp()),
    608609        fIsVerbose(false), fIsAutoReconnect(false),
    609         fTempMin(0), fTempMax(65535), fTempExceeded55(0),
     610        fTempMin(0), fTempMax(65535), fTempExceeded(0), fTempLimit(60),
    610611        fReconnectTimeout(ioservice)
    611612    {
     
    636637    {
    637638        fTempMax = max;
     639    }
     640
     641    void SetTempLimit(const float &lim)
     642    {
     643        fTempLimit = lim;
    638644    }
    639645
     
    925931        fFSC.SetVerbose(!conf.Get<bool>("quiet"));
    926932
     933        fFSC.SetTempLimit(60);
     934        T::Info(Tools::Form("Overheating temperature limit set to "+to_string(60)+" degC"));
     935
    927936        fFSC.SetTempMin(conf.Get<uint16_t>("temp-adc-min"));
    928937        fFSC.SetTempMax(conf.Get<uint16_t>("temp-adc-max"));
Note: See TracChangeset for help on using the changeset viewer.