Esempio n. 1
0
        /// <summary>
        /// Apply Zone Action.
        /// </summary>
        /// <param name="action"></param>
        /// <returns></returns>
        public bool ApplyAction(ActionPrecision action)
        {
            if (action.relative)
            {
                this.precision += action.precision;
            }
            else
            {
                this.precision = action.precision;
            }

            if (this.precision < 0)
            {
                precision = 0;
            }

            return(true);
        }
Esempio n. 2
0
        /// <summary>
        /// Apply Zone Action.
        /// </summary>
        /// <param name="action"></param>
        /// <returns></returns>
        public bool ApplyAction(ActionPrecision action)
        {
            if (action.relative)
            {
                this.precision += action.precision;
            }
            else
            {
                this.precision = action.precision;
            }

            if (this.precision < 0)
            {
                precision = 0;
            }

            if (_logRelativeActions && action.relative)
            {
                logger.Verbose("Precision set to " + this.precision + " mm");
            }

            return(true);
        }