Changeset 13136 for trunk/FACT++


Ignore:
Timestamp:
03/18/12 21:55:05 (13 years ago)
Author:
tbretz
Message:
Made sure that the first automatic status request at connection also happens when the automatic updates are switched off; do not send a voltage set command when the voltages are already set.
File:
1 edited

Legend:

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

    r13134 r13136  
    5858    uint16_t fSyncTime;
    5959
    60     bool fIsInitializing;
     60    int fIsInitializing;
    6161    bool fIsRamping;
    6262    int  fWaitingForAnswer;
     
    355355        {
    356356            Message("Stream successfully synchronized.");
    357             fIsInitializing = false;
     357            fIsInitializing = 2;
    358358
    359359            // Cancel sending of the next 0
     
    524524        if (error==ba::error::basic_errors::operation_aborted)
    525525        {
    526             if (fIsInitializing)
     526            if (fIsInitializing==1)
    527527                Warn("Synchronization aborted...");
    528             else
    529                 Info("Synchronization successfull.");
     528            // case 0 and 2 should not happen
    530529            return;
    531530        }
     
    593592        fWrapCounter    = -1;
    594593        fGlobalDacCmd   = -1;
    595         fIsInitializing = true;
     594        fIsInitializing =  1;
    596595        fIsRamping      = false;
    597596
     
    630629            return;
    631630
    632         if (fUpdateTime==0)
     631        if (fUpdateTime==0 && fIsInitializing!=2)
    633632            return;
    634633
     
    637636        else
    638637            ReadAllChannels(true);
     638
     639        fIsInitializing = 0;
    639640    }
    640641
     
    712713        }
    713714
    714         SetAllChannels(dac);
    715 
    716715        if (identical)
    717716            Info("Ramping: target values reached.");
     717        else
     718            SetAllChannels(dac);
    718719
    719720        return !identical;
Note: See TracChangeset for help on using the changeset viewer.