/// <inheritdoc /> public bool Initialize() { asusHandler?.Stop(); asusHandler = new AsusHandler(Global.Configuration.VarRegistry.GetVariable <bool>($"{DeviceName}_enable_unsupported_version")); isActive = asusHandler.Start(); return(isActive); }
/// <inheritdoc /> public AuraSyncKeyboardDevice(AsusHandler asusHandler, IAuraSyncKeyboard device, int frameRate = 30) : base(asusHandler, device, frameRate) { keyboard = device; foreach (IAuraRgbKey key in device.Keys) { deviceKeyToKey[AsusLedIdMapper(key.Code)] = device.Key[key.Code]; } // These keys are selected by inspecting the lights 2D array // This is because the keycodes for a UK keyboard and American keyboard do not align for whatever reason // Hashtag Key deviceKeyToKey[DeviceKeys.HASHTAG] = keyboard.Lights[(int)(3 * keyboard.Width + 13)]; // BackSlash Key deviceKeyToKey[DeviceKeys.BACKSLASH_UK] = keyboard.Lights[(int)(4 * keyboard.Width + 1)]; if (Global.Configuration.keyboard_brand == Settings.PreferredKeyboard.Asus_Strix_Scope) { // Left Windows Key deviceKeyToKey[DeviceKeys.LEFT_WINDOWS] = keyboard.Lights[(int)(5 * keyboard.Width + 2)]; // Left Alt Key deviceKeyToKey[DeviceKeys.LEFT_ALT] = keyboard.Lights[(int)(5 * keyboard.Width + 3)]; } }
/// <inheritdoc /> public AsusSyncConfiguredDevice(AsusHandler asusHandler, IAuraSyncDevice device, AsusConfig.AsusConfigDevice config, int frameRate = 30) : base(asusHandler, device, frameRate) { this.config = config; allConfigDevices.Add(this); }
public AuraSyncDevice(AsusHandler asusHandler, IAuraSyncDevice device, int frameRate = 30) { this.asusHandler = asusHandler; this.device = device; frameRateMillis = (int)((1f / frameRate) * 1000f); }
/// <inheritdoc /> public AsusSyncClaymoreDevice(AsusHandler asusHandler, IAuraSyncDevice device, int frameRate = 30) : base( asusHandler, device, frameRate) { }