@meshbench/client 0.0.1 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/sim.mjs +9 -10
  2. package/package.json +1 -1
package/lib/sim.mjs CHANGED
@@ -34,17 +34,16 @@ export class Sim {
34
34
  // The links first. Nothing that follows means anything against a matrix
35
35
  // that is still being measured.
36
36
  await this._wb.waitIdle(warmMs);
37
- // Idle is not the same as measured. A warm that stopped to ask permission
38
- // to download terrain finishes its own job row, so the wait above returns
39
- // in a moment having waited for nothing: no link was measured, and every
40
- // study after this would answer over free space.
41
- const held = await this.state();
42
- if (held.warm_held) {
43
- const note = (held.ground || {}).note ||
44
- "call terrain.allow to answer the question either way";
37
+ // Idle is not the same as measured. A warm that failed or was cancelled
38
+ // finishes its own job row, so the wait above returns having waited for
39
+ // nothing: no link was measured, and every study after this would answer
40
+ // over free space.
41
+ const now = await this.state();
42
+ if (!now.links_measured && !now.warming) {
43
+ const note = (now.ground || {}).note ||
44
+ "warm the links again before reading anything from this run";
45
45
  throw new MeshbenchError(
46
- "the link measurement is held: no terrain has been downloaded and no " +
47
- `link has been measured. ${note}`);
46
+ `no link has been measured, so nothing here can reach anything. ${note}`);
48
47
  }
49
48
  // Then every node that is not up, which firmware.start does and sim.start
50
49
  // does only when none of them are.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshbench/client",
3
- "version": "0.0.1",
3
+ "version": "0.0.6",
4
4
  "description": "Drive a running MeshBench workbench from Node over its control socket.",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "type": "module",