From c9a7be1eefae7d44d79450df23a4e887b3f127ae Mon Sep 17 00:00:00 2001 From: mikecarper Date: Tue, 22 Sep 2026 22:49:57 -0700 Subject: [PATCH] Simplify stock temporary radio test page --- docs/_javascript/preset_test.js | 13 +- docs/_stylesheets/preset_test.css | 45 +++ docs/preset_test.md | 584 +++++++++++++++--------------- mkdocs.yml | 4 +- test/test_preset_test.js | 36 ++ 5 files changed, 387 insertions(+), 295 deletions(-) diff --git a/docs/_javascript/preset_test.js b/docs/_javascript/preset_test.js index 01e2b227..0f3a666a 100644 --- a/docs/_javascript/preset_test.js +++ b/docs/_javascript/preset_test.js @@ -902,7 +902,6 @@ ); const staticCommands = setScheduledCommands(); - setCommand(root, "stock-cancel-during", staticCommands.stockCancelDuring); setCommand(root, "stock-leave-30", staticCommands.stockLeaveIn30); setCommand(root, "primary-cancel", staticCommands.primaryCancel); setCommand(root, "companion-cancel-before", staticCommands.companionCancelBefore); @@ -1057,19 +1056,27 @@ root, "companion-now", phase === "before" - ? "Available one hour before the test — use Option 2 to schedule now." + ? "Available one hour before the test — schedule in advance below if supported." : endedMessage ); } + setCommand( + root, + "stock-cancel-during", + immediateOpen ? commands.stockCancelDuring + : phase === "before" ? "Available after you join the test." : "Test ended — no need to leave." + ); setCommandEnabled(root, "stock-now", immediateOpen); + setCommandEnabled(root, "stock-cancel-during", immediateOpen); setCommandEnabled(root, "companion-now", immediateOpen); setMaterialCommandCopyEnabled(root, "stock-now", immediateOpen); + setMaterialCommandCopyEnabled(root, "stock-cancel-during", immediateOpen); setMaterialCommandCopyEnabled(root, "companion-now", immediateOpen); setText( root, '[data-role="stock-now-note"]', phase === "before" && !immediateOpen - ? "Available one hour before the test; schedule it now with Option 2." + ? "The join command unlocks one hour before the test." : phase === "before" ? "The setup window is open; the timeout includes the hour before the official start." : phase === "active" diff --git a/docs/_stylesheets/preset_test.css b/docs/_stylesheets/preset_test.css index 43cada35..e285619a 100644 --- a/docs/_stylesheets/preset_test.css +++ b/docs/_stylesheets/preset_test.css @@ -139,6 +139,27 @@ margin-bottom: 0; } +.preset-test-quick-command { + border: 1px solid var(--preset-border); + border-radius: 0.6rem; + margin-top: 1rem; + padding: 0.85rem 1rem 1rem; + background: color-mix(in srgb, var(--preset-cyan) 5%, var(--md-default-bg-color)); +} + +.preset-test-quick-command h3 { + margin: 0 0 0.4rem; + font-size: 1rem; +} + +.preset-test-quick-command .preset-test-note + .preset-test-note { + margin-top: 0.4rem; +} + +.preset-test-stock-leave { + margin: 1rem 0; +} + .preset-test-error { color: var(--md-code-hl-number-color); font-weight: 650; @@ -175,6 +196,8 @@ padding-right: 0.5rem; } +.preset-test-quick-command pre, +.preset-test-stock-leave pre, .preset-test-card pre, .preset-test > [data-role="content"] > section > pre { margin: 0.8rem 0; @@ -182,6 +205,8 @@ border-radius: 0.35rem; } +.preset-test-quick-command pre code, +.preset-test-stock-leave pre code, .preset-test-card pre code, .preset-test > [data-role="content"] > section > pre code { white-space: pre-wrap; @@ -348,6 +373,26 @@ content: "Close generator"; } +.preset-test-stock-leave > summary::after { + content: "Show leave command"; +} + +.preset-test-stock-leave[open] > summary::after { + content: "Hide leave command"; +} + +.preset-test-keymind-disclosure > summary::after { + content: "Show advanced"; +} + +.preset-test-keymind-disclosure { + margin-top: 1.4rem; +} + +.preset-test-keymind-disclosure[open] > summary::after { + content: "Hide advanced"; +} + .preset-test-generator-disclosure-body { padding: 0 1rem 1rem; } diff --git a/docs/preset_test.md b/docs/preset_test.md index 5f309c83..32cb4125 100644 --- a/docs/preset_test.md +++ b/docs/preset_test.md @@ -3,8 +3,6 @@ Choose a window and radio tuple to create a shareable temporary-radio test URL. -Open a generated URL to see that test's status, instructions, and commands. -
@@ -25,6 +23,17 @@ Open a generated URL to see that test's status, instructions, and commands. Scheduled
+
+

Stock firmware: copy this tempradio command

+
+ +

+

+ Before sending it, run get radio and save the result. + No clock setup is needed. Your saved settings return automatically. +

+
+
Starts in — @@ -35,291 +44,17 @@ Open a generated URL to see that test's status, instructions, and commands.
Start
End
Display time zone
-
Firmware epochs
-
-

Bridges and early-revert plan

-

- The test will include bridges. If the Puget Sound area experiences a - widespread power outage or loss of cellular service, we will end the - test early. A stock node's one-minute temporary test profile then ends - on that node's own saved radio settings. -

-
- -
-

Before changing a radio

-

- Run get radio and record the saved primary tuple. Both - primary TempRadio methods return to that saved tuple; they do not store - a return tuple inside the temporary command. On a Companion, also run - get radio2 and get radio2.cross so you can restore - any non-default secondary-profile setup. -

-
- -
-

Check the node clock before scheduling

-

- The primary tempradioat and Companion - tempradioat2 schedulers use UTC Unix time. Run - clock on every node that will be scheduled and compare it - with the browser UTC time below. It should agree to within about a minute. - A wrong clock can start late, start immediately, or cause the schedule to - be rejected. -

- -
-
- Browser UTC now - — -
-
- Browser Unix time - — -
+
+

Need to leave the test early?

+
+

Send this command to return to your saved radio settings in one minute:

+
+
- -
- - -
-

- No node-clock correction is applied. Scheduled commands use the normal UTC epochs. -

- -

- This changes only the absolute tempradioat and - tempradioat2 epochs shown on this page; it does not issue a - clock-setting command. The correction is for this node and this open page - only: it is never added to generated URLs, and is cleared on reload. If - the node clock later syncs or jumps, delete and queue the schedule again. -

- -
-
-

Remote admin session

-

- In a MeshCore client that supplies the sender timestamp, sync and - then verify: -

-
clock sync
-clock
-
- -
-

Local USB or browser console

-

Copy this fresh, run it immediately, and then verify with clock:

-
time 0
-clock
- -
- -
-

If the clock is ahead and cannot move backward

-

- If setting the correct time returns ERR: clock cannot go backwards, - run the command below. It resets the clock to an older fallback date and - reboots the node immediately, so it sends no reply. After the node reconnects, - copy and run the fresh local clock command above, verify with clock, - and then add the Companion tempradioat2 schedule again. The - reboot clears any pending scheduled entries. -

-

- If resetting or correcting this remote node's clock is not safe, leave - it unchanged and use the optional node-clock conversion above instead. -

-
clkreboot
- -
-
- -

- The Companion schedule must be queued while both its start and end are - in the future and within the firmware's roughly 24-day scheduling - horizon. Scheduled entries are held in RAM and disappear if the node - reboots. -

-
- -
-

Option 1: switch during the setup window

-

- The immediate commands become available one hour before the official - start. Their timeout shrinks so every node still returns at the same end - time. Before that setup window, the command text and copy controls stay - unavailable. -

- -
-
-
-

Stock repeater, room server, or sensor

- Primary radio -
-
- -

-
- -
-
-

Companion using both frequencies

- Dual profile -
-
- -

- rxtx permits transmission on the second profile; - radio2.cross on copies ordinary Companion traffic across - the primary and temporary profiles. -

-
-
-
- -
-

Option 2: schedule a supported node in advance

-

- A Simple Repeater build can schedule its primary radio with - tempradioat. A Companion can instead schedule its second - profile with tempradioat2. Both commands use the exact UTC - epochs below, switch at the common start, and restore saved settings at - the common end. A node-clock conversion above replaces only those command - epochs with its per-node translated values. Room-server and sensor roles - use Option 1 instead. -

- -
-
-
-

Room server or sensor

- No advance schedule -
-

- Use the immediate tempradio command in Option 1 after - its setup window opens. -

-
- -
-
-

Simple Repeater primary radio

- Primary schedule -
-
- -

- This is available only on a Simple Repeater build with primary - scheduled-radio support. It changes the primary tuple at the start - and restores the saved tuple at the end. If get tempradioat - returns Error: unsupported, use Option 1 instead. -

-
- -
-
-

Companion using both frequencies

- Dual-profile schedule -
-
- -

- Crossing is saved independently and remains on after the - temporary second profile ends. Restore its previous value after the - test; auto is the normal default. -

-
-
-
- -
-

Cancel or leave the test

-

- A stock node can leave an active test as shown below. For a primary or - Companion schedule, the all form removes every temporary - schedule in that family. To preserve another schedule, first run the - corresponding get command and replace all with - its displayed entry number. -

- -
-
-

Stock · while it is running

-

Leave now · stock compatible

-
- -

- Stock MeshCore has no normalradio command. This starts a - one-minute temporary session on this page's test profile without - saving over the node's configuration. When that minute ends, the node - restores whatever primary radio settings it had saved. -

-

Leave in 30 minutes

-
- -

- This replaces the current temporary timeout with 30 minutes, then - restores the saved primary tuple automatically. -

-
- -
-

Simple Repeater · scheduled primary radio

-
- -

- Before the start, this removes the queued temporary schedule. While - it is running, it also restores the saved primary tuple after the - command reply drains. -

-
- -
-

Companion · before it starts

-
- -
- -
-

Companion · while it is running

-

Leave now

-
- -

- If get radio2.cross was not auto before the - test, restore that recorded value instead. -

-

Leave in 30 minutes

-
- -

- These commands clear any absolute second-profile schedule and give - the test profile a fresh 30-minute lease. The saved second profile - returns at expiry, but crossing remains on; afterward, - restore the value you recorded before the test (auto is - the normal default). -

-
-
-
+
@@ -449,15 +184,284 @@ clock diff --git a/mkdocs.yml b/mkdocs.yml index e5486326..2a15760b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -22,7 +22,7 @@ extra_css: - _stylesheets/telemetry_decoder.css - _stylesheets/management_decoder.css - _stylesheets/filter_tool.css - - _stylesheets/preset_test.css?v=20260921-1 + - _stylesheets/preset_test.css?v=20260922-1 extra_javascript: - https://unpkg.com/leaflet@1.9.4/dist/leaflet.js @@ -30,4 +30,4 @@ extra_javascript: - _javascript/telemetry_decoder.js - _javascript/management_decoder.js - _javascript/filter_tool.js - - _javascript/preset_test.js?v=20260921-3 + - _javascript/preset_test.js?v=20260922-1 diff --git a/test/test_preset_test.js b/test/test_preset_test.js index 4385e91b..6a855e9b 100644 --- a/test/test_preset_test.js +++ b/test/test_preset_test.js @@ -14,6 +14,38 @@ assert.doesNotMatch(pageSource, /