Пример #1
0
 /// <summary>
 /// Return the max value that this servo will ever move
 /// </summary>
 public int GetServoMax(ServoPortEnum servoPort)
 {
     return(_servoMax[(int)servoPort]);
 }
Пример #2
0
 /// <summary>
 /// Set the mininum servo value that this servo will ever be able to go
 /// </summary>
 public void SetServoMin(ServoPortEnum servoPort, int min)
 {
     _servoMin[(int)servoPort] = min;
 }
Пример #3
0
 /// <summary>
 /// Return the fine tunign value of the specified servo
 /// </summary>
 public int GetServoFineTune(ServoPortEnum servoPort)
 {
     return(_servoFineTune[(int)servoPort]);
 }
Пример #4
0
 /// <summary>
 /// Set the fine tuning value for the specified servo. This means that if the fine tune value for a servo is set to 1, then every position that is specified will be incremented by 1.
 /// This allows you to fine tune a servo position across the entire application.
 /// </summary>
 public void SetServoFineTune(ServoPortEnum servoPort, int fineTune)
 {
     _servoFineTune[(int)servoPort] = fineTune;
 }
Пример #5
0
        /// <summary>
        /// Set the position of a servo but do not send it to the server.
        /// This merely caches the position, which you can send the cache later with SendCachedServoPositions()
        /// By caching, it allows you to effeciently use the communication by sending only servo updates.
        /// You would want to do this when there's a bunch of servo positions to set, and then send later.
        /// For example, in Unity you can send servo positions with every frame Update rather than send the updates separately.
        /// </summary>
        public void SetCachedServoPosition(ServoPortEnum servo, byte position)
        {
            _positions[(int)servo] = position;

            _servosChanged = true;
        }