ShackSwitch: remove hardcoded callsign from device detection#2227
Merged
ten9876 merged 1 commit intoten9876:mainfrom May 1, 2026
Merged
ShackSwitch: remove hardcoded callsign from device detection#2227ten9876 merged 1 commit intoten9876:mainfrom
ten9876 merged 1 commit intoten9876:mainfrom
Conversation
Replace all `serial.startsWith("G0JKN")` checks with the generic
`name.contains("ShackSwitch")` check that was already the second
condition in every OR expression. The serial prefix was the author's
personal callsign (G0JKN) — any other operator's ShackSwitch would
broadcast a different prefix and fail detection entirely.
The device name "ShackSwitch" is set by the firmware from a fixed
constant and is the same for all users, making it the correct and
sufficient discriminator. No functional change for existing installs.
Also change the synthetic "G0JKN-manual" serial used for manual-IP
connections to "ShackSwitch-manual", and update all comments and the
CHANGELOG entry to reflect the new detection logic.
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
serial.startsWith("G0JKN")checks with the genericname.contains("ShackSwitch")that was already the second condition in every||expression"G0JKN-manual"→"ShackSwitch-manual"Why
The
G0JKNprefix is the author's personal callsign. The ShackSwitch firmware constructs its serial from the operator's callsign inconfig.json, so any other user's device would broadcast a different prefix and fail detection entirely. The devicenamefield is always"ShackSwitch"(set from a firmware constant) and is the correct generic discriminator. No functional change for the original device.Raised by Jeremy (KK7GWY) — thanks for the catch.
Files changed
AntennaGeniusModel.cppisShackSwitch()ShackSwitchApplet.cppShackSwitchApplet.hMainWindow.cppRadioSetupDialog.cppAppletPanel.cppCHANGELOG.mdTest plan
name="ShackSwitch"— applet loads as beforeSS_ManualIp): serial now"ShackSwitch-manual",name="ShackSwitch"still set alongside — detection still worksnamedoes not contain "ShackSwitch" — zero impact🤖 Generated with Claude Code