plotter drawing size and stop with key

This commit is contained in:
Martin Fuchs
2026-08-15 16:40:42 +02:00
parent e293b2f434
commit 5ca9b99df8
4 changed files with 153 additions and 41 deletions
+7 -7
View File
@@ -26,8 +26,8 @@ All options are optional.
| `penDownGcode` | `M280 P0 S50` | Command to lower pen |
| `penUpDelayMs` | `150` | Pause after pen up, ms |
| `penDownDelayMs` | `50` | Pause after pen down, ms |
| `machineXMin` / `machineXMax` | `-850` / `850` | Overlay X extents, mm |
| `machineYMin` / `machineYMax` | `-1000` / `1000` | Overlay Y extents, mm |
| `machineXMin` / `machineXMax` | `-830` / `830` | Overlay X extents, mm (idler spacing 1660) |
| `machineYMin` / `machineYMax` | `-1200` / `800` | Overlay Y; idlers at Y=800 (80 cm above work centre) |
| `jogIntervalMs` | `150` | Repeat delay while holding arrows, ms |
| `maxLogLines` | `8` | Serial lines shown on the HUD |
| `previewMinDelayMs` | `30` | Floor for preview segment wait, ms |
@@ -144,9 +144,9 @@ Sketch: `plot()` → `runPath(false)`, `test()` → `runPath(true)`.
Returns estimated duration in **milliseconds** for the current path buffer, or for `commands` if given. Uses `setSpeed`, queued `speed()`, `wait()`, and `timingMultiplier`. The HUD shows elapsed / est / remain while plotting.
### `stopPath()`
### `stopPath()` / `stopPlot()`
Abort the current `runPath`. No arguments.
`stopPath()` aborts the current `runPath`. `stopPlot()` also sends Marlin `M410` (quick stop) during a live plot. Key **S** calls `stopPlot()` while plotting.
---
@@ -156,7 +156,7 @@ All **async**. Coordinate moves on Plot require home (`H`) first.
### `connect()`
Web Serial port picker, enable steppers (`M17`), pen up, `M114`.
Web Serial port picker, enable steppers (`M17`), pen up, query polargraph area (`M665` → machine overlay bounds), `M114`.
### `disconnect()`
@@ -171,9 +171,9 @@ Write one G-code line and wait for Marlin `ok`.
- `options.waitOk` (boolean): wait for `ok`. Default `true`.
- `options.timeoutMs` (number): `ok` timeout, default `300000`.
### `penUp()` / `penDown()`
### `penUp(force?)` / `penDown(force?)`
Send pen G-code and wait the pen delay. No-op if already in that state.
Send pen G-code and wait the pen delay. By default, no-op if already in that state. Pass `true` to always send (used by `P` and on connect) so you can test the configured angles.
### `moveTo(x, y)`