示例#1
0
        /// <summary>
        /// All calibration requests are queued and handled in the order
        /// they were requested.  Actuators should call this function to
        /// indicate that they want to calibrate
        /// </summary>
        /// <param name="source">the requesting actuator</param>
        public void RequestCalibration(IActuator source)
        {
            if (calibrationQueue.Contains(source) || isCalibratingActuator(source))
            {
                Log.Debug("Already queued up or currently processing");
                return;
            }

            var aex = _actuators.find(source);

            if (aex != null)
            {
                aex.RequestCalibration();
                calibrationQueue.Enqueue(aex);
            }
        }
示例#2
0
        /// <summary>
        /// All calibration requests are queued and handled in the order
        /// they were requested.  Actuators should call this function to
        /// indicate that they want to calibrate
        /// </summary>
        /// <param name="source">the requesting actuator</param>
        public void RequestCalibration(IActuator source)
        {
            Log.Debug("Entered RequestCalibration for " + source.Name);

            if (calibrationQueue.Contains(source) || isCalibratingActuator(source))
            {
                Log.Debug("Already queued up or currently processing. Will not enqueue for " + source.Name);
                return;
            }

            var aex = _actuators.find(source);

            if (aex != null)
            {
                aex.RequestCalibration();
                Log.Debug("Enqueing calibration request for " + source.Name);

                calibrationQueue.Enqueue(aex);
            }
        }