Ejemplo n.º 1
0
        public async Task TestRepeatedFleshlightLaunchFW12Cmd()
        {
            await testUtil.TestDeviceMessage(new FleshlightLaunchFW12Cmd(4, 50, 50),
                                             new List <(byte[], string)>()
            {
                (new byte[2] {
                    50, 50
                }, Endpoints.Tx)
            }, false);

            await testUtil.TestDeviceMessageNoop(new FleshlightLaunchFW12Cmd(4, 50, 50));
        }
Ejemplo n.º 2
0
        public async Task TestSingleMotorVibrateCmd()
        {
            var expected = new List <(byte[], string)>()
            {
                (new byte[] { 0x03, 0xff }, Endpoints.TxMode),
                (new byte[] { 0x80, 0x00 }, Endpoints.TxVibrate),
            };

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

            await testUtil.TestDeviceMessageNoop(new SingleMotorVibrateCmd(4, 0.5));

            expected = new List <(byte[], string)>()
            {
                (new byte[] { 0x03, 0xff }, Endpoints.TxMode),
                (new byte[] { 0xff, 0x00 }, Endpoints.TxVibrate),
            };
            await testUtil.TestDeviceMessage(new SingleMotorVibrateCmd(4, 1), expected, false);
        }