From d89cba7b5d41fd87ab364bf000b64402460499f6 Mon Sep 17 00:00:00 2001 From: s-mendyka Date: Mon, 27 May 2024 23:10:02 +0200 Subject: [PATCH] Corsair_Virtuoso_XT_Headset.js aktualisiert --- Corsair_Virtuoso_XT_Headset.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/Corsair_Virtuoso_XT_Headset.js b/Corsair_Virtuoso_XT_Headset.js index 26103c6..d5b1e42 100644 --- a/Corsair_Virtuoso_XT_Headset.js +++ b/Corsair_Virtuoso_XT_Headset.js @@ -33,7 +33,7 @@ function hexToRgb(hex) { const vLedNames = ["Left Cans", "Right Can", "Mic"]; const vLedPositions = [ - [0, 2], [2, 2], [1, 0] + [0, 2], [2, 2] ]; export function LedNames() { @@ -98,19 +98,17 @@ function sendColors(shutdown = false){ const iX = vLedPositions[zone_idx][0]; const iY = vLedPositions[zone_idx][1]; var col; - - // if(zone_idx = 2 && !micLedControl) { - // col = [0,80,0]; - // }else{ - if(shutdown){ - col = hexToRgb(shutdownColor); - }else if (LightingMode === "Forced") { - col = hexToRgb(forcedColor); + if(zone_idx = 2 && !micLedControl) { + col = [0,80,0]; }else{ - col = device.color(iX, iY); + if(shutdown){ + col = hexToRgb(shutdownColor); + }else if (LightingMode === "Forced") { + col = hexToRgb(forcedColor); + }else{ + col = device.color(iX, iY); + } } - - // } red[zone_idx] = col[0]; green[zone_idx] = col[1]; blue[zone_idx] = col[2];