public Task <InvokeResult> UpdateWaypoints(IConnectedUas uas, Mission mission)
        {
            var msg = new UasMissionWritePartialList();

            uas.Transport.SendMessage(msg);
            return(Task.FromResult(InvokeResult.Success));
        }
        public async Task <InvokeResult <Mission> > GetWayPointsAsync(IConnectedUas uas)
        {
            var mission = new Mission();

            var missionRequest = new UasMissionRequestList
            {
                TargetSystem    = uas.Uas.SystemId,
                TargetComponent = uas.Uas.ComponentId
            };

            var result = await uas.Transport.RequestDataAsync <UasMissionCount>(missionRequest, UasMessages.MissionCount);

            if (result.Successful)
            {
                for (ushort idx = 0; idx < result.Result.Count; ++idx)
                {
                    var reqf = new UasMissionRequestInt
                    {
                        TargetSystem    = uas.Uas.SystemId,
                        TargetComponent = uas.Uas.ComponentId,
                        Seq             = idx
                    };

                    var wpResult = await uas.Transport.RequestDataAsync <UasMissionItemInt>(reqf, UasMessages.MissionItemInt);

                    if (wpResult.Successful)
                    {
                        mission.Waypoints.Add(Waypoint.Create(wpResult.Result));
                    }
                }
            }

            return(InvokeResult <Mission> .Create(mission));
        }
        public void SetActive(IConnectedUas connectedUas)
        {
            Active = connectedUas;
            if (!All.Contains(connectedUas))
            {
                All.Add(connectedUas);
            }

            if (Active != null)
            {
                ActiveDroneChanged?.Invoke(this, connectedUas);
            }
        }
 private void Connections_ActiveDroneChanged(object sender, IConnectedUas e)
 {
     RefreshUI();
 }