Changeset 16827 for trunk/FACT++


Ignore:
Timestamp:
06/13/13 20:51:08 (11 years ago)
Author:
tbretz
Message:
Make sure all boards are connected.
File:
1 edited

Legend:

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

    r16795 r16827  
    4646    // Final state reached condition
    4747    case "Connected":
    48         return "";
     48        var sub_con = new Subscription("FAD_CONTROL/CONNECTIONS");
     49        var con = sub_con.get(5000);
     50        var all = true;
     51        for (var i=0; i<40; i++)
     52            if (con.obj['status'][i]&66!=66)
     53            {
     54                console.out("Board "+i+" not connected... sending CONNECT... waiting for 'Connected'.");
     55                dim.send("FAD_CONTROL/CONNECT", i);
     56                all = false;
     57            }
     58        sub_con.close();
     59        return all ? "" : "Connected";
    4960    }
    5061
Note: See TracChangeset for help on using the changeset viewer.