Sequence editor. Layout fixes
This commit is contained in:
@@ -374,6 +374,11 @@ The `?v=Date.now()` on imports handles this automatically on page load.
|
||||
- Text input to spell words automatically
|
||||
- Delay, Speed, and Acceleration sliders
|
||||
- Position overlay marker on background
|
||||
- [x] Sequence Editor section (`sequence-editor.js`) & Runner:
|
||||
- Vertical list builder for custom sequences (Spots or X/Y).
|
||||
- JSON export to persist sequences to `sequences.json`.
|
||||
- Quick Sequences UI in `stepper-test`, `board-control`, and `input-text`.
|
||||
- Shared `sequence-runner.js` to handle asynchronous execution and delays.
|
||||
- [x] Firmware (`src/main.cpp`) — AccelStepper + BLE command parser + position NOTIFY
|
||||
|
||||
---
|
||||
@@ -393,10 +398,11 @@ The router currently only has three routes. These sections need to be created/ex
|
||||
- Requires background `spots.json` to have `"hasAlphabet": true`.
|
||||
- Persisted Speed, Acceleration, and Delay settings.
|
||||
|
||||
### `sequence-editor` section (not started)
|
||||
- Record and replay a sequence of moves
|
||||
- Save/load sequences to localStorage
|
||||
- Simple list UI: add step, delete step, reorder, run
|
||||
### `sequence-editor` section (implemented)
|
||||
- Record and replay a sequence of moves.
|
||||
- Draft sequences auto-save to `localStorage`.
|
||||
- Simple list UI: add Spot step, add XY step, delete step, reorder, play sequence.
|
||||
- Export as JSON to paste into `web/assets/backgrounds/<bg>/sequences.json`.
|
||||
|
||||
To add a new section:
|
||||
1. Create `web/js/sections/<name>.js` exporting `{ mount(el), unmount() }`
|
||||
@@ -421,6 +427,7 @@ To add a new section:
|
||||
| **`fivebarIKGame.js` is reference only** | The original site's game uses a different angle convention (absolute degrees, different home, with `ikElbowSigns` tracking). We use the C++ IK formula instead because it directly produces step deltas from home. `fivebarIKGame.js` is kept in the repo for reference and understanding, not imported. |
|
||||
| **Hash-based routing** | Keeps the SPA working from `file://` and simple static servers without needing a history API setup |
|
||||
| **Persistent Homing State** | The UI uses `localStorage.getItem('wiji_homed')` to track if the arm has been homed during the user's ongoing interaction. This avoids forcing the user to re-home every time they switch tabs or pages. Sending `HOMEALL` sets this to `true`. |
|
||||
| **Stateless Sequence Storage** | To remain serverless, sequences are stored per-background in `web/assets/backgrounds/<bg>/sequences.json`. The Sequence Editor generates the JSON payload, which the user manually copy-pastes into the file to persist. Sequences marked `"favorite": true` appear automatically in Quick Sequences cards across the app. |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user