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)); } }
private void SendUnqueuedCommand(Command command) { command.SequenceNumber = GetSequenceNumberForCommand(); SendMessage(command.CreateCommand(firmwareVersion)); }