public void UpdateDroneController_NoKeysArePressed_AllFlightControllsAssigned0()
        {
            // Arrange
            // set no key state to down

            // Act
            _target.UpdateDroneController();

            // Assert
            _mockDroneController.VerifySet(x => x.Roll  = 0);
            _mockDroneController.VerifySet(x => x.Pitch = 0);
            _mockDroneController.VerifySet(x => x.Yaw   = 0);
            _mockDroneController.VerifySet(x => x.Gaz   = 0);
        }
Exemplo n.º 2
0
        //private void Geolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args)
        //{
        //    Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
        //    {
        //        var l = args.Position.Coordinate;
        //        Location = string.Format("Lat: {0:0.0000}, Lon: {1:0.0000}, Alt: {2:0.0}", l.Latitude,
        //            l.Longitude, l.Altitude);
        //        DroneController.SetLocation(l.Latitude, l.Longitude, l.Altitude ?? double.NaN);
        //    });
        //}

        //private void Geolocator_StatusChanged(Geolocator sender, StatusChangedEventArgs args)
        //{
        //    Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
        //    {
        //        LocationServicesSupported = args.Status != PositionStatus.Disabled && args.Status != PositionStatus.NotAvailable;
        //        if (!LocationServicesSupported)
        //        {
        //            UseLocationService = false;
        //        }
        //    });
        //}

        private void KeyboardStateChanged(CoreWindow sender, KeyEventArgs args)
        {
            args.Handled = false;
            _keyboardInput.UpdateDroneController();
        }