Exemplo n.º 1
0
 internal GoPiGo(I2cDevice device)
 {
     if (device == null) throw new ArgumentNullException(nameof(device));
     DirectAccess = device;
     _motorController = new MotorController(this);
     _encoderController = new EncoderController(this);
 }
Exemplo n.º 2
0
 internal GoPiGo()
 {
     this.Driver        = new I2cDriver(ProcessorPin.Pin2, ProcessorPin.Pin3);
     this.I2CController = Driver.Connect(GoPiGoAddress);
     _motorController   = new MotorController(this);
     _encoderController = new EncoderController(this);
 }
Exemplo n.º 3
0
 internal GoPiGo(I2cDevice device)
 {
     if (device == null)
     {
         throw new ArgumentNullException(nameof(device));
     }
     DirectAccess       = device;
     _motorController   = new MotorController(this);
     _encoderController = new EncoderController(this);
 }
        public EncodingWindow(IEncoderController controller)
        {
            this.controller = controller;
            this.controller.Completed += this.controller_Completed;
            foreach (IParallelTask task in this.controller.Tasks)
            {
                task.ProgressChanged += this.task_ProgressChanged;
            }

            InitializeComponent();

            this.viewItems = this.controller.Tasks.Select(task => new EncodingItemView(task.Target, task.Info)).ToArray();
            this.listTasks.ItemsSource = this.viewItems;

            controller.Start();
        }
Exemplo n.º 5
0
        public EncodingWindow(IEncoderController controller)
        {
            this.controller            = controller;
            this.controller.Completed += this.controller_Completed;
            foreach (IParallelTask task in this.controller.Tasks)
            {
                task.ProgressChanged += this.task_ProgressChanged;
            }

            InitializeComponent();

            this.viewItems             = this.controller.Tasks.Select(task => new EncodingItemView(task.Target, task.Info)).ToArray();
            this.listTasks.ItemsSource = this.viewItems;

            controller.Start();
        }
Exemplo n.º 6
0
 internal GoPiGo(I2cDevice device)
 {
     Device             = device;
     _motorController   = new MotorController(this);
     _encoderController = new EncoderController(this);
 }