Add Pixelcade v2 board support with protocol auto-detection.#562
Merged
Conversation
Owner
Author
|
@greptileai review this |
Detect the protocol variant, firmware version and panel size from the firmware descriptor returned during the connection handshake, mirroring the reference implementation in libdmdutil PR #90. - v1: unchanged (0x1F frame command with bit-planes) - v2, firmware < 23: raw [cmd][data] commands carrying RGB565 (0x30) or RGB888 (0x40), no plane splitting - v2, firmware >= 23: same payloads wrapped in a length-prefixed frame (0xFE 0xFE | len | cmd | data | 0xAA), with a one-time 0xEF init command to switch the board into framed mode Add green/blue channel swapping for the v2 raw path so the "rbg" color matrix is honored, panel size detection ('X'=128x32, 'M'=64x32), and per-frame change detection to skip identical frames. Update DmdDevice.ini to document v1/v2 auto-detection and default the matrix to "rbg", which most panels require.
The swapped-channel payload lives in the over-sized _swapBuffer, so relying on data.Length compared the whole buffer instead of just the meaningful frame bytes. Pass the real payload length down to SendV2Frame and track it alongside the command, comparing only those bytes (and resetting the cache on reconnect). Also warn instead of silently defaulting when an unrecognized panel size code arrives.
Owner
Author
|
@greptileai ready to ship? |
|
All 3 review threads are resolved — the P1 bug (wrong RGB565 payload length), the P2 silent fallback, and the change-detection inconsistency were all addressed. The PR is mergeable with no blocking CI checks. One note: Tip: You can customize Greptile's behavior for this repo with |
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.
Detect the protocol variant, firmware version and panel size from the firmware descriptor returned during the connection handshake, mirroring the reference implementation in vpinball/libdmdutil#90.
Add green/blue channel swapping for the v2 raw path so the "rbg" color matrix is honored, panel size detection ('X'=128x32, 'M'=64x32), and per-frame change detection to skip identical frames.
Update DmdDevice.ini to document v1/v2 auto-detection and default the matrix to "rbg", which most panels require.
@alinke can you have a look at this, please?