Repository navigation
Leave the duty cycle alone, and flood adverts every 47 hours - #24
Merged
Merged
Conversation
Two settings the page was opinionated about without needing to be. The duty cycle box shipped at 100, so every paste carried a `set dutycycle 100` — or `set af 0` on pre-1.15 — whether the operator meant it or not. Whoever flashed the node already chose; overwriting that unasked is not this page's business. The box is now blank by default and follows the blank-means-leave-alone rule the flood interval and owner info already use: nothing sent, nothing read back in the verification block, nothing explained. Type a percentage and it all comes back, af conversion included. The flood advert interval moves 24 -> 47, which is not a taste call: the repeater firmware defaults to 47 hours itself from 1.16 on. It was 12 until commit 40180b8 raised it, so the hint now quotes whichever default belongs to the version selected rather than asserting 12 at everyone. docs.meshcore.io still says 12, but examples/simple_repeater/MyMesh.cpp is the one that runs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RvFSXfzU5ZTvdksaqxJMRW
Contributor
|
Preview: https://matkam.github.io/meshcore-settings/pr-24/ Served over HTTPS, so Web Serial and Web Bluetooth work — you can connect a Generated by Claude Code |
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.
Two settings the page was opinionated about without needing to be.
The duty cycle is now opt-in
The box shipped at
100, so every paste led withset dutycycle 100— orset af 0on pre-1.15 — whether the operator meant it or not. Whoever flashed the node already made that choice, and the firmware's own default (50%) is a reasonable one; overwriting it unasked isn't this page's business.Blank is now the default, following the same rule the flood interval and owner info already use. Nothing is sent, nothing is read back in the verification block, nothing is explained. Type a percentage and all three come back,
set afconversion included.North County SLO now generates:
dutyValue()returnsnullwhen blank, and all four consumers gate on it — the command block, the verify block, the explanation, and the hint, which needed its own branch because the pre-1.15 one would otherwise render "null% rounds to set af NaN".47 hours is not a taste call
The flood advert interval moves 24 → 47 because that is what the repeater firmware defaults to itself from 1.16 on:
repeater-v1.15.0= 12; // 12 hoursrepeater-v1.16.0= 47; // 47 hoursrepeater-v1.17.1= 47; // 47 hoursIt changed in
40180b8, landing between the 1.15.0 and 1.16.0 releases.I had first written the hint as "the firmware's own default is 12 hours, and 47 cuts that to about a quarter" — sourced from docs.meshcore.io/cli_commands, which still says "Default: 12 (Repeater)". That page is stale.
caps()now carriesfloodAdvertDefault, and the hint quotes the default belonging to the version selected rather than asserting one number at everyone.What to look at in the preview
get dutycycle100→set dutycycle 100leads the block andget dutycycleappears; switch to 1.10–1.13 →set af 0/get afAlso in here
Two stale README examples that I was editing anyway: the North County block was missing the
usroot, and the 1.10–1.13 block was missing both the root andset flood.advert.interval, which is sent on every tier. Tworegion defsnippets further down still omitus, but those illustrate branch syntax rather than real output, so I left them.I checked the duty-cycle copy against the source while I was in there and it's right: the repeater sets
airtime_factor = 1.0andDispatcher.cppcomputesduty_cycle = 1.0f / (1.0f + airtime_budget_factor), so 50% is the real default and the site'saf = 100/duty - 1matches the firmware exactly.Not in this PR: the version selector tops out at "1.16+" but 1.17.0/1.17.1 shipped in August. Nothing is wrong for 1.17 — every capability gate is
>=— but the label andFW_HINTSdon't mention it. Happy to add a tier separately if it's worth the row.Tests
381 checks, 0 failures (was 379). New: a duty-cycle block in
settings.mjswalking blank →100→set afon 1.10 → cleared, plus two checks pinning the version-aware flood default to both sides of the 1.16 split, and a blank-duty assertion infirmware.mjs.Stripping the duty line from the four expected arrays in
firmware.mjsmeans "no duty command at default" is now asserted on every tier, not just the two the new block walks explicitly. The twofill("#opt-duty", "100")calls that meant "reset to default" became"", since 100 no longer is one.🤖 Generated with Claude Code
https://claude.ai/code/session_01RvFSXfzU5ZTvdksaqxJMRW