Skip to content

feat(Happy Hare): Adds sync-feedback buffer rendering in the filament status#1758

Merged
pedrolamas merged 5 commits intofluidd-core:developfrom
moggieuk:sync_feedback
Dec 16, 2025
Merged

feat(Happy Hare): Adds sync-feedback buffer rendering in the filament status#1758
pedrolamas merged 5 commits intofluidd-core:developfrom
moggieuk:sync_feedback

Conversation

@moggieuk
Copy link
Contributor

Description:
This PR added a sync-feedback buffer rendering in the filament status component. Supports:
Compression-only, Tension-only, Dual-switch and Proportional sensors
Screenshot 2025-12-11 at 4 07 28 PM

SIgned off by: Paul Morgan (moggieuk@hotmail.com)

@pedrolamas pedrolamas added the FR - Enhancement New feature or request label Dec 12, 2025
@pedrolamas pedrolamas added this to the 1.36.1 milestone Dec 12, 2025
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>

# Conflicts:
#	src/store/printer/types.ts
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds visual rendering of a sync-feedback buffer in the MMU filament status component, supporting multiple sensor types: compression-only, tension-only, dual-switch, and proportional sensors.

  • Adds new Klipper state property sync_feedback_bias_modelled to track buffer position
  • Implements animated piston visualization that moves based on bias values
  • Refactors sync feedback display logic to show buffer alongside existing sensor indicators

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 6 comments.

File Description
src/typings/klipper.d.ts Adds sync_feedback_bias_modelled property to MMU state interface
src/mixins/mmu.ts Adds getter for syncFeedbackBiasModelled to access the new state value
src/components/widgets/mmu/MmuFilamentStatus.vue Adds SVG buffer/piston elements, new computed properties for sensor types, and updates sync feedback rendering logic with animation

return (
this.syncFeedbackEnabled && (this.hasSensor('filament_compression') || this.hasSensor('filament_tension'))
)
return this.hasFilamentCompressionSensor || this.hasFilamentTensionSensor || this.hasFilamentProportionalSensor
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hasSyncFeedback getter no longer checks syncFeedbackEnabled, which was part of the original logic. This means the sync feedback buffer will always be displayed when any of the sensors exist, regardless of whether sync feedback is enabled. Consider whether syncFeedbackEnabled should still be part of this condition or if this change is intentional.

Suggested change
return this.hasFilamentCompressionSensor || this.hasFilamentTensionSensor || this.hasFilamentProportionalSensor
return this.syncFeedbackEnabled && (this.hasFilamentCompressionSensor || this.hasFilamentTensionSensor || this.hasFilamentProportionalSensor)

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct behavior because the sync-feedback "buffer" is also used as an endstop for homing the filament to the extruder. The actual enabled flag is simply whether dynamic rotation_distance adjustment is taking place and not about the existence of the sync feedback sensors.

Comment on lines +49 to +56
<text
x="-22"
y="4"
font-size="11px"
text-anchor="end"
>
{{ syncFeedbackPistonText }}
</text>
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vue template interpolation inside SVG defs may not work as expected. The text element with {{ syncFeedbackPistonText }} is defined in defs and referenced via use, which means the interpolation will only evaluate once during definition, not dynamically update when syncFeedbackPistonText changes. Consider moving the text element outside of defs and positioning it directly where needed, or use a different approach for dynamic text in reusable SVG elements.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Copilot is mistaken (or it is with older Vue implementations) because I tested on Chrome, Safari, Firefox (on Mac) and Safari/Chrome on iPhone and it is reactive as expected(?)
I don't understand Vue well enough to know why, but I have validated it works as designed...

@pedrolamas
Copy link
Member

@moggieuk can you please review the 2 comments above? The rest LGTM.

@pedrolamas pedrolamas merged commit d74c478 into fluidd-core:develop Dec 16, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FR - Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants