Skip to content

Commit 78bc25b

Browse files
committed
fixed conditional subscription
1 parent 7f0eb3e commit 78bc25b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/actions/common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export function createCommonActions(self: InstanceBaseExt<WingConfig>): Companio
114114
send(cmd, val)
115115
},
116116
subscribe: (event) => {
117-
if (event.options.led ?? 0 > 2) {
117+
if (event.options.led ?? 0 >= 2) {
118118
const sel = event.options.sel as string
119119
const cmd = ActionUtil.getScribblelightCommand(sel, getNodeNumber(event, 'sel'))
120120
ensureLoaded(cmd)
@@ -886,7 +886,7 @@ export function createCommonActions(self: InstanceBaseExt<WingConfig>): Companio
886886
send(cmd, val)
887887
},
888888
subscribe: (event) => {
889-
if (event.options.mute ?? 0 > 2) {
889+
if (event.options.mute ?? 0 >= 2) {
890890
const sel = event.options.sel as string
891891
const cmd = ActionUtil.getMainSendMuteCommand(sel, getNodeNumber(event, 'src'), getNodeNumber(event, 'dest'))
892892
ensureLoaded(cmd)

src/actions/config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function createConfigurationActions(self: InstanceBaseExt<WingConfig>): C
4747
send(cmd, val)
4848
},
4949
subscribe: (event) => {
50-
if (event.options.mute ?? 0 > 2) {
50+
if (event.options.mute ?? 0 >= 2) {
5151
const cmd = ConfigurationCommands.SoloMute()
5252
ensureLoaded(cmd)
5353
}
@@ -70,7 +70,7 @@ export function createConfigurationActions(self: InstanceBaseExt<WingConfig>): C
7070
send(cmd, val)
7171
},
7272
subscribe: (event) => {
73-
if (event.options.dim ?? 0 > 2) {
73+
if (event.options.dim ?? 0 >= 2) {
7474
const cmd = ConfigurationCommands.SoloDim()
7575
ensureLoaded(cmd)
7676
}
@@ -93,7 +93,7 @@ export function createConfigurationActions(self: InstanceBaseExt<WingConfig>): C
9393
send(cmd, val)
9494
},
9595
subscribe: (event) => {
96-
if (event.options.mono ?? 0 > 2) {
96+
if (event.options.mono ?? 0 >= 2) {
9797
const cmd = ConfigurationCommands.SoloMono()
9898
ensureLoaded(cmd)
9999
}
@@ -116,7 +116,7 @@ export function createConfigurationActions(self: InstanceBaseExt<WingConfig>): C
116116
send(cmd, val)
117117
},
118118
subscribe: (event) => {
119-
if (event.options.swap ?? 0 > 2) {
119+
if (event.options.swap ?? 0 >= 2) {
120120
const cmd = ConfigurationCommands.SoloLRSwap()
121121
ensureLoaded(cmd)
122122
}
@@ -201,7 +201,7 @@ export function createConfigurationActions(self: InstanceBaseExt<WingConfig>): C
201201
send(cmd, val)
202202
},
203203
subscribe: (event) => {
204-
if (event.options.mode ?? 0 > 2) {
204+
if (event.options.mode ?? 0 >= 2) {
205205
const talkback = event.options.tb as string
206206
const destination = event.options.dest as string
207207
const cmd = ActionUtil.getTalkbackAssignCommand(talkback, destination)

0 commit comments

Comments
 (0)