Repository navigation
fix(cli): accept on/off for set dc.gate; clarify dc.gate threshold docs - #9
Merged
Merged
Conversation
`set dc.gate` parsed its value with atoi(), so `set dc.gate on` evaluated to 0 and silently disabled region gating while replying OK. It now accepts on/off as well as 1/0 and rejects anything else with an error. Docs (cli_commands.md + dmc-docs nl/en/de): dc.gate.thresh, dc.gate.hyst and the duty in `get dc.gate.status` are a percentage of the duty-cycle budget, not of wall-clock time. Worked example for dutycycle 10.
Elektr0Vodka
added a commit
that referenced
this pull request
Sep 26, 2026
…ver-dev-dc-gate-on-off docs/cli_commands.md: keep this branch's single deduped dc.gate section (dmc-dev's PR #9 wording arrived via the observer merge and re-added the duplicate); carry over the upstream doc updates from the sync (radio/freq defaults, direct.txdelay, agc.reset.interval 0-1020, flood.advert.interval, advert.interval zero-hop note).
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.
Problem
set dc.gateparsed its value withatoi(), soset dc.gate onevaluated to0: the repeater repliedOKbut disabled duty-cycle region gating. Onlyset dc.gate 1actually turned it on.Fix
set dc.gateacceptson/1andoff/0; anything else returnsERROR: dc.gate must be on/off (or 1/0)instead of silently turning gating off.set dc.gate 1/0, so it is unaffected.Docs
Raised on Discord: it was unclear whether
dc.gate.threshis a percentage of wall-clock time or of the duty-cycle budget.docs/cli_commands.md: usage showsset dc.gate <on|off>; new "What the percentage measures" section: threshold, hysteresis and thedutyinget dc.gate.statusare a % of the duty-cycle budget (set dutycycle), not of wall-clock time. Worked example fordutycycle 10(360 s/hour, gating at 252 s used, recovery below 216 s), and a note that the threshold does not need to be below the duty-cycle limit.dmc-docs/custom-cli(nl/en/de): same correction in short form.Testing
pio run -e Heltec_v3_repeaterbuilds.CommonCLI.The duplicated region-gating chapter on
dmc-observer-devis handled when this is carried into that branch.🤖 Generated with Claude Code