Changeset 18923


Ignore:
Timestamp:
10/25/17 14:28:06 (7 years ago)
Author:
tbretz
Message:
Implemented a new interrupt ('ReloadSources') to trigger reloading sources before the next scheduled pointing observations.
File:
1 edited

Legend:

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

    r18914 r18923  
    804804// Install interrupt handler
    805805// ----------------------------------------------------------------
     806var triggerReloadSources = false;
     807
    806808function handleIrq(cmd, args, time, user)
    807809{
     
    810812    console.out("  Time: "+time);
    811813    console.out("  User: "+user);
     814
     815    if (cmd.toUpperCase()=="RELOADSOURCES")
     816    {
     817        dim.log("Reloading source table scheduled before next pointing operation.");
     818        triggerReloadSources = true;
     819        return;
     820    }
    812821
    813822    irq = cmd ? cmd : "stop";
     
    15181527            dim.wait("DRIVE_CONTROL", "Initialized", 15000);
    15191528
     1529            if (triggerReloadSources) // It's all synchronous - no need to wait here
     1530            {
     1531                dim.send("DRIVE_CONTROL/RELOAD_SOURCES");
     1532                triggerReloadSources = false;
     1533                dim.log("Reloading source table triggered in drivectrl.");
     1534            }
     1535
    15201536            if (obs[sub].orbit) // != undefined, != null, != 0
    15211537                dim.send("DRIVE_CONTROL/TRACK_ORBIT", angle, obs[sub].orbit, obs[sub].source);
Note: See TracChangeset for help on using the changeset viewer.