fix(afc): pull remaining weight from Spoolman when enabled#1855
Merged
Conversation
When Spoolman is configured, `spoolRemainingWeight` now reads `spool.remaining_weight` from the Spoolman spool data instead of `lane.weight` from the AFC lane state. This keeps the displayed weight and spool fill percentage in sync with Spoolman's tracking (which accounts for filament consumed across all prints), rather than relying solely on the value AFC reports for the lane. Falls back to `lane.weight` when Spoolman is not enabled or the spool has no `remaining_weight` recorded. Signed-off-by: paxx12 <paxx12dev@gmail.com>
Contributor
Author
|
@jimmyjon711 Following our conversation about this change. Please review and approve. |
jimmyjon711
approved these changes
May 30, 2026
jimmyjon711
left a comment
Contributor
There was a problem hiding this comment.
Tested with spoolman and change weight manually that AFC tracks, acts like it should and only pulls in spoolmans weight. Switch to not having spoolman and weight tracks AFC weight correctly.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes AFC lane weight display to read remaining_weight from Spoolman when available, keeping the displayed weight and reel fill percentage in sync with Spoolman's cross-print tracking rather than the AFC lane's reported weight.
Changes:
- In
spoolRemainingWeight, preferspool.remaining_weightfrom Spoolman when the Spoolman component is supported and the value is present; otherwise fall back tolane.weight.
pedrolamas
approved these changes
May 30, 2026
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.
When Spoolman is configured,
spoolRemainingWeightnow readsspool.remaining_weightfrom the Spoolman spool data instead oflane.weightfrom the AFC lane state.This keeps the displayed weight and spool fill percentage in sync
with Spoolman's tracking (which accounts for filament consumed
across all prints), rather than relying solely on the value AFC
reports for the lane.
Falls back to
lane.weightwhen Spoolman is not enabled or thespool has no
remaining_weightrecorded.Signed-off-by: paxx12 paxx12dev@gmail.com