Changeset 18128 for trunk


Ignore:
Timestamp:
02/13/15 12:52:51 (10 years ago)
Author:
tbretz
Message:
Added the possibility to start a custom run.
File:
1 edited

Legend:

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

    r17926 r18128  
    133133        time = -1;
    134134
     135    var custom = typeof(type)=="function";
     136
    135137    var nextrun = sub_startrun.get().obj['next'];
    136     dim.log("Take run %3d".$(nextrun)+": N="+count+" T="+time+"s ["+type+"]");
     138    dim.log("Take run %3d".$(nextrun)+": N="+count+" T="+time+"s ["+(custom?"custom":type)+"]");
    137139
    138140    // FIXME: Replace by callback?
     
    206208    {
    207209        if (start)
    208             dim.send("MCP/START", time, count, type);
     210        {
     211            dim.send("MCP/START", time, count, custom?"custom":type);
     212            if (custom)
     213                type();
     214        }
    209215
    210216        try
    211217        {
    212             dim.wait("MCP", "TakingData", 15000);
     218            dim.wait("MCP", custom?"TriggerOn":"TakingData", 15000);
    213219            break;
    214220        }
Note: See TracChangeset for help on using the changeset viewer.