Changeset 14326


Ignore:
Timestamp:
08/08/12 06:54:51 (12 years ago)
Author:
neise
Message:
added if IsConnected 
File:
1 edited

Legend:

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

    r14325 r14326  
    6464void PostStatusRequest()
    6565{
    66     PostMessage(string("*IDN?\n"));
    67     PostMessage(string("meas:volt?\n"));
    68     PostMessage(string("meas:curr?\n"));
     66    if (IsConnected())
     67    {
     68        PostMessage(string("*IDN?\n"));
     69        PostMessage(string("meas:volt?\n"));
     70        PostMessage(string("meas:curr?\n"));
     71    }
    6972}
    7073
     
    267270        // check if the previous 'outp off' is some time ago
    268271        if (fAntiFloddingTimer.expires_at() < ba::deadline_timer::traits_type::now())
    269         {
    270             PostMessage(string("outp on\n"));
     272        {   
     273            if (IsConnected()) PostMessage(string("outp on\n"));
    271274        }
    272275    }
    273276    else
    274277    {
    275         PostMessage(string("outp off\n"));
     278        if (IsConnected()) PostMessage(string("outp off\n"));
    276279        // start a Timer, which runs out in 60sec making sure, that the
    277280        // camera can't be switched off&on on short time scales.
Note: See TracChangeset for help on using the changeset viewer.