mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 03:54:17 +02:00
Fix external spool ams_mapping2 slot_id (Issue #213)
The ams_mapping2 format was incorrectly using the tray_id (254/255) as
the slot_id for external spools. The printer expects slot_id to be the
actual slot index (0 for main nozzle, 1 for deputy nozzle), not the
tray_id value.
Before: {"ams_id": 255, "slot_id": 254} <- invalid slot index
After: {"ams_id": 255, "slot_id": 0} <- correct slot index
This caused prints using external spool to fail immediately with error
code 07FF_8007.
Closes #213
This commit is contained in:
@@ -2038,8 +2038,9 @@ class BambuMQTTClient:
|
||||
ams_mapping2.append({"ams_id": 255, "slot_id": 255})
|
||||
elif tray_id >= 254:
|
||||
# External spool: 254 = main nozzle, 255 = deputy nozzle
|
||||
# External spools use ams_id=255 with slot_id matching tray_id
|
||||
ams_mapping2.append({"ams_id": 255, "slot_id": tray_id})
|
||||
# For ams_mapping2, slot_id is 0 (main) or 1 (deputy), not the tray_id
|
||||
external_slot = 0 if tray_id == 254 else 1
|
||||
ams_mapping2.append({"ams_id": 255, "slot_id": external_slot})
|
||||
else:
|
||||
# Regular AMS tray: Global tray ID = (ams_id * 4) + slot_id
|
||||
ams_id = tray_id // 4
|
||||
|
||||
Reference in New Issue
Block a user