feat: temporal dithering, position-light strobe, and BLE TX buffering#2
Merged
spectrachrome merged 5 commits intomainfrom Feb 22, 2026
Merged
feat: temporal dithering, position-light strobe, and BLE TX buffering#2spectrachrome merged 5 commits intomainfrom
spectrachrome merged 5 commits intomainfrom
Conversation
Add RC-based TX link detection: when all 4 stick channels (AETR) read exactly 1500 µs, no transmitter is bound and strobe is suppressed. Prevents false strobe triggers from unassigned AUX channels defaulting to 1500 µs center position. Remove Wi-Fi AP, HTTP web UI, DHCP server, and related dependencies (embassy-net, smoltcp, edge-dhcp, embedded-io). BLE is now the sole control interface. Expose tx_linked field in BLE StateResponse for app display.
Add temporal dithering module (src/dither.rs) with three algorithms: error diffusion, ordered Bayer 4x4, and hybrid (default). 8.8 fixed-point gamma LUTs computed at compile time provide sub-u8 precision. The LED task now runs an inner dither loop at dither_fps rate (100-960 Hz) between animation frames. Gate AUX strobe on flight_mode != ArmingForbidden instead of RSSI-based tx_linked heuristic — the FC's own state machine already validates RX link, eliminating false strobe triggers from noisy RSSI when no TX is connected. BLE commands: SetDitherMode, SetDitherFps, DisplayTestPattern, CancelTestPattern. Default dither mode is Hybrid at 300 Hz.
Remap AUX strobe switches: AUX8 momentary and AUX7 mid both trigger white strobe at 80, AUX7 high triggers red/green position-light strobe. Add strobe_split field to LedState for split colour rendering. BLE TX responses are now appended after unsent data instead of overwriting, with a compact step to reclaim consumed buffer space.
Reorder AUX7 three-way: off → red/green position-light → white. Use quadratic envelope for sharper strobe flash. Scale green to 75% to match perceived red brightness. Fix port/starboard color swap.
spectrachrome
added a commit
that referenced
this pull request
Feb 23, 2026
Binary protocol (22-byte state snapshots, 1–4 byte commands), TestPattern command, GetVersion command, removed serde/heapless deps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Temporal dithering for WS2812B LEDs — error-diffusion, ordered (Bayer
4×4), and hybrid modes add perceived bit depth by varying quantized output
frame-to-frame faster than flicker fusion. Controlled at runtime via
SetDitherMode/SetDitherFpsBLE commands. Disabled by default.(port/starboard) → white. AUX8 momentary triggers white strobe. Quadratic
envelope for sharper flash, green scaled to 75% for perceptual brightness
match.
with a compact step, preventing overwrites when multiple responses queue
up.
and when FC reports ArmingForbidden (no valid RX link).
Test plan
white
SetDitherMode) and confirmsmooth gradients at low brightness