Skip to content

Commit eabd4c1

Browse files
author
rene
committed
Pioneer DDJ-200: reset 4-deck state if changed via gui
change the current deck selection back to 2-deck even if state was changed via settings gui.
1 parent 2ce96e8 commit eabd4c1

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

res/controllers/Pioneer-DDJ-200-scripts.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -335,25 +335,29 @@ DDJ200.init = function() {
335335
outValueScale: function(value) {
336336
return value >= 0 ? this.on : this.off;
337337
},
338+
indicateDeck: function(show_4decks, _group, _control) {
339+
if (!show_4decks) {
340+
DDJ200.decks.left.setCurrentDeck("[Channel1]");
341+
DDJ200.decks.right.setCurrentDeck("[Channel2]");
342+
DDJ200.decks.forEachComponentContainer(deck => {
343+
if (deck.syncButton.blinkConnection) {
344+
deck.syncButton.blinkConnection.disconnect();
345+
deck.syncButton.send(deck.syncButton.off);
346+
};
347+
}, false);
348+
};
349+
},
338350
shiftedInput: function(_channel, _control, value, _status, _g) {
339351
if (value) {
340352
engine.setValue("[Skin]", "show_4decks", !engine.getValue("[Skin]", "show_4decks"));
341-
if (!engine.getValue("[Skin]", "show_4decks")) {
342-
DDJ200.decks.left.setCurrentDeck("[Channel1]");
343-
DDJ200.decks.right.setCurrentDeck("[Channel2]");
344-
DDJ200.decks.forEachComponentContainer(deck => {
345-
if (deck.syncButton.blinkConnection) {
346-
deck.syncButton.blinkConnection.disconnect();
347-
deck.syncButton.send(deck.syncButton.off);
348-
};
349-
}, false);
350-
};
351353
};
352354
},
353355
shutdown: function() {
354356
this.send(this.off);
355357
}
356358
});
359+
engine.makeConnection("[Skin]", "show_4decks", this.headMixButton.indicateDeck);
360+
357361

358362
this.transFxButton = new components.Button({
359363
midi: [0x96, 0x59],

0 commit comments

Comments
 (0)