Changeset 18731 for trunk


Ignore:
Timestamp:
01/11/17 13:37:20 (8 years ago)
Author:
tbretz
Message:
Implemented the possibility to define a custom setup in a callback function.
File:
1 edited

Legend:

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

    r18265 r18731  
    126126}
    127127
    128 function takeRun(type, count, time)
     128function takeRun(type, count, time, func)
    129129{
    130130    if (!count)
     
    133133        time = -1;
    134134
    135     var custom = typeof(type)=="function";
    136 
    137135    var nextrun = sub_startrun.get().obj['next'];
    138     dim.log("Take run %3d".$(nextrun)+": N="+count+" T="+time+"s ["+(custom?"custom":type)+"]");
     136    dim.log("Take run %3d".$(nextrun)+": N="+count+" T="+time+"s ["+type+"]");
    139137
    140138    // FIXME: Replace by callback?
     
    209207        if (start)
    210208        {
    211             dim.send("MCP/START", time, count, custom?"custom":type);
    212             if (custom)
    213                 type();
     209            dim.send("MCP/START", time, count, type);
     210            if (typeof(func)=="function")
     211                func();
    214212        }
    215213
Note: See TracChangeset for help on using the changeset viewer.