Esempio n. 1
0
 public void execute(ref DroneUDPClient droneUdpClient)
 {
     foreach (DroneAction droneAction in actionList)
     {
         droneAction.execute(ref droneUdpClient);
     }
 }
Esempio n. 2
0
        public override void execute(ref DroneUDPClient droneUdpClient)
        {
            Console.WriteLine("Now executing \"" + stringRep + "\" command.");
            droneUdpClient.sendMessage(stringRep, droneUdpClient.getDroneCommClient(), droneUdpClient.getCommandIpEndPoint());
            string response = droneUdpClient.getResponse(droneUdpClient.getDroneCommClient(), droneUdpClient.getCommandIpEndPoint());

            if (response != "ok")
            {
                droneUdpClient.setErrorState(true);
            }
        }
        public DroneSession(
            string droneIp     = DefaultConstants.DEFAULT_DRONE_IP,
            int localPort      = DefaultConstants.DEFAULT_LOCAL_PORT,
            int commandPort    = DefaultConstants.DEFAULT_COMMAND_PORT,
            int telloStatePort = DefaultConstants.DEFAULT_TELLO_STATE_PORT,
            int timeout        = DefaultConstants.DEFAULT_TIMEOUT,
            uint maxRetries    = DefaultConstants.DEFAULT_MAX_RETRIES)
        {
            droneDroneUdpClient = new DroneUDPClient(droneIp, localPort, commandPort,
                                                     telloStatePort, timeout, maxRetries);

            addMission(ref rotateMission);
            addMission(ref leftRightMission);
            addMission(ref squareMission);

            droneDroneUdpClient.startConnection();
        }
Esempio n. 4
0
        //string DroneAction.stringRep
        //{
        //  get => m_stringRep;
        //  set => m_stringRep = value;
        //}

        public override void execute(ref DroneUDPClient droneUdpClient)
        {
            Console.WriteLine("Now executing \"" + stringRep + "\" command.");
            Thread.Sleep(sleepTime);
        }