@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.
- package/lib/sim.mjs +9 -10
- 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
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
const note = (
|
|
44
|
-
"
|
|
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
|
-
|
|
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.
|