Skip to content

Conversation

@emcek
Copy link
Contributor

@emcek emcek commented Jan 17, 2026

Fixes: #1481

Only one problem with ARC210_SQUELCH_SWITCH when I increase in Bort I can't decrease it.

C_130J:definePushButton("ARC210_LSK_1", devices.VOLUME_MANAGER, 3145, 550, ARC_210, "ARC-210 LSK 1")
C_130J:definePushButton("ARC210_LSK_2", devices.VOLUME_MANAGER, 3146, 549, ARC_210, "ARC-210 LSK 2")
C_130J:definePushButton("ARC210_LSK_3", devices.VOLUME_MANAGER, 3147, 548, ARC_210, "ARC-210 LSK 3")
C_130J:defineTumb("ARC210_SQUELCH_SWITCH", devices.VOLUME_MANAGER, 3159, 532, 2, { -1, 1 }, nil, false, ARC_210, "ARC-210 Squelch Switch")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to me like this is a standard 0-1, so defineToggleSwitch. I suspect it won't turn off because it's trying to set the value to -1, which isn't possible for this control.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok with this only set_state is working, rest fixed_step and action not:

C_130J:defineToggleSwitch("ARC210_SQUELCH_SWITCH", devices.VOLUME_MANAGER, 3159, 532, ARC_210, "ARC-210 Squelch Switch")

I compare different usages of multiswitch() from DCS to corresponding BIOS counterparts. ARC210_SQUELCH_SWITCH is oddball, looks like it need two position but with step set to 2, but this one is working:

C_130J:defineMultipositionSwitch("ARC210_SQUELCH_SWITCH", devices.VOLUME_MANAGER, 3159, 532, 2, 2, ARC_210, "ARC-210 Squelch Switch")

Please check it out.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the C-130 luas - it does look like this is a -1 to 1 toggle switch yeah. Does it work with defineTumb? You could also use defineToggleSwitchManualRange, which would be a little bit cleaner imo:

C_130J:defineToggleSwitchManualRange("ARC210_SQUELCH_SWITCH", devices.VOLUME_MANAGER, 3159, 532, { -1, 1 }, ARC_210, "ARC-210 Squelch Switch")

@charliefoxtwo
Copy link
Member

It looks like you merged main into your branch, which is not ideal for this PR. Is there something from main that you need on this branch?

@emcek
Copy link
Contributor Author

emcek commented Jan 29, 2026

It looks like you merged main into your branch, which is not ideal for this PR. Is there something from main that you need on this branch?

yeah, it should be herc let me git reset this.

@emcek
Copy link
Contributor Author

emcek commented Jan 29, 2026

@charliefoxtwo fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants