Skip to content

bugfix: split fan/speed slider callbacks to fix gcode dispatch collision#212

Open
gmmcosta15 wants to merge 1 commit into
devfrom
bugfix/slider-split
Open

bugfix: split fan/speed slider callbacks to fix gcode dispatch collision#212
gmmcosta15 wants to merge 1 commit into
devfrom
bugfix/slider-split

Conversation

@gmmcosta15
Copy link
Copy Markdown
Collaborator

  • Feature
  • Bug fix
  • Code refactor
  • Documentation

Description

  • controlTab.on_slider_change: now handles fan_generic objects only, dispatches SET_FAN_SPEED.
  • tunePage: add _on_speed_slider_change for print speed (M220); on_slider_change handles fan_generic only.
  • printTab: minor cleanup following the callback split.

Motivation

When a fan_generic was named "speed", both controlTab and tunePage would dispatch conflicting gcodes (SET_FAN_SPEED and M220) on the same slider event. Splitting the callbacks eliminates the collision and ensures the correct gcode is always sent.

Copy link
Copy Markdown
Member

@HugoCLSC HugoCLSC left a comment

Choose a reason for hiding this comment

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

This needs more work.

There is no reason whatsoever where the slider should only emit a gcode for fan speed changes on objects that are [fan_generic]. Normal fans [fan] should have their speed changed using the slider as well.
So the slider needs to emit the appropriate gcode according to the fan object declaration.

Second thing, the gcode command M220 has nothing to do with fan speeds, that command sets the feedrate percentage . The appropriate command that i believe you were looking for is M106 SX, where X is an integer between [0-255].

Additionally, what happened with the ControlTab.py file, because the entire file is diff. I suggest just having just the actual changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants