Exemplo n.º 1
0
        public void SendQueuedCommand(Command command)
        {
            //command.SequenceNumber = GetSequenceNumberForCommand();
            //commandsToSend.Add(command.CreateCommand(FirmwareVersion));

            //if (command is SetConfigurationCommand)
            //{
            //    SetControlModeCommand controlModeCommand = new SetControlModeCommand(DroneControlMode.LogControlMode);
            //    controlModeCommand.SequenceNumber = GetSequenceNumberForCommand();
            //    commandsToSend.Add(controlModeCommand.CreateCommand(FirmwareVersion));
            //}

            if (command is FlightMoveCommand)
            {
                FlightMoveCommand moveCommand = (FlightMoveCommand)command;
                this.SetFlightParameters(moveCommand.Roll, moveCommand.Pitch, moveCommand.Yaw, moveCommand.Gaz);
                return;
            }

            queueCommands.Enqueue(command);
        }
Exemplo n.º 2
0
 private void SendUnqueuedCommand(Command command)
 {
     //command.SequenceNumber = GetSequenceNumberForCommand();
     //SendMessage(command.CreateCommand(FirmwareVersion));
 }
Exemplo n.º 3
0
        void ProcessCommand(Command command)
        {
            if (command is FlightMoveCommand)
            {
                FlightMoveCommand moveCommand = (FlightMoveCommand)command;

            }
        }