public async Task TestStopDeviceCmd()
        {
            var expected =
                new List <(byte[], string)>()
            {
                (Enumerable.Repeat((byte)(MysteryVibeProtocol.MaxSpeed * 0.5), 6).ToArray(), Endpoints.TxVibrate),
            };

            await testUtil.TestDeviceMessage(new SingleMotorVibrateCmd(4, 0.5), expected, false);

            expected =
                new List <(byte[], string)>()
            {
                (MysteryVibeProtocol.NullSpeed, Endpoints.TxVibrate),
            };

            await testUtil.TestDeviceMessageOnWrite(new StopDeviceCmd(4), expected, false);
        }
Esempio n. 2
0
        public async Task TestStopDeviceCmd()
        {
            var expected =
                new List <(byte[], string)>
            {
                (new byte[] { 0x17 }, Endpoints.Tx),
            };

            await _testUtil.TestDeviceMessage(new SingleMotorVibrateCmd(4, 0.5), expected, false);

            expected =
                new List <(byte[], string)>
            {
                (new byte[] { 0x00 }, Endpoints.Tx),
            };

            await _testUtil.TestDeviceMessageOnWrite(new StopDeviceCmd(4), expected, false);
        }