private async Task AddCommandExecution() { await GetCurrentLocation(); if (CurrentAddress != null) { await BaseNavigation.PushAsync(new LocationDetailView(CurrentAddress)); } else { await App.Current.MainPage.DisplayAlert("Uh oh", "Something went wrong, but don't worry we captured for analysis! Thanks.", "OK"); } }
/// <summary> /// Initialise Values and Config Settings /// /// </summary> public WayPointUAV() { initialised = true; // Verbinde mit Hardware ConnectPeripherals(); // theta = The pitch in degrees relative to a plane(mathematical) normal to the earth radius line at the point the plane(aircraft) is at // phi = The roll of the aircraft in degrees // psi = The true heading of the aircraft in degrees // Direkt Steuern in dem Wertänderungen soffort weitergeben werden UAVStructure performanceData = new UAVStructure("PerformanceData", ""); performanceData.values.Add(new UAVParameter("MaxBankLeft", 10)); performanceData.values.Add(new UAVParameter("MaxBankRight", 10)); performanceData.values.Add(new UAVParameter("MaxDescendAngle", 10)); performanceData.values.Add(new UAVParameter("MaxClimbAngle", 10)); uavData.Add(performanceData); BaseNavigation navi = new BaseNavigation("navi", (UAVCommons.UAVStructure)uavData["GPS"], performanceData); WaypointMissionControl waypointMissionControl = new WaypointMissionControl(navi, "Mission Control"); pilot = new BaseAutoPilot("AP", navi, (UAVStructure)uavData["GPS"], (UAVStructure)uavData["AHRS"], performanceData); navi.PassingWayPoint += new BaseNavigation.PassingWayPointHandler(navi_PassingWayPoint); navi.ap = ((BaseAutoPilot)pilot); BaseFlightStabilizer flightstabi = new FlightControlCommons.components.BaseFlightStabilizer("Flugstabilisierung", (UAVStructure)uavData["AHRS"], pilot, uavData["Querruder"], uavData["Seitenruder"], uavData["Höhenruder"]); uavData.Add(waypointMissionControl); uavData.Add(navi); uavData.Add(flightstabi); uavData.Add(pilot); uavData.ValueChanged += new MonitoredDictionary <string, UAVParameter> .ValueChangedHandler(uavData_ValueChanged); this.DataArrived += new DataArrivedHandler(RcUAV_DataArrived); }
private async Task AddFavoriteCommandExecution() { await App.Database.SaveItemAsync(CurrentAddress); await BaseNavigation.PopAsync(); }