//phidgit controller has signalled that it is good to go
        void PhidgitController_Attach(object sender, Phidgets.Events.AttachEventArgs e)
        {
            logger.Info("PhidgitController_Attach");
            PhigTimer.IsEnabled = false;
            CheckSystemState(true);

        }
Пример #2
0
        void spatial_Attach(object sender, Phidgets.Events.AttachEventArgs e)
        {
            Spatial attached = (Spatial)sender;

            attachedTxt.Text = attached.Attached.ToString();
            nameTxt.Text     = attached.Name;
            serialTxt.Text   = attached.SerialNumber.ToString();
            versionTxt.Text  = attached.Version.ToString();

            if (attached.compassAxes.Count < 3)
            {
                addMessage("You need to attach something with a compass to do anything usefull here...");
            }
            else
            {
                addMessage("Press start to begin calibration." + Environment.NewLine + "For more accuracy, you can enter the local field strength, which can be calculated for your location here: http://www.ngdc.noaa.gov/geomagmodels/IGRFWMM.jsp");
                sampleDoneButton.Enabled = true;
                spatial.DataRate         = spatial.DataRateMax;

                //Do this in a seperate thread so the drawing doens't block the data event and cause errors.
                drawThread = new Thread(new ThreadStart(drawThreadFunc));
                drawThread.Start();
            }
        }