Example #1
0
        public void setWristTurn(double degreesFromCenter)
        {
            currentWristTurn = degreesFromCenter;

            double mks = PanTiltAlignment.getInstance().mksTilt(degreesFromCenter);

            setWristTurnMks((int)mks);
        }
Example #2
0
        public void setMiddleFinger(double degreesFromCenter)
        {
            currentMiddleFinger = degreesFromCenter;

            double mks = PanTiltAlignment.getInstance().mksTilt(degreesFromCenter);

            setMiddleFingerMks((int)mks);
        }
Example #3
0
        public void setPinky(double degreesFromCenter)
        {
            currentPinky = degreesFromCenter;

            double mks = PanTiltAlignment.getInstance().mksTilt(degreesFromCenter);

            setPinkyMks((int)mks);
        }
Example #4
0
        public void setElbowAngle(double degreesFromCenter)
        {
            currentElbowAngle = degreesFromCenter;

            double mks = PanTiltAlignment.getInstance().mksTilt(degreesFromCenter);

            setElbowAngleMks((int)mks);
        }
Example #5
0
        /// <summary>
        /// Shoulder tilt
        /// </summary>
        /// <param name="degreesFromCenter"></param>
        public void setShoulderTilt(double degreesFromCenter)
        {
            currentShoulderTilt = degreesFromCenter;

            double mks = PanTiltAlignment.getInstance().mksTilt(degreesFromCenter);

            setShoulderTiltMks((int)mks);
        }
Example #6
0
 public static PanTiltAlignment getInstance()
 {
     if (instance == null)
     {
         instance = new PanTiltAlignment();
     }
     return(instance);
 }
Example #7
0
 public static PanTiltAlignment RestoreOrDefault()
 {
     if (File.Exists(filename))
     {
         using (TextReader reader = new StreamReader(filename))
         {
             XmlSerializer x = new System.Xml.Serialization.XmlSerializer(typeof(PanTiltAlignment));
             instance = (PanTiltAlignment)x.Deserialize(reader);
         }
     }
     else
     {
         instance = new PanTiltAlignment();
     }
     return(instance);
 }
 public static PanTiltAlignment getInstance()
 {
     if (instance == null)
     {
         instance = new PanTiltAlignment();
     }
     return instance;
 }
 public static PanTiltAlignment RestoreOrDefault()
 {
     if (File.Exists(filename))
     {
         using (TextReader reader = new StreamReader(filename))
         {
             XmlSerializer x = new System.Xml.Serialization.XmlSerializer(typeof(PanTiltAlignment));
             instance = (PanTiltAlignment)x.Deserialize(reader);
         }
     }
     else
     {
         instance = new PanTiltAlignment();
     }
     return instance;
 }
        private void Window_Loaded(object sender, EventArgs e)
        {
            // UI is up at this moment.

            _panTiltAlignment = PanTiltAlignment.RestoreOrDefault();

            OpenBrickConnector();

            AssumePostureScrollbars(SafePostures);

            speak("Ready for action!");
        }