Exemplo n.º 1
0
        private void Args_Completed(object sender, SocketAsyncEventArgs e)
        {
            string value = Encoding.UTF8.GetString(e.Buffer, 0, e.BytesTransferred);

            // 000,000 L/R angle, U/D angle

            if (value.Length == 7)
            {
                int azimuth     = int.Parse(value.Substring(0, 3));
                int inclenation = int.Parse(value.Substring(4));

                Azimuth.SetAngle(azimuth);
                Inclenation.SetAngle(inclenation);
            }
        }
Exemplo n.º 2
0
 private void MainPage_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     Servo.SetAngle(Angle);
 }