Changeset 19513 for trunk/FACT++
- Timestamp:
- 05/25/19 14:02:30 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/scripts/Main.js
r19452 r19513 906 906 } 907 907 908 if (irq.toUpperCase()=="PREPARE") 909 { 910 dim.log("Preparing for ToO observation."); 911 dim.send("DRIVE_CONTROL/STOP"); 912 dim.wait("DRIVE_CONTROL", "Initialized", 15000); 913 return true; 914 } 915 908 916 dim.log("IRQ "+irq+" unhandled... stopping script."); 909 917 return true; … … 1058 1066 [ "PFMINI_CONTROL", [ "Disconnected", "Connected", "Receiving" ] ], 1059 1067 [ "BIAS_TEMP", [ "Valid" ] ], 1068 [ "SCHEDULER", [ /*"Connected",*/ "Armed" ] ], 1060 1069 ]; 1061 1070 … … 1516 1525 { 1517 1526 // Switch the voltage to a reduced voltage level 1518 service_feedback.voltageOn(0); 1527 if (!obs[sub].grb) 1528 service_feedback.voltageOn(0); 1519 1529 1520 1530 // Change wobble position every four runs, … … 1552 1562 { 1553 1563 doDrsCalibration("data"); // will turn voltage off 1554 1555 // Now we switch on the voltage and a significant amount of 1556 // time has been passed, so do the check again.1557 sun = Sun.horizon(-12);1558 if (!was_up && sun.isUp)1559 {1560 dim.log("Sun rise detected....");1561 continue;1562 }1564 } 1565 1566 // Now we switch on the voltage and a significant amount of 1567 // time has been passed, so do the check again. 1568 sun = Sun.horizon(-12); 1569 if (!was_up && sun.isUp) 1570 { 1571 dim.log("Sun rise detected...."); 1572 continue; 1563 1573 } 1564 1574 … … 1605 1615 // If the lid is not yet open, wait for the lid to be open and 1606 1616 // go on as usual. 1607 if (dim.state("LID_CONTROL") !="Open")1617 if (dim.state("LID_CONTROL").name!="Open") 1608 1618 { 1609 1619 dim.wait("LID_CONTROL", "Open", 30000); … … 1621 1631 1622 1632 dim.wait("FEEDBACK", "InProgress", 45000); // This is most likely the first to happen 1623 dim.wait("DRIVE_CONTROL", " Tracking",150000); // 110s for turning and 30s for stabilizing1624 1625 v8. wait(1000); // By now we should have collected the required three current events in FEEDBACK1633 dim.wait("DRIVE_CONTROL", "OnTrack", 150000); // 110s for turning and 30s for stabilizing 1634 1635 v8.sleep(1000); // By now we should have collected the required three current events in FEEDBACK 1626 1636 // Current are averaged over 10s. So by now we should have a reasonable idea of the brightness of the sky 1627 1637 // Individual pixels might still suffer wrong settings … … 1652 1662 var twilight = Sun.horizon(-16).isUp; 1653 1663 1654 if (twilight || obs[sub].grb)1664 if (twilight || (obs[sub].grb && run<2)) 1655 1665 { 1656 1666 for (var i=0; i<5 && !irq; i++)
Note:
See TracChangeset
for help on using the changeset viewer.