Skip to content

Commit

Permalink
feat(controllers): make components.Pot softtakeover configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiftb0y committed Nov 9, 2022
1 parent db0c467 commit d232bbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion res/controllers/midi-components-0.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@
this.firstValueReceived = false;
};
Pot.prototype = new Component({
softTakeover: true,
input: function(channel, control, value, _status, _group) {
if (this.MSB !== undefined) {
value = (this.MSB << 7) + value;
Expand Down Expand Up @@ -489,7 +490,7 @@
}
},
connect: function() {
if (this.firstValueReceived && !this.relative) {
if (this.firstValueReceived && !this.relative && this.softTakeover) {
engine.softTakeover(this.group, this.inKey, true);
}
},
Expand Down

0 comments on commit d232bbb

Please sign in to comment.