Files
ESP32-WijiBoard/web/assets/backgrounds/sequence_spec.md
T
PROFERIS - Mi³osz Stocki 228cbf2329 Sequence editor. Layout fixes
2026-07-07 11:54:50 +02:00

55 lines
1.5 KiB
Markdown

# Sequence Configuration Specification (`sequences.json`)
Sequences allow predefined orchestration of movements. They are stored per-background in `web/assets/backgrounds/<bg_name>/sequences.json`.
## File Structure
The file should contain a JSON array of sequence objects.
```json
[
{
"id": "demo_sequence",
"name": "Demo Mix",
"favorite": true,
"steps": [
{
"type": "spot",
"id": "A"
},
{
"type": "spot",
"id": "B",
"delay": 1500
},
{
"type": "xy",
"x": 50,
"y": 120,
"delay": 500
}
]
}
]
```
## Sequence Object Properties
- `id` (string): Unique identifier for the sequence.
- `name` (string): Human-readable name displayed in the UI.
- `favorite` (boolean): If `true`, this sequence will appear in the "Quick Sequences" box across relevant sections (`board-control`, `input-text`, `stepper-test`).
- `steps` (array): A list of step objects executed in order.
## Step Object Properties
All steps share an optional `delay` property. If omitted, the global delay setting is used.
- `delay` (number, optional): Delay in milliseconds to wait *after* reaching the target before moving to the next step.
### Type: "spot"
Moves to a predefined spot in the background's `spots.json`.
- `type`: Must be `"spot"`.
- `id`: The spot ID string (e.g., `"YES"`, `"A"`).
### Type: "xy"
Moves to a raw X/Y coordinate in mm.
- `type`: Must be `"xy"`.
- `x`: X coordinate (number).
- `y`: Y coordinate (number).