-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TMC2240: Allow control and use of temperature report #6769
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
f94719b
to
5fb89f8
Compare
Thanks. In general the first two patches look fine. The new comments seem a little odd though - I'm not aware of any sensor that will return 0 - we should definitely fix any sensor doing that. I'm not sure about the third patch. Why would one use temperture_combined on a tmc2240 temperature? What would they combine it with? If the goal is to use a tmc2240 temperature sensor as a regular sensor, maybe we should consider adding an internal mechanism to indicate to the tmc2240 that it always needs to provide temperature (that is, have the temperature code signal the tmc2240 instead of a user config option signalling tmc2240). -Kevin |
I think that about the first patch and the delay in initialization. So, get_status which always just returns the last value of Maybe there is a more clever solution, like ... do
Maybe I misunderstood the goal of temperature combined and misused it, but I have only 2 use cases, like:
I do not see a reason to use any individual data from the drivers to control anything, AFAIK there is no external TMC2240 like TMC5160, which can be cooled individually.
If there is a way to avoid adding strange config options and do some magic behind the scenes - I agree it is a better solution (like query always if there are consumers of data - it will be a better solution). My original intention here is to just allow us to use it somehow at least because right now it is only for graphs. |
My personal goal:
I like to control all fans, the printer is at home and I try to minimize noise if possible.
There are 3 patches:
Duct tape fix for race conditions with temperature combined sensor and other sensors during klippy initialization, where sensors can return 0. This may be by design, but it currently limits the minimum possible deviation between sensors. Like there, it is adc + i2c:
Temperature combined allows us to set "any" object in the sensor list, but with tmc2240, there is a corner case, it has method
get_status()
andtemperature
field, but it has no value. So, it will crush Klippy cause max/min can't handleNone
.Proposal to allow monitoring of TMC2240 continuously, which in the end allows the use of it as combined sensor to control fans.
I can split PR if needed.
Should close: #6675