fix(HappyHare): Fixed animated filament position and greatly cleaned up component#1767
Conversation
|
@pedrolamas This PR is a combination bug fix and significant component code-cleanup. It is the last of the current batch of PRs. Thank you! |
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug where configGateHomingEndstop was incorrectly used instead of configExtruderHomingEndstop when determining the end-of-bowden filament position, and significantly refactors the component by replacing watchers and imperative animation logic with reactive computed properties.
- Fixes incorrect endstop configuration check causing wrong filament position calculation
- Refactors from imperative watchers to reactive computed properties for cleaner state management
- Simplifies animation logic with CSS transitions instead of programmatic animation
| return POSITIONS.END_BOWDEN | ||
| } | ||
|
|
||
| get toolheadSensor () { |
There was a problem hiding this comment.
The return type should include undefined since accessing a non-existent key in the sensors Record returns undefined at runtime. This would improve type safety when using this getter. Consider changing the return type to boolean | null | undefined or adding a check like this.sensors['toolhead'] ?? null to match the declared type.
| get toolheadSensor () { | |
| get toolheadSensor (): boolean | null | undefined { |
Description:
This fixes a couple of cases where the (animated) position of the filament in the bowden was incorrect. It fixes the bug of reading
gate_endstopwhereextruder_endstopshould have been used.It also greatly simplifies the component and removes private methods and unnecessary watchers.
Component modified:

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