Exemple #1
0
        private void displayActiveChannels()
        {
            if (this.activeXAccel.InvokeRequired)
            {
                displayActiveChannelsCallback d = new displayActiveChannelsCallback(displayActiveChannels);
                this.Invoke(d, new object[] {  });
            }
            else
            {
                if (sensor.accelZ_active)
                {
                    activeZAccel.Checked = true;
                }
                else
                {
                    activeZAccel.Checked = false;
                }
                if (sensor.accelY_active)
                {
                    activeYAccel.Checked = true;
                }
                else
                {
                    activeYAccel.Checked = false;
                }
                if (sensor.accelX_active)
                {
                    activeXAccel.Checked = true;
                }
                else
                {
                    activeXAccel.Checked = false;
                }

                if (sensor.gyroZ_active)
                {
                    activeZGyro.Checked = true;
                }
                else
                {
                    activeZGyro.Checked = false;
                }
                if (sensor.gyroY_active)
                {
                    activeYGyro.Checked = true;
                }
                else
                {
                    activeYGyro.Checked = false;
                }
                if (sensor.gyroX_active)
                {
                    activeXGyro.Checked = true;
                }
                else
                {
                    activeXGyro.Checked = false;
                }

                if (sensor.magZ_active)
                {
                    activeZMag.Checked = true;
                }
                else
                {
                    activeZMag.Checked = false;
                }
                if (sensor.magY_active)
                {
                    activeYMag.Checked = true;
                }
                else
                {
                    activeYMag.Checked = false;
                }
                if (sensor.magX_active)
                {
                    activeXMag.Checked = true;
                }
                else
                {
                    activeXMag.Checked = false;
                }


                if (sensor.roll_active)
                {
                    activeRoll.Checked = true;
                }
                else
                {
                    activeRoll.Checked = false;
                }
                if (sensor.pitch_active)
                {
                    activePitch.Checked = true;
                }
                else
                {
                    activePitch.Checked = false;
                }
                if (sensor.yaw_active)
                {
                    activeYaw.Checked = true;
                }
                else
                {
                    activeYaw.Checked = false;
                }
            }
        }
        private void displayActiveChannels()
        {
            if (this.activeXAccel.InvokeRequired)
            {
                displayActiveChannelsCallback d = new displayActiveChannelsCallback(displayActiveChannels);
                this.Invoke(d, new object[] {  });
            }
            else
            {
                if (sensor.accelZ_active)
                    activeZAccel.Checked = true;
                else
                    activeZAccel.Checked = false;
                if (sensor.accelY_active)
                    activeYAccel.Checked = true;
                else
                    activeYAccel.Checked = false;
                if (sensor.accelX_active)
                    activeXAccel.Checked = true;
                else
                    activeXAccel.Checked = false;

                if (sensor.gyroZ_active)
                    activeZGyro.Checked = true;
                else
                    activeZGyro.Checked = false;
                if (sensor.gyroY_active)
                    activeYGyro.Checked = true;
                else
                    activeYGyro.Checked = false;
                if (sensor.gyroX_active)
                    activeXGyro.Checked = true;
                else
                    activeXGyro.Checked = false;

                if (sensor.magZ_active)
                    activeZMag.Checked = true;
                else
                    activeZMag.Checked = false;
                if (sensor.magY_active)
                    activeYMag.Checked = true;
                else
                    activeYMag.Checked = false;
                if (sensor.magX_active)
                    activeXMag.Checked = true;
                else
                    activeXMag.Checked = false;

                if (sensor.roll_active)
                    activeRoll.Checked = true;
                else
                    activeRoll.Checked = false;
                if (sensor.pitch_active)
                    activePitch.Checked = true;
                else
                    activePitch.Checked = false;
                if (sensor.yaw_active)
                    activeYaw.Checked = true;
                else
                    activeYaw.Checked = false;

            }
        }