summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBe <be@mixxx.org>2020-07-31 09:49:37 -0500
committerBe <be@mixxx.org>2020-07-31 09:49:37 -0500
commit7cca878357fab4b86012252aeaac50d7ef8a0bcc (patch)
tree012b9e8dff0c75d02afaddcb0e2b8a211ae60ebc
parent4966a586e98ea3b1803e5ca7fb7e8a01d999fb86 (diff)
NI Traktor Kontrol S2 Mk2: refactor LED debugging
-rw-r--r--res/controllers/Traktor-Kontrol-S2-MK2-hid-scripts.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/res/controllers/Traktor-Kontrol-S2-MK2-hid-scripts.js b/res/controllers/Traktor-Kontrol-S2-MK2-hid-scripts.js
index 6292f684f4..b8071203b2 100644
--- a/res/controllers/Traktor-Kontrol-S2-MK2-hid-scripts.js
+++ b/res/controllers/Traktor-Kontrol-S2-MK2-hid-scripts.js
@@ -453,9 +453,14 @@ TraktorS2MK2.init = function() {
}
TraktorS2MK2.registerInputPackets();
- TraktorS2MK2.registerOutputPackets();
- // var data = [0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f];
- // controller.send(data, data.length, 0x80);
+
+ var debugLEDs = false;
+ if (debugLEDs) {
+ var data = [0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f];
+ controller.send(data, data.length, 0x80);
+ } else {
+ TraktorS2MK2.registerOutputPackets();
+ }
TraktorS2MK2.controller.setOutput("[Master]", "!usblight", 0x7F, true);
TraktorS2MK2.lightDeck("[Channel1]");