From 68eb036defc9d9327cbdad5fda74e00560d64f2d Mon Sep 17 00:00:00 2001 From: osiu97 Date: Wed, 8 Jul 2026 21:46:11 +0200 Subject: [PATCH] gemini.md --- gemini.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gemini.md b/gemini.md index 194a4b3..93f6b13 100644 --- a/gemini.md +++ b/gemini.md @@ -191,7 +191,7 @@ Centralised trajectory generation and streaming module. - **Why**: Moving side-to-side linearly in joint space causes the arms to arc dangerously out-of-bounds at the top. - **How it works**: Intercepts `Motion.goto(x, y)`, slices the Cartesian straight line into small segments (max `25 mm` by default, configurable in `Motion.CONFIG.SEGMENT_SIZE_MM`), and streams them to the ESP32. - **Dynamic Blending**: It monitors `P:` positional updates from the ESP32 and fires the next waypoint *before* `AccelStepper` decelerates (when within `BLEND_THRESHOLD_STEPS`). This produces a seamless Cartesian trajectory with no MCU code changes. -- **Motion Effects**: The `Motion.goto(x, y, mode)` method accepts visual flavor modes (snaky, erratic, jumpy, hesitant, overshoot, random, direct). The system translates these into path perturbations and dynamic speed/acceleration modifiers (`SPD:` and `ACC:` BLE commands injected during execution) to create complex behavior over the linkage while maintaining safety limits. +- **Motion Effects (`web/js/motion-effects.js`)**: Visual flavor modes (snaky, erratic, jumpy, hesitant, overshoot, random, direct) are encapsulated in their own module to keep the core orchestrator clean. The `MotionEffects` singleton intercepts trajectory generation (`applyPerturbation`) and queue execution (`onWaypointSend`, `getQueueAction`) to dynamically inject BLE speed commands (`SPD:`) or alter queue blending logic (e.g. lowering the blend threshold to force physical synchronization of mid-move speed changes without stuttering). - **Simulation Sync**: In simulation mode, `Motion.goto()` instantly updates its internal steps and manually dispatches a fake `ble:status` event containing `P:s1,s2`. This allows all UI components to effortlessly sync their visual state using their existing BLE listeners. ---