Changeset 17356 for trunk/FACT++/scripts
- Timestamp:
- 11/23/13 13:09:18 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/scripts/Main.js
r17324 r17356 179 179 if (isOpen) 180 180 { 181 if (dim.state("FTM_CONTROL").name=="TriggerOn") 182 { 183 dim.send("FTM_CONTROL/STOP_TRIGGER"); 184 dim.wait("FTM_CONTROL", "Valid", 3000); 185 } 186 181 187 dim.log("Closing lid."); 182 188 dim.send("LID_CONTROL/CLOSE"); … … 511 517 "FTM_CONTROL/STATIC_DATA", 512 518 "FTM_CONTROL/TRIGGER_RATES", 519 "GPS_CONTROL/NEMA", 513 520 "LID_CONTROL/DATA", 514 521 "MAGIC_LIDAR/DATA", … … 684 691 var system_on; // undefined 685 692 686 while (!irq) 693 function processIrq() 694 { 695 if (!irq) 696 return false; 697 698 if (irq.toUpperCase()=="OFF") 699 { 700 service_feedback.voltageOff(); 701 dim.send("FAD_CONTROL/CLOSE_OPEN_FILES"); 702 return true; 703 } 704 705 if (irq.toUpperCase()=="SHUTDOWN") 706 { 707 Shutdown(); 708 return true; 709 } 710 711 console.log("IRQ "+irq+" unhandled... stopping script."); 712 return true; 713 } 714 715 while (!processIrq()) 687 716 { 688 717 // Check if observation position is still valid … … 821 850 [ "RATE_SCAN", [ "Connected" ] ], 822 851 [ "RATE_CONTROL", [ "Connected", "GlobalThresholdSet", "InProgress" ] ], 852 [ "GPS_CONTROL", [ "Locked" ] ], 823 853 ]; 824 854 … … 1154 1184 dim.log("Left main loop [irq="+irq+"]"); 1155 1185 1156 if (irq.toUpperCase()=="SHUTDOWN")1157 Shutdown();1158 1159 1186 // ================================================================ 1160 1187 // Comments and ToDo goes here
Note:
See TracChangeset
for help on using the changeset viewer.