mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-26 23:29:38 -05:00
AFC now publishes an extruder_index field per lane. This lets Moonraker auto-derive physical_extruder_map without user configuration: - Add extruder_index field to AmsTrayData (-1 = not provided) - Parse extruder_index from AFC lane JSON using contains() check since 0 is a valid extruder index (safe_json_int returns 0 for missing fields, which would be ambiguous) - After build_ams_payload, if all trays have extruder_index, derive physical_extruder_map and write it to the printer preset config via CallAfter so IMEX PA and temperature emission use the correct physical extruder qualifier AFC lanes sharing a carriage all report extruder_index=0; independent direct-drive tools on separate carriages report their carriage index. PrintApply.cpp's auto-derive from printer_extruder_id is skipped when physical_extruder_map has more than 1 element, so the AFC-populated map takes precedence. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>