private void pictureBox_asIndicator_Paint(object sender, PaintEventArgs e) { AirSpeedIndicator.Paint_Olayi(e); }
private void timer_SeriPort_Tick(object sender, EventArgs e) { textBox1.Text = Convert.ToString(imu_data.accX); textBox2.Text = Convert.ToString(imu_data.accY); textBox3.Text = Convert.ToString(imu_data.accZ); textBox4.Text = Convert.ToString(imu_data.gyroX); textBox5.Text = Convert.ToString(imu_data.gyroY); textBox6.Text = Convert.ToString(imu_data.gyroZ); textBox7.Text = Convert.ToString(imu_data.magX); textBox8.Text = Convert.ToString(imu_data.magY); textBox9.Text = Convert.ToString(imu_data.magZ); textBox38.Text = Convert.ToString(imu_data.Temperature); //temp textBox11.Text = Convert.ToString(imu_data.PressureAltitude); //alt textBox10.Text = Convert.ToString(imu_data.TAS); //ias textBox16.Text = Convert.ToString(imu_data.pitch); textBox17.Text = Convert.ToString(imu_data.roll); textBox18.Text = Convert.ToString(imu_data.yaw); textBox41.Text = Convert.ToString(imu_data.gps_speed) + "." + Convert.ToString(imu_data.gps_speed_fraction); textBox30.Text = Convert.ToString(imu_data.ins_lat); textBox26.Text = Convert.ToString(imu_data.ins_lon); textBox33.Text = Convert.ToString(imu_data.INS_Vn); textBox20.Text = Convert.ToString(imu_data.INS_Ve); textBox21.Text = Convert.ToString(imu_data.INS_Vd); textBox29.Text = Convert.ToString(imu_data.counter); if (imu_data.IMU_data_valid == 1) { label16.ForeColor = Color.LawnGreen; } else { label16.ForeColor = Color.Red; } if (imu_data.GPS_valid == 1) { label30.ForeColor = Color.LawnGreen; } else { label16.ForeColor = Color.Red; } AttitudeIndicator.pitch = Convert.ToSingle(imu_data.pitch); AttitudeIndicator.roll = Convert.ToSingle(imu_data.roll); AttitudeIndicator.Refresh(); AirSpeedIndicator.airspeed = imu_data.TAS; AirSpeedIndicator.Refresh(); }