Example #1
0
        public MainViewModel(AltitudeAngelService altitudeAngelService)
        {
            _altitudeAngelService = altitudeAngelService;
            SignInCommand         = new DelegateCommandAsync <object>(ExecuteConnect, true);
            DisconnectCommand     = new DelegateCommandAsync <object>(ExecuteDisconnect, true);
            SignInState           = new ObservableProperty <SignInStates>(SignInStates.NotSignedIn);
            PermitStatus          = new ObservableProperty <PermitStates>(PermitStates.NoPermit);
            TelemetryPulse        = new ObservableProperty <bool>();


            _altitudeAngelService.IsSignedIn
            .Subscribe(UpdateSignInState);

            _altitudeAngelService.WeatherReport
            .Subscribe(WeatherChanged);

            _altitudeAngelService.SentTelemetry
            .Subscribe(i => NewTelemetry());
        }
 static AltitudeAngel()
 {
     service = new AltitudeAngelService(Message, MP,
                                        new FlightDataService(new ObservableProperty <long>(3), new MissionPlannerFlightDataProvider(null)));
 }