Changeset 18370 for trunk/FACT++/scripts
- Timestamp:
- 11/07/15 20:50:24 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/scripts/handleDriveArmed.js
r17351 r18370 16 16 { 17 17 case "Disconnected": 18 console.out("Drivectrl in 'Disconnected'... sending RECONNECT... waiting for 'Initialized'."); 19 dim.send("DRIVE_CONTROL/RECONNECT"); 20 return "Initialized"; 21 18 22 case "Connected": 19 case "Ready": 23 case "Parking": 24 case "Stopping": 25 case "Armed": 26 case "Blocked": 20 27 v8.sleep(1000); 21 28 return undefined; 22 29 23 30 case "Locked": 24 //console.warn("Drive is LOCKED. Not all observation types will be supported.");25 31 console.out("WARNING - Drive is LOCKED. Please unlock manually."); 32 // Do NOT unlock the drive here... it is a safety feature which should 33 // never be used in an auotmatic process otherwise it is not realiable! 26 34 return ""; 27 //throw new Error("Drive is LOCKED. Please unlock manually.");28 //return undefined;29 //dim.log("Drive in Locked... unlock.");30 //dim.send("DRIVE_CONTROL/UNLOCK");31 //return "Armed";32 35 33 36 case "Moving": … … 38 41 return "Armed"; 39 42 40 case "NotReady":41 43 case "ERROR": 42 console.out("Drive in '"+state.name+"'... sending STOP. ");44 console.out("Drive in '"+state.name+"'... sending STOP... waiting for 'Initialized'"); 43 45 dim.send("DRIVE_CONTROL/STOP"); 44 dim.wait("DRIVE_CONTROL", "Armed", 60000); 45 return undefined; // Process that again if necessary 46 return "Initialized"; // Process that again if necessary 46 47 47 case " Armed":48 case "Initialized": 48 49 return ""; 49 50 }
Note:
See TracChangeset
for help on using the changeset viewer.