[PR #711] [MERGED] [Fix]: Ensures AMS-HT devices are properly identified in Spoolman #1098

Closed
opened 2026-05-06 12:35:02 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/711
Author: @shrunbr
Created: 3/15/2026
Status: Merged
Merged: 3/15/2026
Merged by: @maziggy

Base: devHead: fix/spoolmanAMSHT


📝 Commits (4)

  • 6e4a246 Modifies convert_ams_slot_to_location to target 254 and higher for external spool, specifically 128 through 135 for AMS-HT and everything else for AMS
  • 90cfc7a Updates docstring to reflect updated id number changes
  • 3381901 Merge branch 'dev' into fix/spoolmanAMSHT
  • 90daf16 Update AMS ID comments for clarity on spool types

📊 Changes

1 file changed (+10 additions, -5 deletions)

View changed files

📝 backend/app/services/spoolman.py (+10 -5)

📄 Description

Description

AMS-HT devices were being misidentified as External Spools in Spoolman. This fixes that and ensures they are properly identified as AMS-HT devices in Spoolman.

COPILOT GENERATED SUMMARY

This pull request updates the logic for converting AMS slot IDs to human-readable location strings in the convert_ams_slot_to_location function. The main improvement is the addition of support for AMS-HT units and a correction to the range for external spool IDs.

Fixes #707

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Changes Made

Enhancements to AMS slot location conversion:

  • Added explicit handling for AMS-HT units by mapping AMS IDs 128–135 to the format AMS-HT <Letter><TrayNumber>.
  • Updated the threshold for external spool IDs to ams_id >= 254 (previously 128), ensuring AMS-HT units are not incorrectly labeled as external.

Screenshots

image

Testing

  • I have tested this on my local machine
  • I have tested with my printer model: P2S (ensured regular AMS slots are still identified properly)

Checklist

  • My code follows the project's coding style
  • I have commented my code where necessary
  • I have updated the documentation (if needed)
  • My changes generate no new warnings
  • I have tested my changes thoroughly

Additional Notes


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/maziggy/bambuddy/pull/711 **Author:** [@shrunbr](https://github.com/shrunbr) **Created:** 3/15/2026 **Status:** ✅ Merged **Merged:** 3/15/2026 **Merged by:** [@maziggy](https://github.com/maziggy) **Base:** `dev` ← **Head:** `fix/spoolmanAMSHT` --- ### 📝 Commits (4) - [`6e4a246`](https://github.com/maziggy/bambuddy/commit/6e4a24642a0d3ebace236c47301a3dec231d5b4b) Modifies convert_ams_slot_to_location to target 254 and higher for external spool, specifically 128 through 135 for AMS-HT and everything else for AMS - [`90cfc7a`](https://github.com/maziggy/bambuddy/commit/90cfc7a7c6331744914f8a2e5834117d0ca755f9) Updates docstring to reflect updated id number changes - [`3381901`](https://github.com/maziggy/bambuddy/commit/338190180c7649a74b5a50f3784bea8f35442650) Merge branch 'dev' into fix/spoolmanAMSHT - [`90daf16`](https://github.com/maziggy/bambuddy/commit/90daf16387e426b1a6f7fd1add541e5c259edfb4) Update AMS ID comments for clarity on spool types ### 📊 Changes **1 file changed** (+10 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `backend/app/services/spoolman.py` (+10 -5) </details> ### 📄 Description ## Description AMS-HT devices were being misidentified as External Spools in Spoolman. This fixes that and ensures they are properly identified as AMS-HT devices in Spoolman. **COPILOT GENERATED SUMMARY** This pull request updates the logic for converting AMS slot IDs to human-readable location strings in the `convert_ams_slot_to_location` function. The main improvement is the addition of support for AMS-HT units and a correction to the range for external spool IDs. ## Related Issue <!-- Link to the issue this PR addresses (if applicable) --> Fixes #707 ## Type of Change <!-- Mark the relevant option with an "x" --> - [X] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test addition or update ## Changes Made Enhancements to AMS slot location conversion: * Added explicit handling for AMS-HT units by mapping AMS IDs 128–135 to the format `AMS-HT <Letter><TrayNumber>`. * Updated the threshold for external spool IDs to `ams_id >= 254` (previously 128), ensuring AMS-HT units are not incorrectly labeled as external. ## Screenshots <img width="349" height="225" alt="image" src="https://github.com/user-attachments/assets/8e26a8d0-cb50-4c62-83e0-a3277f218862" /> ## Testing <!-- Describe how you tested your changes --> - [X] I have tested this on my local machine - [X] I have tested with my printer model: P2S (ensured regular AMS slots are still identified properly) ## Checklist - [X] My code follows the project's coding style - [X] I have commented my code where necessary - [X] I have updated the documentation (if needed) - [X] My changes generate no new warnings - [X] I have tested my changes thoroughly ## Additional Notes <!-- Add any additional information that reviewers should know --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:35:02 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy#1098
No description provided.