Ejemplo n.º 1
0
        public HornViewModel()
        {
            mRobot = RobotFactory.GetRobotInstance();

            SendOnCommand  = new RelayCommand(TurnOn);
            SendOffCommand = new RelayCommand(TurnOff);
        }
Ejemplo n.º 2
0
 // Sends Commands Msg to robot, if Verification is True
 protected void SendCommandsToRobot()
 {
     if (VerifyReadyToSendMsg())
     {
         RobotFactory.GetRobotInstance().SendMsg(GetMsg(), true);
     }
 }
Ejemplo n.º 3
0
        public RobotFigureViewModel()
        {
            robot = RobotFactory.GetRobotInstance();

            robot.HeadingUpated += Robot_HeadingUpated;

            EventManager.OnRobotPathChanged += OnRobotPathUpdated;
        }
Ejemplo n.º 4
0
        public RGBViewModel()
        {
            mRobot = RobotFactory.GetRobotInstance();

            SendOnCommand   = new RelayCommand(TurnOn);
            SendOffCommand  = new RelayCommand(TurnOff);
            SendLoopCommand = new RelayCommand(TurnLoop);
            SetColorCommand = new RelayCommand(SetColor);
        }
Ejemplo n.º 5
0
        public LedViewModel(Light type)
        {
            mType  = type;
            mRobot = RobotFactory.GetRobotInstance();

            SendOnCommand   = new RelayCommand(TurnOn);
            SendOffCommand  = new RelayCommand(TurnOff);
            SendLoopCommand = new RelayCommand(TurnLoop);
        }
Ejemplo n.º 6
0
        public HeadingCalibrationViewModel()
        {
            robot = RobotFactory.GetRobotInstance();

            SetNorthCommand = new RelayCommand(SetNorth);
            SetEastCommand  = new RelayCommand(SetEast);
            SetSouthCommand = new RelayCommand(SetSouth);
            SetWestCommand  = new RelayCommand(SetWest);
        }
Ejemplo n.º 7
0
        public DirectControlViewModel()
        {
            robot = RobotFactory.GetRobotInstance();

            MoveFWDCommand      = new RelayCommand(MoveFWD);
            MoveBCKCommand      = new RelayCommand(MoveBCK);
            TurnLeftCommand     = new RelayCommand(TurnLeft);
            TurnRightCommand    = new RelayCommand(TurnRight);
            StopMovementCommand = new RelayCommand(Stop);
        }
        public ConnectionSettingsViewModel()
        {
            robot = RobotFactory.GetRobotInstance();

            IsConnected = robot.IsConnected();

            ComPorts = new List <string>();
            ComPorts.AddRange(SerialPort.GetPortNames());

            robot.ConnectionStatusChanged += Robot_ConnectionStatusChanged;

            ConnectCommand    = new RelayCommand(ConnectToRobot);
            DisconnectCommand = new RelayCommand(DisconnectToRobot);
        }