public HelicopterViewModel()
        {
            IsDatabaseConnected = DatabaseManager.IsDatabaseAlive();
            HelicopterManager = new HelicopterManager();
            helicopterController = HelicopterManager.HelicopterController;
            yaw = helicopterController.Yaw;
            tilt = helicopterController.Tilt;

            InitializeRelayCommands();
        }
        public HelicopterController(ConnectionType connectionType)
        {
            Microcontroller.Initialize(connectionType);
            communicationsManager = Microcontroller.GetInstanceOfCommunicationManager();
            communicationsManager.PropertyChanged += OnCommunicationManagerPropertyChanged;

            Yaw = new YawController();
            Tilt = new TiltController();

            Yaw.PropertyChanged += OnAngleControllerPropertyChanged;
            Tilt.PropertyChanged += OnAngleControllerPropertyChanged;
        }
Exemplo n.º 3
0
        public Session(HelicopterController helicopterController, int refreshIntervalMilliseconds)
        {
            yaw = helicopterController.Yaw;
            tilt = helicopterController.Tilt;

            YawDataSeries = new ControllerDataSeries(yaw);
            TiltDataSeries = new ControllerDataSeries(tilt);

            RefreshIntervalMilliseconds = refreshIntervalMilliseconds;

            YawDataSeries.PropertyChanged += OnDataSeriesPropertyChanged;
            TiltDataSeries.PropertyChanged += OnDataSeriesPropertyChanged;
        }