This commit is contained in:
Martin Fuchs
2026-08-16 16:31:48 +02:00
parent 7b93d9a5d5
commit cf5c60da38
2 changed files with 9 additions and 17 deletions
+1 -1
View File
@@ -152,7 +152,7 @@ Returns estimated duration in **milliseconds** for the current path buffer, or f
`stopPath()` aborts the current `runPath` and unblocks any wait for Marlin `ok`. `stopPath()` aborts the current `runPath` and unblocks any wait for Marlin `ok`.
`stopPlot()` first press is the same as **Pause**: finish the current stroke, then **Resume** continues. Second press is an emergency `M410` quick-stop. That leaves belt length unknown on a polargraph, so **home is cleared** — jog to origin and press **H** before plotting again. An `ok` timeout pauses the same way (no `M410`); that segment is skipped. `stopPlot()` first press is the same as **Pause**: finish the current stroke, then **Resume** continues. Second press stops the browser from sending more moves. The **in-flight** `G1` still runs — this firmware does not have `EMERGENCY_PARSER`, so `M410` cannot interrupt motion (and on a polargraph it desyncs belts). Unplug power for a hard stop.
### `pausePlot()` / `resumePlot()` ### `pausePlot()` / `resumePlot()`
+8 -16
View File
@@ -354,27 +354,19 @@ class WallPlotter {
/** /**
* First press: pause after the current stroke (safe to Resume). * First press: pause after the current stroke (safe to Resume).
* Second press: emergency M410 — home is cleared, do not resume. * Second press: stop sending more moves. The in-flight G1 still finishes
* (Marlin has no emergency parser). Do not send M410 — it cannot interrupt
* a running move, and on a polargraph it desyncs belt lengths.
*/ */
async stopPlot() { async stopPlot() {
const hadWait = this._okResolvers.length > 0; const hadWait = this._okResolvers.length > 0;
if (this.isPlotting && this.isPaused) { if (this.isPlotting && this.isPaused) {
this.stopPath(); this.stopPath();
if (this.connected && !this._plotTestOnly) { this.statusText = 'Stopped — current stroke may still finish';
try { this.onLog(
await this.send('M410', { waitOk: false, allowWithoutHome: true }); 'plot aborted — motors finish the in-flight move (unplug power for a hard stop)'
} catch (_) { );
/* port may be busy */
}
this.homeSet = false;
this._okIgnoreUntil = performance.now() + 1500;
this._homeWarning = 'Re-home (H) after emergency stop — position is unknown';
this.statusText = this._homeWarning;
} else {
this.statusText = 'Stopped';
}
this.onLog('plot aborted — set home before plotting again');
return; return;
} }
@@ -1517,7 +1509,7 @@ class WallPlotter {
'H set current pos as home (G92) — required first', 'H set current pos as home (G92) — required first',
'0 go to origin (0, 0)', '0 go to origin (0, 0)',
'P toggle pen (test up/down angles)', 'P toggle pen (test up/down angles)',
'S stop after current stroke (S again = e-stop, re-home)', 'S stop sending (in-flight stroke still finishes)',
'C connect / disconnect', 'C connect / disconnect',
]; ];
for (let i = 0; i < help.length; i++) { for (let i = 0; i < help.length; i++) {