mainsail-crew / mainsail

Mainsail is the popular web interface for managing and controlling 3D printers with Klipper.
https://docs.mainsail.xyz
GNU General Public License v3.0
1.74k stars 376 forks source link

feat(gui): fans can have multiple rpm values and add "fan_multi" #2016

Closed xPatrikTwitch closed 1 month ago

xPatrikTwitch commented 2 months ago

Description

Changes how the fan rpm is displayed so it can be an array of multiple rpm values and also adds support "fan_multi" a fan that can have multiple tachometer_pins defined (https://github.com/xPatrikTwitch/klipper/blob/master/klippy/extras/fan_multi.py) (This does not break normal fans with one rpm value)

Related Tickets & Documents

none

Mobile & Desktop Screenshots/Recordings

image

[optional] Are there any post-deployment tasks we need to perform?

none

Summary by Sourcery

Add support for fans with multiple RPM values and introduce the 'fan_multi' type, enhancing the GUI to display these values appropriately.

New Features:

Enhancements:

sourcery-ai[bot] commented 2 months ago

Reviewer's Guide by Sourcery

This pull request implements support for fans with multiple RPM values and adds the "fan_multi" type. The changes primarily affect the display of fan RPM in the UI and the handling of different fan types in the store.

File-Level Changes

Change Details Files
Implement support for multiple RPM values in fan display
  • Add conditional rendering for single and multiple RPM values
  • Update styling for multiple RPM display
  • Handle edge cases such as zero RPM when fan is running
src/components/inputs/MiscellaneousSlider.vue
Add support for 'fan_multi' type
  • Include 'fan_multi' in supported and controllable fan types
  • Implement gcode command for 'fan_multi' type
src/components/inputs/MiscellaneousSlider.vue
src/store/printer/getters.ts
Update fan-related getters in the store
  • Add 'fan_multi' to supported and controllable fan arrays
src/store/printer/getters.ts

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
meteyou commented 2 months ago

@xPatrikTwitch pls ignore the bot. we are testing it right now...

will the module fan_multi be merged in upstream Klipper?

xPatrikTwitch commented 2 months ago

@xPatrikTwitch pls ignore the bot. we are testing it right now...

will the module fan_multi be merged in upstream Klipper?

There is a pull request open https://github.com/Klipper3d/klipper/pull/6691