Measured on a SenseCAP Solar P1-Pro: a continuously powered L76K costs 46.0 mA
(paired A/B, spread 43.7-47.5), which is more than everything else on the node
put together -- it runs at ~24 mA with GPS asleep. A mast repeater does not need
a continuous fix; it needs its volatile RTC set, or clients drop its replies.
`gps duty` powers the receiver only around a sync and cuts it in between. The
cadence matches the 30-minute re-sync MicroNMEALocationProvider already does, so
clock accuracy is unchanged while 42-45 of those 46 mA come back -- 42 even in
the pathological case where a fix never arrives.
Encoded as gps_enabled == 2 rather than a new pref, so the prefs file layout is
untouched and an older build just clamps the value.
The cadence is owned by the state machine, not by the provider's own re-arm, for
a concrete reason: with the receiver unpowered nothing feeds the parser, and
MicroNMEA keeps reporting the LAST fix as valid -- a provider-driven re-arm
would therefore set the RTC to a half-hour-old timestamp. Hence syncTime() (which
clears the parser) on every wake plus an own timer, and int32_t deltas so the
49-day millis() wrap cannot park GPS on or off forever.
Verified on hardware, both paths: with sky `duty, asleep, fix, 7 sats` (fix
taken, clock set, receiver cut); indoors `awake` for exactly 300 s and then
`asleep` with an hourly retry.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Extract the inline cursor-walk in handleRegionCmd into file-local
helpers (skipSpaces, rtrimSpaces, takeToken, splitNameJump,
processRegionDefSegment), grouped immediately above the consumer.
Behavior is identical; addresses PR #2540 review feedback on
readability.
Tighten the region def docs: collapse five Note callouts into three
grouped paragraphs (Behavior / Existing regions / Limits), add a
case-sensitivity caveat plus an error example, note the cursor reset
between split commands, and use generic placeholder names.
Add a new command `region bulk` for defining region hierarchies in a single line. This command allows users to create multiple regions in a single message. Updated the documentation to include usage examples and detailed parameter descriptions.