private void Push(DPadCommand dPadCommand, int delay1, int delay2) { MoveHat(dPadCommand); Thread.Sleep(delay1); MoveHat(DPadCommand.Center); Thread.Sleep(delay2); }
public static void PressAndRelease(this ISwitchController controller, DPadCommand dPad, int duration, int wait = 0) { if (controller == null) { throw new ArgumentNullException(nameof(controller)); } controller.PressDPad(dPad); Thread.Sleep(duration); controller.ReleaseDPad(); Thread.Sleep(wait); }
private void MoveHat(DPadCommand command) { WriteSerialPort(new[] { (byte)ControlType.DPad, (byte)command, }); }
public void PressDPad(DPadCommand dPad) { WriteSerialPort(new[] { (byte)ControlType.DPad, (byte)dPad, }); }