Skip to content

fix(info): derive has_matl_station instead of copying the raw flag - #14

Closed
RedAces wants to merge 1 commit into
GhostTypes:mainfrom
RedAces:creator5_fix_material_station
Closed

fix(info): derive has_matl_station instead of copying the raw flag#14
RedAces wants to merge 1 commit into
GhostTypes:mainfrom
RedAces:creator5_fix_material_station

Conversation

@RedAces

@RedAces RedAces commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

FFMachineInfo.has_matl_station was a straight copy of the raw hasMatlStation value from /detail. That field is AD5X-only: a Creator 5 Pro omits it entirely — verified on real hardware (pid 41, firmware 1.9.4) — while reporting a fully populated matlStationInfo with four loaded slots. Consumers gating features on the flag therefore saw no material station on exactly the models that have one.

from_detail already computed the correct value for its internal AD5X name heuristic (flag is True OR slotCnt > 0 OR non-empty slotInfos) and then discarded it. Expose that derived value instead; it is now always a concrete True/False. FFPrinterDetail.has_matl_station keeps the untouched firmware value for callers that need to know what the printer actually sent.

Add CREATOR_5_PRO_MATL_STATION_INFO, a station block captured from real hardware and deliberately without hasMatlStation. The Creator 5 fixtures had no material station at all, which is why this went unnoticed through v1.3.1.

@GhostTypes

Copy link
Copy Markdown
Owner

Thank you for this! Please see my comment on your other PR when you have time, I'd like to confirm some information before I merge this as I lack a Creator 5 to test on myself

Repository owner deleted a comment from gemini-code-assist Bot Jul 25, 2026
FFMachineInfo.has_matl_station was a straight copy of the raw
hasMatlStation value from /detail. That field is AD5X-only: a Creator 5
Pro omits it entirely — verified on real hardware (pid 41, firmware
1.9.4) — while reporting a fully populated matlStationInfo with four
loaded slots. Consumers gating features on the flag therefore saw no
material station on exactly the models that have one.

from_detail already computed the correct value for its internal AD5X
name heuristic (flag is True OR slotCnt > 0 OR non-empty slotInfos) and
then discarded it. Expose that derived value instead; it is now always a
concrete True/False. FFPrinterDetail.has_matl_station keeps the
untouched firmware value for callers that need to know what the printer
actually sent.

Add CREATOR_5_PRO_MATL_STATION_INFO, a station block captured from real
hardware and deliberately without hasMatlStation. The Creator 5 fixtures
had no material station at all, which is why this went unnoticed through
v1.3.1.

# Conflicts:
#	CLAUDE.md
#	ai_specs/TEST_COVERAGE_SPEC.md
#	docs/models.md
#	flashforge/api/controls/info.py
#	flashforge/models/machine_info.py
#	tests/fixtures/printer_responses.py
#	tests/test_machine_info_parity.py
@RedAces
RedAces force-pushed the creator5_fix_material_station branch from 0e8c9d6 to d145910 Compare July 26, 2026 23:40
@RedAces

RedAces commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Ive rebased my branch onto main and now its empty! Thanks for merging this and for the awesome other fixes!

@RedAces RedAces closed this Jul 26, 2026
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.

2 participants