Correct stock preset test commands

This commit is contained in:
mikecarper committed 2026-09-19 09:46:49 -07:00
1 parent a21d6046f6
commit 9356d9a004
4 files changed
+64 -55

No files matched your search

+14 -14
View File
@@ -246,14 +246,10 @@
stockNow: "tempradio " + tuple + "," + minutes,
companionNow:
"set radio2.cross on\nset tempradio2 " + tuple + ",rxtx," + minutes,
stockScheduled:
"set tempradioat " + tuple + "," + config.startEpoch + "," + config.endEpoch +
"\nget tempradioat",
companionScheduled:
"set radio2.cross on\nset tempradioat2 " + tuple + ",rxtx," +
config.startEpoch + "," + config.endEpoch + "\nget tempradioat2",
stockCancelBefore: "get tempradioat\ndel tempradioat all",
stockCancelDuring: "reboot",
stockCancelDuring: "tempradio " + tuple + ",1",
stockLeaveIn30: "tempradio " + tuple + ",30",
companionCancelBefore:
"get tempradioat2\ndel tempradioat2 all\nset radio2.cross auto",
@@ -700,9 +696,7 @@
);
const staticCommands = commandsFor(config, config.startMs);
setCommand(root, "stock-scheduled", staticCommands.stockScheduled);
setCommand(root, "companion-scheduled", staticCommands.companionScheduled);
setCommand(root, "stock-cancel-before", staticCommands.stockCancelBefore);
setCommand(root, "stock-cancel-during", staticCommands.stockCancelDuring);
setCommand(root, "stock-leave-30", staticCommands.stockLeaveIn30);
setCommand(root, "companion-cancel-before", staticCommands.companionCancelBefore);
@@ -827,11 +821,19 @@
setCommand(root, "stock-now", commands.stockNow);
setCommand(root, "companion-now", commands.companionNow);
} else {
const unavailable = phase === "before"
? "Available one hour before the test — use Option 2 to schedule now."
: "Test window ended — do not start TempRadio.";
setCommand(root, "stock-now", unavailable);
setCommand(root, "companion-now", unavailable);
const endedMessage = "Test window ended — do not start TempRadio.";
setCommand(
root,
"stock-now",
phase === "before" ? "Available one hour before the test." : endedMessage
);
setCommand(
root,
"companion-now",
phase === "before"
? "Available one hour before the test — use Option 2 to schedule now."
: endedMessage
);
}
setCommandEnabled(root, "stock-now", immediateOpen);
setCommandEnabled(root, "companion-now", immediateOpen);
@@ -849,9 +851,7 @@
: "The test window has ended."
);
setCommandEnabled(root, "stock-scheduled", schedule.available);
setCommandEnabled(root, "companion-scheduled", schedule.available);
setText(root, '[data-role="stock-schedule-note"]', schedule.reason);
const nowEpoch = Math.floor(nowMs / 1000);
setText(root, '[data-role="browser-utc"]', formatUtc(nowMs));
+38 -35
View File
@@ -47,7 +47,8 @@ tuple; no source edit is required.
<p>
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 and revert to the normal 910.525 MHz channel.
test early. A stock node's one-minute temporary test profile then ends
on that node's own saved radio settings.
</p>
</section>
@@ -65,10 +66,10 @@ tuple; no source edit is required.
<section aria-labelledby="clock-check-title">
<h2 id="clock-check-title">Check the node clock before scheduling</h2>
<p>
<code>tempradioat</code> and <code>tempradioat2</code> use UTC Unix time.
Run <code>clock</code> on every node 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.
The Companion <code>tempradioat2</code> scheduler uses UTC Unix time.
Run <code>clock</code> on every Companion 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.
</p>
<div class="preset-test-clock-check">
@@ -108,8 +109,8 @@ clock</code></pre>
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 <code>clock</code>,
and then add the <code>tempradioat</code> schedule again. The reboot clears any
pending scheduled entries.
and then add the Companion <code>tempradioat2</code> schedule again. The
reboot clears any pending scheduled entries.
</p>
<pre><code data-command="reset-clock">clkreboot</code></pre>
<button type="button" data-copy-command="reset-clock">Copy clock reset command</button>
@@ -117,9 +118,10 @@ clock</code></pre>
</div>
<p class="preset-test-note">
The 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.
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.
</p>
</section>
@@ -160,22 +162,25 @@ clock</code></pre>
</section>
<section aria-labelledby="schedule-title">
<h2 id="schedule-title">Option 2: schedule it in advance</h2>
<h2 id="schedule-title">Option 2: schedule a Companion in advance</h2>
<p>
Use this only after checking the clock above. The exact UTC epochs are
built into the commands, so the node switches at the common start and
restores its saved configuration at the common end.
Stock firmware has no <code>tempradioat</code> command, so a stock node
cannot be queued in advance. Return during the one-hour setup window and
use Option 1. A Companion can use the exact UTC epochs below to switch at
the common start and restore its saved configuration at the common end.
</p>
<div class="preset-test-grid">
<article class="preset-test-card">
<div class="preset-test-card-heading">
<h3>Stock repeater, room server, or sensor</h3>
<span>Primary schedule</span>
<span>No advance schedule</span>
</div>
<pre><code data-command="stock-scheduled"></code></pre>
<button type="button" data-copy-command="stock-scheduled">Copy schedule commands</button>
<p class="preset-test-note" data-role="stock-schedule-note"></p>
<p class="preset-test-note">
Stock firmware provides <code>tempradio</code>, but not
<code>tempradioat</code>. Use the immediate stock command in Option 1
after its setup window opens.
</p>
</article>
<article class="preset-test-card">
@@ -197,28 +202,24 @@ clock</code></pre>
<section aria-labelledby="cancel-title">
<h2 id="cancel-title">Cancel or leave the test</h2>
<p>
Use the command for the node type and timing. The <code>all</code> forms
remove every temporary schedule in that family. To preserve another
schedule, first run the corresponding <code>get</code> command and replace
<code>all</code> with its displayed entry number.
A stock node can leave an active test as shown below. For a Companion
schedule, the <code>all</code> form removes every temporary schedule in
that family. To preserve another schedule, first run the corresponding
<code>get</code> command and replace <code>all</code> with its displayed
entry number.
</p>
<div class="preset-test-cancel-grid">
<article class="preset-test-card">
<h3>Stock · before it starts</h3>
<pre><code data-command="stock-cancel-before"></code></pre>
<button type="button" data-copy-command="stock-cancel-before">Copy cancel commands</button>
</article>
<article class="preset-test-card">
<h3>Stock · while it is running</h3>
<h4>Leave now · stock compatible</h4>
<pre><code data-command="stock-cancel-during"></code></pre>
<button type="button" data-copy-command="stock-cancel-during">Copy stock leave command</button>
<p class="preset-test-note">
Stock MeshCore has no <code>normalradio</code> command. This reboots
the node, which clears TempRadio and returns to its saved radio
settings. The command sends no reply; reconnect after the node starts.
Stock MeshCore has no <code>normalradio</code> 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.
</p>
<h4>Leave in 30 minutes</h4>
<pre><code data-command="stock-leave-30"></code></pre>
@@ -385,7 +386,9 @@ clock</code></pre>
</div>
</div>
The scheduled commands require current full-parser firmware. Companion
`tempradio2` and `tempradioat2` require a build with dual-radio-profile support.
If a node reports an unknown command, update it or use only a method that its
installed firmware documents.
Stock firmware does not support advance TempRadio scheduling; use its immediate
<code>tempradio</code> command during the setup window. The Companion scheduling
commands require current full-parser firmware, and
<code>tempradio2</code> and <code>tempradioat2</code> require a build with
dual-radio-profile support. If a node reports an unknown command, use only a
method that its installed firmware documents.
+1 -1
View File
@@ -30,4 +30,4 @@ extra_javascript:
- _javascript/telemetry_decoder.js
- _javascript/management_decoder.js
- _javascript/filter_tool.js
- _javascript/preset_test.js?v=20260916-5
- _javascript/preset_test.js?v=20260919-1
+11 -5
View File
@@ -13,6 +13,10 @@ assert.doesNotMatch(
pageSource,
/<details class="preset-test-generator-disclosure"\s+open/
);
assert.match(pageSource, /Stock firmware has no <code>tempradioat<\/code> command/);
assert.doesNotMatch(pageSource, /data-command="stock-scheduled"/);
assert.doesNotMatch(pageSource, /Stock · before it starts/);
assert.doesNotMatch(pageSource, /Normal return profile/);
const query =
"?start=2026-09-21T17:00:00-07:00" +
@@ -73,10 +77,8 @@ assert.strictEqual(tool.remainingMinutes(config, setupOpens), 2940);
const commands = tool.commandsFor(config, active);
assert.strictEqual(commands.stockNow, "tempradio 910.1,500,8,7,2880");
assert.strictEqual(
commands.stockScheduled,
"set tempradioat 910.1,500,8,7,1790035200,1790208000\nget tempradioat"
);
assert.strictEqual(commands.stockScheduled, undefined);
assert.strictEqual(commands.stockCancelBefore, undefined);
assert.strictEqual(
commands.companionNow,
"set radio2.cross on\nset tempradio2 910.1,500,8,7,rxtx,2880"
@@ -90,7 +92,7 @@ assert.strictEqual(
assert.strictEqual(commands.stockLeaveIn30, "tempradio 910.1,500,8,7,30");
assert.strictEqual(
commands.stockCancelDuring,
"reboot"
"tempradio 910.1,500,8,7,1"
);
assert.strictEqual(
commands.companionLeaveIn30,
@@ -178,6 +180,10 @@ assert.strictEqual(
tool.commandsFor(changed, changed.startMs).stockNow,
"tempradio 915.25,125,10,5,2880"
);
assert.strictEqual(
tool.commandsFor(changed, changed.startMs).stockCancelDuring,
"tempradio 915.25,125,10,5,1"
);
const shared = new URL(tool.configuredUrl(
changed,