fix: PA profiles not shown in AMS dialog for main extruder (extruder 0)#10850
Open
BenJule wants to merge 3 commits into
Open
fix: PA profiles not shown in AMS dialog for main extruder (extruder 0)#10850BenJule wants to merge 3 commits into
BenJule wants to merge 3 commits into
Conversation
Open
2 tasks
60c9b59 to
4f94365
Compare
The upstream build_all.yml only listed 'main' as a push trigger. BenJule/BambuStudio uses 'master' as its default branch, so CI never fired on fork-local pushes. Adding 'master' alongside 'main' makes the full multi-platform build run when master is updated.
AMSMaterialsSetting::Popup used `if (ext_id > 0)` to guard the PA history request. MAIN_EXTRUDER_ID is 0, so any AMS unit bound to the first extruder failed this check and never sent the `extrusion_cali_get` command. The dropdown then showed only the hard-coded "Default" entry. Fix: change `> 0` to `>= 0` so extruder 0 triggers the request while the existing `return -1` sentinel (not found) is still excluded. Fixes bambulab#10845.
4f94365 to
5237588
Compare
Contributor
Author
|
Apologies — this PR was closed by mistake on 2026-06-07, and that was an error on my side, not a deliberate decision to withdraw the change. It happened as an unintended side effect of a branch cleanup in my fork: deleting the head branch automatically closed this PR. The contribution still stands. I have restored the branch and reopened the PR. Sorry for the noise and any confusion this caused. |
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.
Root cause
AMSMaterialsSetting::Popuprequests the PA calibration history with this guard (introduced in the post-fix of commit 33b62ed / re-applied in 2263815):MAIN_EXTRUDER_IDis0(defined inDevDefs.h:94). Any AMS unit bound to the first extruder returnsext_id = 0, which fails> 0, so theextrusion_cali_getMQTT command is never sent. The profile dropdown then contains only the hard-coded "Default" entry — even though the printer has saved profiles.GetExtruderIdByAmsIdreturns-1as its "not found" sentinel, so the correct guard is>= 0.Fix
One character. Extruder 0 now triggers the request; the
-1sentinel still suppresses it when the AMS ID is unknown.Affected printers
Any printer where an AMS unit is bound to extruder 0 (virtually all single-extruder printers, and at least one AMS unit on dual-extruder printers like X2D). Reported as #10845.
Test plan
ext_id = -1→ no request sent (no regression)Closes #10845.