mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-09-26 15:17:54 +00:00
docs: keep node clock correction page-local
This commit is contained in:
+3
-2
@@ -108,8 +108,9 @@ Open a generated URL to see that test's status, instructions, and commands.
|
||||
<p class="preset-test-note">
|
||||
This changes only the absolute <code>tempradioat</code> and
|
||||
<code>tempradioat2</code> epochs shown on this page; it does not issue a
|
||||
clock-setting command. The correction is for this node only. If the node
|
||||
clock later syncs or jumps, delete and queue the schedule again.
|
||||
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.
|
||||
</p>
|
||||
|
||||
<div class="preset-test-grid preset-test-grid--clock">
|
||||
|
||||
@@ -35,6 +35,10 @@ const defaults = tool.configFromSearch("", "America/Los_Angeles");
|
||||
assert.strictEqual(tool.hasPresetParameters(""), false);
|
||||
assert.strictEqual(tool.hasPresetParameters("?"), false);
|
||||
assert.strictEqual(tool.hasPresetParameters("?utm_source=example"), false);
|
||||
assert.strictEqual(
|
||||
tool.hasPresetParameters("?node_clock=1790044920&node_clock_at=1790034120"),
|
||||
false
|
||||
);
|
||||
assert.strictEqual(tool.hasPresetParameters("?freq=911.3"), true);
|
||||
assert.strictEqual(tool.hasPresetParameters("?tz=UTC"), true);
|
||||
assert.strictEqual(tool.hasPresetParameters("?start=bad"), true);
|
||||
@@ -128,6 +132,12 @@ assert.strictEqual(
|
||||
adjustedCommands.stockNow,
|
||||
tool.commandsFor(clockAdjustedLink, clockAdjustedLink.startMs).stockNow
|
||||
);
|
||||
const pageOnlyClockUrl = new URL(tool.configuredUrl(
|
||||
clockAdjustedLink,
|
||||
"https://example.test/preset-test/"
|
||||
));
|
||||
assert.strictEqual(pageOnlyClockUrl.searchParams.has("node_clock"), false);
|
||||
assert.strictEqual(pageOnlyClockUrl.searchParams.has("node_clock_at"), false);
|
||||
assert.throws(
|
||||
() => tool.schedulerEpochs(clockAdjustedLink, tool.SCHEDULER_EPOCH_MAX),
|
||||
/outside the firmware range/
|
||||
|
||||
Reference in New Issue
Block a user