Exemplo n.º 1
0
        /// <summary>
        /// If the currentPos matches the AtPos2 then this method sets currentPos to MovingToPos1, otherwise currentPos is not changed.
        /// </summary>
        public static ActuatorPosition StartMotionFromPos2ToPos1(this ActuatorPosition currentPos)
        {
            ActuatorPosition nextPos = (currentPos.IsAtPos2() ? ActuatorPosition.MovingToPos1 : currentPos);

            return(nextPos);
        }
Exemplo n.º 2
0
 /// <summary>Returns true if the given pos is AtPos1, AtPos2, MovingToPos1, MovingToPos2, or Inbetween</summary>
 public static bool IsValid(this ActuatorPosition pos)
 {
     return(pos.IsAtPos1() || pos.IsAtPos2() || pos.IsInBetween() || pos.IsInMotion());
 }