Esempio n. 1
0
        public Thinker(ComPort port)
        {
            _port = port;
            _port.ReceivedResponce += PortOnReceivedResponce;

            //_currentMetaCommand = new ScanMetaCommand();
            //_currentMetaCommand = new SimpleMovementMetaCommand();
            _currentMetaCommand = new ExplorerMetaCommand();
        }
Esempio n. 2
0
 public override void Execute(ComPort port)
 {
     base.Execute(port, Commands.RangeScan, new byte[] { _startDegree, _endDegree });
 }
Esempio n. 3
0
 public override void Execute(ComPort port)
 {
     base.Execute(port, Commands.Status, new byte[] { _degree });
 }
Esempio n. 4
0
 protected void Execute(ComPort port, Commands cmd, byte[] data)
 {
     port.SendCommand(cmd, data);
     Thread.Sleep(Timeout);
 }
Esempio n. 5
0
 public virtual void Execute(ComPort port)
 {
     throw new NotImplementedException();
 }
Esempio n. 6
0
 public override void Execute(ComPort port)
 {
     base.Execute(port, Commands.Move, new byte[] { (byte)MoveDirection.Backwards, 0 });
 }
Esempio n. 7
0
 public override void Execute(ComPort port)
 {
     base.Execute(port, Commands.Move, new byte[] { (byte)_direction, _speed, _degree, _stopAfter });
 }