mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-02 17:58:22 -05:00
CrealityPrint::start_print() chose between the plain opGcodeFile start and the colorMatch + multiColorPrint pair by the model id alone, and inside the multi-colour branch it fell back to the plain start only when a filament was mapped onto box 0. A K1-family printer reports the same model id with and without a CFS, and without one it never answers the boxsInfo query, so the send dialog had no slots to map and the printer received a colorMatch with an empty list followed by multiColorPrint. The job printed, but the firmware flagged "no material" (materialStatus 1) for its whole duration. The same happened on any CFS-capable model whenever the boxsInfo query failed. Treat an empty mapping like a mapping onto the spool holder and send the plain start with enableSelfTest, which is what Creality Print does when the printer lists no colours. The command building moves into start_print_commands(), a pure function, so the decision is unit-tested. Every plain start now reads the printer's answer best-effort before closing, as the non-CFS start already did, so the close frame never follows the command in the same burst. Fixes #16695.
OrcaSlicer tests
Building, running and writing tests is documented on the wiki, under How to Test.
Two files here rather than there, because coding agents only read what is in the repository: