Exemplo n.º 1
0
        protected override void Start()
        {
            DirectoryInsert();

            
            
            _gps = new AC12GPS(PORT, _gpsDataPort);

            SpawnIterator(activateGPSIterator);

            Interleave mainInterleave = ActivateDsspOperationHandlers();
            mainInterleave.CombineWith(new Interleave(new ExclusiveReceiverGroup(
                Arbiter.Receive<UTMData>(true, _gpsDataPort, DataReceivedHandler)),
                new ConcurrentReceiverGroup()));

            //base.Start();
        }
Exemplo n.º 2
0
        private void connect_Click(object sender, EventArgs e)
        {
            try
            {
                gps = new AC12GPS(portname.Text, log, this);
                gps.initializePort();
                gps.activateHandler();

                gps.command("$PASHS,PWR,ON");
                Thread.Sleep(20);
                gps.command("$PASHQ,PRT");
                Thread.Sleep(20);
                gps.command("$PASHQ,RID");
                Thread.Sleep(20);
                gps.command("$PASHS,OUT,A,NMEA");
                Thread.Sleep(20);
                /*System.Threading.Thread.Sleep(10);
                command("$PASHS,NME,GSV,A,ON");*/
                /*System.Threading.Thread.Sleep(10);
                command("$PASHS,NME,GGA,A,ON");*/
                /*System.Threading.Thread.Sleep(10);
                command("$PASHS,NME,GSA,A,ON");
                System.Threading.Thread.Sleep(10);
                command("$PASHS,NME,VTG,A,ON");*/
                gps.command("$PASHS,NME,UTM,A,ON");     //Make GPS send UTM coordinate string
                Thread.Sleep(20);
                gps.activateHandler();

                portname.ReadOnly = true;
                connect.Text = "Disconnect";
                connect.Click -= connect_Click;
                connect.Click += disconnect_Click;
            }
            catch (Exception)
            {

            }
        }