Changeset 15116 for trunk/FACT++/scripts


Ignore:
Timestamp:
03/18/13 21:23:54 (12 years ago)
Author:
tbretz
Message:
Small change in the order... for a little speed improvement.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/scripts/CheckUnderflow.js

    r15094 r15116  
    7979    //console.out("Most probablay the camera has not been checked for underflows yet.");
    8080
     81    var service_event = new Subscription("FAD_CONTROL/EVENT_DATA");
     82
    8183    dim.send("FAD_CONTROL/START_DRS_CALIBRATION");
    8284    dim.send("FAD_CONTROL/SET_FILE_FORMAT", 0);
    83 
    84     var service_event = new Subscription("FAD_CONTROL/EVENT_DATA");
    85     var event = service_event.get(5000, false);
    8685
    8786    // This needs a better solution! The problem is that the
     
    9190    // events. Thus there is no real guarantee that we do not receive
    9291    // data of the previous run after we have started a new one.
    93     dim.wait("Connected", 10000);
     92    dim.wait("FAD_CONTROL", "Connected", 10000);
    9493    v8.sleep(1000); // Let 'timeout' in SendRawData pass
    9594
     95    var event = service_event.get(5000, false);
    9696    var event_counter = event.counter;
    9797
    9898    console.out("Starting drs-gain");
    99     dim.send("MCP/START", -1, 5, "drs-gain");
     99    dim.send("MCP/START", -1, 3, "drs-gain");
    100100
    101101    console.out("Waiting for new event");
     
    103103    var d = new Date();
    104104    v8.timeout(10000, function() { if (service_event.get(0, false).counter>event_counter) return true; });
     105    //while (service_event.get(0, false).counter<=event_counter)
     106    //    v8.sleep();
    105107
    106108    console.out("Event received: "+(new Date()-d)+"ms");
Note: See TracChangeset for help on using the changeset viewer.