Exemple #1
0
        public override void Closed()
        {
            base.Closed();
            PhidgetsServoBoard board = Interface as PhidgetsServoBoard;

            if (board != null)
            {
                board.Detach();
            }
        }
Exemple #2
0
        protected override void OnInterfaceChanged(HeliosInterface oldInterface, HeliosInterface newInterface)
        {
            PhidgetsServoBoard oldBoard = oldInterface as PhidgetsServoBoard;

            if (oldBoard != null)
            {
                oldBoard.Detach();
            }

            PhidgetsServoBoard newBoard = newInterface as PhidgetsServoBoard;

            if (newBoard != null)
            {
                newBoard.Attach();
            }

            _motorList.Clear();
            for (int i = 0; i < newBoard.ServoCount; i++)
            {
                _motorList.Add("Servo " + i);
            }
        }