Changeset 15291
- Timestamp:
- 04/10/13 10:19:30 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/scripts/Main.js
r15289 r15291 16 16 include('scripts/Observation_class.js'); 17 17 18 /* 18 19 // this file just contains the definition of 19 20 // the variable observations, which builds our nightly schedule, hence the filename … … 32 33 } 33 34 } 35 */ 36 37 include('scripts/ReadSchedule.js'); 38 39 var observations = [ ]; 34 40 35 41 // Get the observation scheduled for 'now' from the table and … … 42 48 if (isNaN(now.valueOf())) 43 49 throw new Error("Date argument in getObservation invalid."); 50 51 observations = getSchedule(); 44 52 45 53 for (var i=0; i<observations.length; i++) … … 350 358 dim.wait("MCP", "Idle", time>0 ? time*1250 : undefined); // run time plus 25% 351 359 360 console.out("debug: "+incomplete); 361 352 362 if (incomplete) 353 363 { … … 790 800 var run = -2; // getObservation never called 791 801 var sub; 792 var last Obs;802 var lastId; 793 803 var sun = Sun.horizon(-13); 794 804 var system_on; // undefined … … 828 838 829 839 // Check if observation target has changed 830 if (last Obs!=idxObs) // !Object.isEqual(obs, nextObs)831 { 832 console.out("--- "+ idxObs+" ---");840 if (lastId!=obs.id) // !Object.isEqual(obs, nextObs) 841 { 842 console.out("--- "+obs.id+" ---"); 833 843 console.out("Current time: "+new Date().toUTCString()); 834 844 console.out("Current observation: "+obs.start.toUTCString()); … … 855 865 run = 0; 856 866 } 857 last Obs = idxObs;867 lastId = obs.id; 858 868 859 869 if (nextObs==undefined && obs[obs.length-1].task!="SHUTDOWN") … … 868 878 } 869 879 870 var task = obs[sub].task;871 872 880 // Check if sun is still up... only DATA and RATESCAN must be suppressed 873 if (( task=="DATA" ||task=="RATESCAN") && sun.isUp)881 if ((obs[sub].task=="DATA" || obs[sub].task=="RATESCAN") && sun.isUp) 874 882 { 875 883 var now = new Date(); … … 916 924 ]; 917 925 926 918 927 if (!checkStates(table)) 919 928 {
Note:
See TracChangeset
for help on using the changeset viewer.