Changeset 17349


Ignore:
Timestamp:
11/23/13 13:02:23 (11 years ago)
Author:
tbretz
Message:
Included gpsctrl into startup procedure.
File:
1 edited

Legend:

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

    r17215 r17349  
    262262
    263263// ================================================================
     264// Setup GPS control and wait for the satellites to be locked
     265// ================================================================
     266
     267checkSend(["GPS_CONTROL"]);
     268
     269if (dim.state("GPS_CONTROL").name=="Disconnected")
     270    dim.send("GPS_CONTROL/RECONNECT");
     271
     272// Wait for being connectes
     273v8.timeout(5000, function() { if (dim.state("GPS_CONTROL").name!="Disconnected") return true; });
     274
     275// Wait for status available
     276v8.timeout(5000, function() { if (dim.state("GPS_CONTROL").name!="Connected") return true; });
     277
     278if (dim.state("GPS_CONTROL").name=="Disabled")
     279    dim.send("GPS_CONTROL/ENABLE");
     280
     281// Wait for gps to be enabled and locked
     282dim.wait("GPS_CONTROL", "Locked", 15000);
     283
     284// ================================================================
    264285// Crosscheck all states
    265286// ================================================================
     
    289310 [ "FTM_CONTROL",     [ "Valid", "TriggerOn"              ] ],
    290311 [ "FAD_CONTROL",     [ "Connected", "WritingData"        ] ],
     312 [ "GPS_CONTROL",     [ "Locked" ] ],
    291313];
    292314
Note: See TracChangeset for help on using the changeset viewer.