Changeset 13189 for trunk


Ignore:
Timestamp:
03/23/12 09:01:05 (13 years ago)
Author:
tbretz
Message:
Delay setting new volatges during current requests.
File:
1 edited

Legend:

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

    r13164 r13189  
    664664        fSendCounter += kNumChannels;
    665665
    666         if (fWaitingForAnswer>=0)
    667         {
    668             ostringstream msg;
    669             msg << "SetAllChannels while waiting for answer to last command (id=" << fWaitingForAnswer << ")";
    670             Warn(msg);
    671         }
    672 
    673666        PostMessage(data);
    674667        AsyncRead(ba::buffer(special ? fBuffer : fBufferRamp, kNumChannels*3),
     
    714707
    715708        if (identical)
     709        {
    716710            Info("Ramping: target values reached.");
    717         else
     711            return false;
     712        }
     713
     714        if (fWaitingForAnswer<0)
     715        {
    718716            SetAllChannels(dac);
    719 
    720         return !identical;
     717            return true;
     718        }
     719
     720        ostringstream msg;
     721        msg << "RampOneStep while waiting for answer to last command (id=" << fWaitingForAnswer << ")... ramp step delayed.";
     722        Warn(msg);
     723
     724        // Delay ramping
     725        ScheduleRampStep();
     726        return true;
    721727    }
    722728
     
    737743
    738744            PostClose(false);
     745            fIsRamping = false;
    739746            return;
    740747        }
     
    743750        {
    744751            Warn("Ramping in progress, but disconnected.");
     752            fIsRamping = false;
    745753            return;
    746754        }
Note: See TracChangeset for help on using the changeset viewer.