コード例 #1
0
ファイル: EosBoard.cs プロジェクト: Heliflyer/helios
        public EosBoard(EosDirectSerial eosInterface, byte address, string name)
        {
            _interface = new WeakReference(eosInterface);
            _address = address;
            _name = name;

            // Send out packet to get info on this board
            if (eosInterface.Bus != null)
            {
                eosInterface.Bus.GetInfo(address);
            }

            _outputs.Add(new EosBacklight(this));
        }
コード例 #2
0
        private void UpdateServo(EosPacket packet)
        {
            EosDirectSerial bus = Interface as EosDirectSerial;

            foreach (EosBoard board in bus.Boards)
            {
                foreach (EosServo servo in board.ServoOutputs)
                {
                    servo.ParseConfigPacket(packet);
                }
                foreach (EosStepper stepper in board.StepperOutputs)
                {
                    stepper.ParseConfigPacket(packet);
                }
            }
        }
コード例 #3
0
        protected override void OnInterfaceChanged(Helios.HeliosInterface oldInterface, Helios.HeliosInterface newInterface)
        {
            EosDirectSerial oldSerialInterface = oldInterface as EosDirectSerial;

            if (oldSerialInterface != null)
            {
                oldSerialInterface.Bus.ResponseReceived -= Bus_ResponseReceived;
            }

            EosDirectSerial serialInterface = newInterface as EosDirectSerial;

            if (serialInterface != null)
            {
                serialInterface.Dispatcher        = Dispatcher;
                serialInterface.ResponseReceived += Bus_ResponseReceived;
            }
        }
コード例 #4
0
 public EosBoard(EosDirectSerial eosInterface, EosDevice device)
     : this(eosInterface, device.Address, device.Name)
 {
     Device = device;
 }
コード例 #5
0
ファイル: EosBoard.cs プロジェクト: Heliflyer/helios
 public EosBoard(EosDirectSerial eosInterface, EosDevice device)
     : this(eosInterface, device.Address, device.Name)
 {
     Device = device;
 }