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
+8 -16
View File
@@ -354,27 +354,19 @@ class WallPlotter {
/**
* 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() {
const hadWait = this._okResolvers.length > 0;
if (this.isPlotting && this.isPaused) {
this.stopPath();
if (this.connected && !this._plotTestOnly) {
try {
await this.send('M410', { waitOk: false, allowWithoutHome: true });
} 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');
this.statusText = 'Stopped — current stroke may still finish';
this.onLog(
'plot aborted — motors finish the in-flight move (unplug power for a hard stop)'
);
return;
}
@@ -1517,7 +1509,7 @@ class WallPlotter {
'H set current pos as home (G92) — required first',
'0 go to origin (0, 0)',
'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',
];
for (let i = 0; i < help.length; i++) {