Changeset 15016


Ignore:
Timestamp:
03/10/13 14:42:39 (12 years ago)
Author:
tbretz
Message:
Improved output.
File:
1 edited

Legend:

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

    r15007 r15016  
    530530
    531531    for (var i=0; i<observations.length; i++)
    532         if ( now<observations[i].start )
     532        if (now<observations[i].start)
    533533            return i-1;
    534    
     534
    535535    return observations.length-1;
    536536}
     
    645645        else
    646646            dim.send("DRIVE_CONTROL/TRACK", obs.ra, obs.dec);
    647        
     647
    648648        //OpenLid();   
    649649        dim.wait("DRIVE_CONTROL", "OnTrack", 300000);
     
    664664        dim.wait("BIAS_CONTROL", "VoltageOn", -100);
    665665        dim.wait("FAD_CONTROL", "Connected", -100);
    666        
     666
    667667        dim.wait("RATE_SCAN","Connected", 5000);
    668668        dim.send("RATE_SCAN/START_THRESHOLD_SCAN", 50, 1000, -10);
     
    676676        // So I decided to put this line here as a kind of patchwork....
    677677        dim.send("FAD_CONTROL/SET_FILE_FORMAT", 2);
    678        
     678
    679679        console.out("Ratescan done.");
    680680        run = -1;
     
    746746
    747747    if (valid)
    748         console.out("  Last DRS calib: "+diff+"min ago");
     748        console.out("  Last DRS calib: %.1fmin ago".$(diff));
    749749    else
    750750        console.out("  No valid drs calibration");
     
    826826    {
    827827        var time = new Date();
    828         if (!takeRun("data", -1, len)) // Take data (5min)
    829             len -= parseInt((new Date()-time)/1000);
    830         else
     828        if (takeRun("data", -1, len)) // Take data (5min)
    831829            break;
     830
     831        len -= parseInt((new Date()-time)/1000);
    832832    }
    833833
Note: See TracChangeset for help on using the changeset viewer.