Skip to content

OpenSpool: parse additional_color_hexes for multicolor spools - #37

Open
RrrrobertB1992 wants to merge 1 commit into
suchmememanyskill:mainfrom
RrrrobertB1992:openspool-additional-colors
Open

RrrrobertB1992 wants to merge 1 commit into
suchmememanyskill:mainfrom
RrrrobertB1992:openspool-additional-colors

Conversation

@RrrrobertB1992

@RrrrobertB1992 RrrrobertB1992 commented Oct 15, 2026 •

Copy link
Copy Markdown

OpenSpool tags can carry extra colors in additional_color_hexes. The Snapmaker U1 Extended Firmware documents this field for multicolor spools (dual-color, rainbow), and its built-in reader already parses it. The OpenRFID OpenSpool processor only reads color_hex, so every multicolor OpenSpool tag shows up as a single color.

Changes

-Append up to 4 entries from additional_color_hexes to colors, for 5 total. That matches the U1's FILAMENT_PROTO_COLOR_NUMS_MAX. The extra colors use the tag's alpha.
-Pass all colors to generate_unique_id. A single-color tag still produces exactly the same unique_id as before.
-Add a fixture: test/tags/OpenSpool/eSUN PLA Silk Red Blue OpenSpool.bin/.yml, a red/blue dual-color tag.

Testing

-pytest test: 97 passed, 1 skipped. Without the fix, the new fixture fails; all existing fixtures are unchanged.
-Tested on hardware: a Snapmaker U1 on Extended Firmware with base 2.0.0.205, using this change plus the companion firmware PR below. I loaded a red/blue OpenSpool tag (color_hex: FF0000, additional_color_hexes: ["0000FF"]) with OpenRFID as the detection system. Results:
print_task_config.filament_color_multi for that channel: nums 2, colors ["FF0000", "0000FF"]. Before this change it showed nums 1, ["FF0000"].
-The touchscreen shows the spool as a red/blue split swatch.
-I changed both colors by hand, then refreshed from the tag, and both colors went back to the tag's values.
-Single-color spools (Anycubic tags) on the other channels still show one color.

Images

Screenshot_20261015_194248

Companion firmware PR, which forwards colors 2–5 to the printer: [(https://github.com/paxx12-snapmaker-u1/SnapmakerU1-Extended-Firmware/pull/788)]

OpenSpool tags may carry extra colors in `additional_color_hexes`
(used by the Snapmaker U1 extended firmware for dual/rainbow spools).
The processor previously kept only `color_hex`, dropping the rest.

Append up to 4 additional colors (5 total, matching the U1's
FILAMENT_PROTO_COLOR_NUMS_MAX) to `colors`, using the tag's alpha.
Single-color tags produce the same output and unique_id as before.

Adds a dual-color (red/blue) OpenSpool fixture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011NVRoJLjL7JBmLBtmjrTrv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant