Exemplo n.º 1
0
        internal async Task DeleteFileAsyncInternal(string devicePath)
        {
            Command c = _brick.NewCommand(CommandType.System);

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

            if (r.SystemReplyStatus != SystemReplyStatus.Success)
            {
                throw new Exception("Error deleting file: " + r.SystemReplyStatus);
            }
        }
Exemplo n.º 2
0
        internal async Task TurnMotorAtPowerAsyncInternal(OutputPort ports, int power)
        {
            Command c = _brick.NewCommand(CommandType.Direct);

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