Skip to content

Commit

Permalink
common hid: update uses of deprecated makeConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
ywwg committed Dec 8, 2023
1 parent 21c187a commit 673c2d3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions res/controllers/common-hid-packet-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2077,9 +2077,9 @@ class HIDController {
continue;
}
const bitControlGroup = this.resolveGroup(bit.mapped_group);
engine.connectControl(
engine.makeConnection(
bitControlGroup, bit.mapped_name, bit.mapped_callback, true);
engine.connectControl(new_group, bit.mapped_name, bit.mapped_callback);
engine.makeConnection(new_group, bit.mapped_name, bit.mapped_callback);
const value = engine.getValue(new_group, bit.mapped_name);
console.log(`Bit ${bit.group}.${bit.name} value ${value}`);
if (value) {
Expand All @@ -2100,9 +2100,9 @@ class HIDController {
continue;
}
const fieldControlGroup = this.resolveGroup(field.mapped_group);
engine.connectControl(
engine.makeConnection(
fieldControlGroup, field.mapped_name, field.mapped_callback, true);
engine.connectControl(new_group, field.mapped_name, field.mapped_callback);
engine.makeConnection(new_group, field.mapped_name, field.mapped_callback);
const value = engine.getValue(new_group, field.mapped_name);
if (value) {
this.setOutput(
Expand Down Expand Up @@ -2145,7 +2145,7 @@ class HIDController {
field.mapped_group = m_group;
field.mapped_name = m_name;
field.mapped_callback = callback;
engine.connectControl(controlgroup, m_name, callback);
engine.makeConnection(controlgroup, m_name, callback);
if (engine.getValue(controlgroup, m_name)) {
this.setOutput(m_group, m_name, this.LEDColors.on);
} else {
Expand All @@ -2169,7 +2169,7 @@ class HIDController {
return;
}
const controlgroup = this.resolveGroup(field.mapped_group);
engine.connectControl(controlgroup, field.mapped_name, callback, true);
engine.makeConnection(controlgroup, field.mapped_name, callback, true);
field.mapped_group = undefined;
field.mapped_name = undefined;
field.mapped_callback = undefined;
Expand Down

0 comments on commit 673c2d3

Please sign in to comment.