Repository navigation
fix(cli): drop duplicate dc.gate handlers that shadowed the on/off fix - #13
Merged
Elektr0Vodka merged 1 commit intoSep 26, 2026
Merged
Conversation
CommonCLI.cpp on dmc-observer-dev carried the dc.gate / dc.gate.thresh / dc.gate.hyst set handlers (and their get readbacks) twice, a leftover of the 2026-09-11 dmc-dev merge. The first copy, right after the observer hook, still parsed dc.gate with atoi(), and since it matches first the on/off fix from #9/#10 in the second copy was dead code: `set dc.gate on` still replied OK and disabled region gating. Remove the observer-original copy and keep the one that is identical to dmc-dev, so the set/get chains match dmc-dev line for line and future dmc-dev merges stay conflict-free.
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.
Follow-up to #10. On
dmc-observer-dev,set dc.gate onstill disables duty-cycle region gating, even though #9/#10 fixed the parser.Problem
src/helpers/CommonCLI.cppon the observer contains thedc.gate/dc.gate.thresh/dc.gate.hystset handlers twice in the sameelse ifchain, and the threegetreadbacks twice as well. This is a leftover from the 2026-09-11dmc-dev→ observer merge (the same merge that duplicated the docs chapter #10 removed).handleObserverSetCmd, is the observer's original and still doesdc_gate_enabled = atoi(...) != 0.allow.read.only, came fromdmc-devand has the on/off fix.The first copy matches first, so the fix is dead code.
set dc.gate onrepliesOKand turns gating off.1/0work, which is why the Toolbox is unaffected.dmc-devhas each handler only once and is not affected.Found while verifying the
observer-mqtt-dev9805406 release notes; that release lists this as a known issue.Change
Remove the observer-original copy (set + get, 34 lines) and keep the copy that is identical to
dmc-dev. The set and get chains now matchdmc-devline for line, so futuredmc-devmerges into the observer won't conflict on these lines again.handleObserverSetCmd/handleObserverGetCmddon't handle anydc.gatekey, so nothing earlier in the chain intercepts them.Testing
pio run -e heltec_v4_repeater_observer_mqtt,heltec_v4_room_server_observer_mqttandRAK_4631_repeaterbuild.allow.read.only→dc.gateset/get chains againstorigin/dmc-dev: identical.CommonCLI.cppisn't reachable from the native test envs.🤖 Generated with Claude Code