Exemple #1
0
        /// <summary>
        /// Allows the controller Mode to be set to manual (0) or Automatic (non-zero)
        /// when the transition from manual to auto occurs, the controller is
        /// automatically initialized
        /// </summary>
        /// <param name="Mode"></param>
        public void SetMode(PidMode mode)
        {
            bool newAuto = (mode == PidMode.AUTOMATIC);

            if (newAuto == !inAuto)
            {
                // we just went from manual to auto
                Initialize();
            }
            inAuto = newAuto;
        }
 /// <summary>
 /// Allows the controller Mode to be set to manual (0) or Automatic (non-zero)
 /// when the transition from manual to auto occurs, the controller is
 /// automatically initialized
 /// </summary>
 /// <param name="Mode"></param>
 public void SetMode(PidMode mode)
 {
     bool newAuto = (mode == PidMode.AUTOMATIC);
     if (newAuto == !inAuto)
     {
         // we just went from manual to auto
         Initialize();
     }
     inAuto = newAuto;
 }