Repository navigation
Conversation
Port the parsing from upstream MoonrakerPrinterAgent (mmu gates/materials/colors and lane_data lanes) into PrintHostDeviceStatus so the send-dialog mapping table can show those slots. Extra GETs run only when print_task_config named nothing, and the first objects/query string is left unchanged for PRs #610/#611. Co-authored-by: aceRage <aceRage@users.noreply.github.com>
Add-on mmu/lane_data GETs use a 1 s timeout because probe() runs on the UI thread. Skip them when multi_color_controller reports a QIDI Box so those indices cannot become SAVE_VARIABLE value_tN once #610 lands. Clamp num_gates above 32, cap/dedupe AFC lanes, map CSS colour names, and cover wrong-type fields and huge arrays in Catch2. Co-authored-by: aceRage <aceRage@users.noreply.github.com>
Slot.color stays '#RRGGBB' or empty so auto-match cannot treat a raw name as a colour. Known names still map to hex; unknown ones are kept in Slot.color_name and the dropdown label. Co-authored-by: aceRage <aceRage@users.noreply.github.com>
This was referenced Oct 19, 2026
Elegoo CC upload now uses MaterialItem colour cards and a MappingItem slot popup instead of a text combo, while the start-print slot_map is unchanged. Other hosts keep the existing rows; Bambu and Snapmaker are not switched over. Co-authored-by: aceRage <aceRage@users.noreply.github.com>
Call the panel's DPI/theme handlers from the send dialog, use dark-mode colours only on the new badge and panel paths, add the panel to gettext, label Elegoo warnings with the same 1A-1D tiles, shrink the badge so long types still fit, number unit-less slots 1..N, and keep read-only auto-match visual while encoding an empty mapping. Co-authored-by: aceRage <aceRage@users.noreply.github.com>
update_mapping_note combines mapping_warning() and third_party_mismatch_warning(). Read-only mismatch compares T-number identity, not the visual auto-match. The nozzle badge pill follows Body_10 extent so labels like 10 fit. Co-authored-by: aceRage <aceRage@users.noreply.github.com>
…er-mmu-slots-f5f8 Adopt the shared Bambu-style filament map panel for Happy Hare, AFC, and QIDI Box hosts only (not Snapmaker/U1). Gates/lanes/Box slots group as 1A-1D with colour and type; Slot::index and the sent mapping stay the same. Conflicts in PrintHostDeviceStatus kept both the Happy Hare/AFC parsers and the QIDI Box helpers from #625. Co-authored-by: aceRage <aceRage@users.noreply.github.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 19, 2026
Russ #622 B1: skip M106/M107 (including P-indexed) between '; custom gcode end' and T so real tool changes still count after CoolingBuffer replaces ;_FORCE_RESUME_FAN_SPEED. Start G-code T, M104 T3, and T0 reset stay excluded. F1: apply the Slot.name tile label only on direct_rack so #612's 1A-1D grouping is not overridden. Co-authored-by: aceRage <aceRage@users.noreply.github.com>
The truncation case built gate_status as [1] plus two hundred zeros, so gate 1 was empty and leftover names stayed off the slot. Pad after two loaded gates so extra statuses cannot drop gate_material at the same index. Deft
This branch has not been deployed
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.
Description
Depends on #625 (merge #625 first).
#625 adoption: the shared map panel is used only for Happy Hare, AFC/BoxTurtle, and QIDI Box hosts — not Snapmaker/U1. Gates/lanes/Box slots group as 1A–1D with colour and type. Sent data is unchanged (
Slot::index, QIDISAVE_VARIABLE value_tN/filament_mapping()).Klipper printers with Happy Hare or AFC/BoxTurtle can now populate the existing print-host send-dialog mapping table. Port of the parsing only from upstream OrcaSlicer
src/slic3r/Utils/MoonrakerPrinterAgent.cppinto this fork'sPrintHostDeviceStatusprobe. The IPrinterAgent /printer_agentframework is not ported (research X1: keep EdgeSlicer's probe + send dialog; #610/#611 already extend that for QIDI).This is S2 from the vendor-send-gaps research. Independent of the native Moonraker host PR — Sovol profiles stay on
octoprint, which already probes as Moonraker. Based onmain, not stacked.Review follow-ups (Russ 1/3)
mmu/lane_dataGETs use a 1 s timeout.probe()is called from the send dialog on the UI thread; the first query still uses the caller's timeout (3 s).multi_color_controller.box_count > 0(asked on the first query, same object QIDI Box: send the filament-to-slot mapping before starting a print #610 adds). Comment at the merge point forStatus::qidi_box. Happy Hare/AFC indices cannot go out as QIDISAVE_VARIABLE value_tN.[0, 32), de-duplication (first wins), cap 32.num_gates > 32is clamped, not dropped. CSS colour names map to hex (red→#FF0000).gate_statusarrays,num_gates>32, QIDI Box vs HH, AFC dupes/out-of-range/40 lanes.Re-review follow-up (Russ re-review 1/3)
Slot.color. That field stays#RRGGBBor empty so auto-match cannot treatchartreuseas a colour. Known names still map to hex; unknown ones are kept inSlot.color_nameand appended to the dropdown label.print_host_slot_colour()is the GUI-free mapper used by Catch2.Upstream source
MoonrakerPrinterAgent::fetch_hh_filament_info—GET /printer/objects/query?mmu(num_gates,gate_status,gate_material,gate_color).MoonrakerPrinterAgent::fetch_moonraker_filament_data—GET /server/database/item?namespace=lane_data(per-lanelane/material/color).scripts/test_moonraker_lane_data.pyfor the AFC JSON shape.What was adapted
slots_from_print_task_config/slots_from_extrudersand fill the sameSlotlist the send dialog already draws.print_task_configfirst, then Happy Haremmu(not if a QIDI Box is present), then AFClane_data, then bareextruderNtools. Empty gates/lanes stay in the list so the unit is visible; only a loaded gate/lane with a type or colour (or a readable unmapped name) setsslots_have_filaments.print_stats&print_task_config&multi_color_controller&extruder…(the QIDI object QIDI Box: send the filament-to-slot mapping before starting a print #610 also asks for). Happy Hare and AFC are extra 1 s GETs, only when that first answer named no filaments and is not a QIDI Box. A 404/timeout on the extras does not fail a probe that already gotprint_stats.X-Api-Keyis sent when the device has an API key.parse_happy_hare_mmuandparse_afc_lane_data(full HTTP body or the inner object).parse_moonraker_statusalso acceptsmmuinside a status snapshot.tests/slic3rutils/printhost_devices_tests.cpp. No CMake test edits. No G-code changes. No new enum values. Nofilament_is_mixed.Mapping at start — not sent
Upstream
MoonrakerPrinterAgent::start_printis a stub (return BAMBU_NETWORK_SUCCESS) andstart_local_printonly uploads. There is no Happy HareT/MMU_CHANGE_TOOLor AFC lane mapping in the start path. This PR is read-only display + the dialog's existing auto-match.Material-first auto-match (research X3) is the change in #610, not duplicated here, so the two PRs do not edit the same send-dialog loop. On
maintoday the table still auto-matches by colour among loaded slots that have a colour; once #610 lands, material-first applies to these HH/AFC slots too.Tests
Inline JSON fixtures:
0xcolour prefix, named colours, unparsable names (chartreuse→ empty colour +color_name), status-object form, emptymmu, Snapmakerprint_task_configwinning overmmu, clampnum_gates>32, wrong-type fields, huge arrays, QIDI Box suppressing HH. Tile grouping 1A–1D fromindex/4andindex%4;Slot::label()staysT1 PLA.lane_datavalue object sorted by tool number, empty lane with#None,lanesarray form, garbage JSON, duplicate/out-of-range indices, 40-lane cap, unmapped colour name, 1A/1B grouping.label()staysBox 1 slot 2 ASA.print_host_slot_colour("red") == "#FF0000",print_host_slot_colour("chartreuse").empty().This VM has no EdgeSlicer deps prefix, so
slic3rutils_testswas not compiled here. Wx-freeThirdPartyFilamentMap.cppcompiled.Untested (no hardware)
Live probe against Happy Hare or AFC, and the send-dialog table on a real printer.
Smoke checklist
mmu/lane_dataGETs 404/empty and are ignored (1 s each).mmuobject with loaded gates → send dialog mapping table shows Bambu-style 1A–1D tiles with colour/type. Empty gates show as empty. Named colours (red) show as a swatch. An unknown name does not auto-match by colour. Auto-match picks a loaded gate with a#RRGGBBcolour (material-first once QIDI Box: send the filament-to-slot mapping before starting a print #610 is in).lane_datawithlane/material/color→ table shows those tools. Empty material → unloaded.print_task_config— still that list, not the shared panel.multi_color_controller,box_count>0) — HH/AFC extras are not asked; Box uses the shared panel.X-Api-Key.MMU_*/ AFC mapping commands (no upstream precedent). Switching devices in the send dialog should not stall ~9 s.Screenshots/Recordings/Graphs
None — uses the existing mapping table; no new chrome.