Пример #1
0
        internal async Task DeleteFileAsyncInternal(string devicePath)
        {
            Command c = _brick.CreateCommand(CommandType.SystemReply);

            c.DeleteFile(devicePath);
            Response r = await _brick.SendCommandAsyncInternal(c);

            if (r.SystemReplyStatus != SystemReplyStatus.Success)
            {
                throw new Exception("Error deleting file: " + r.SystemReplyStatus);
            }
        }
Пример #2
0
        internal async Task TurnMotorAtPowerAsyncInternal(OutputPort ports, int power)
        {
            Command c = _brick.CreateCommand(CommandType.DirectNoReply);

            c.TurnMotorAtPower(ports, power);
            c.StartMotor(ports);
            await _brick.SendCommandAsyncInternal(c);
        }