-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
Temperature singleton #3643
Temperature singleton #3643
Conversation
94aa743
to
52b7c51
Compare
#if HAS_DIGIPOTSS | ||
|
||
// From Arduino DigitalPotControl example | ||
void digitalPotWrite(int address, int value) { | ||
Stepper::void digitalPotWrite(int address, int value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is void Stepper::digitalPotWrite(int address, int value) {
right? (same comment in PR #3631)
22ff892
to
6843619
Compare
6f5dd03
to
dbb509b
Compare
@jbrazio What do you think? Should I leave the temperature singleton named " |
For me it looks as if we are (or should be) dealing with a 'Heater' and its properties. |
Well, in geekspeak this class is a "manager" of heaters and sensors. It does not model a heater. And I actually don't want to go down the road of turning every entity (for example, individual heaters) into classes at this time. But in future… |
Well said. We already are on dangerous train with this and some other PRs of the last days - for an RC. |
dbb509b
to
40ba1db
Compare
@thinkyhead If this is and will be the responsible for all temperatures on Marlin then I would suggest I not keen to use "short cryptic names" (despite "T" being rather a standard convection). @Blue-Marlin so far Scott has been doing refactoring by changing function names and encapsulating which does not changes behavior. |
True, though I can understand the concern with the way the Arduino compiler has acted up in the past, and of course how easy it is to miss a subtle typo. I made a point to avoid trying to be "clever" and rewrite any code. I think if you look through this PR (and I hope everyone has scanned it for stupid errors) you will find it is especially cautious. What I wanted for this PR was to corral the variable names into their own namespaces and make it more obvious what belongs to what, but without changing anything else. It makes the code a bit more readable, the ownership of properties more clear, and (I hope) leads to clearer thinking about the relationships between these code units. The main errors that I found with Travis were symbols that didn't get the prefix added. I've been running this code on my own machine and it seems to be working well. I haven't compared the print results from |
I expected some followups to catch missed symbols. Considering the scope of the change, it's not too bad. I will take the time to do a full search on all the method and symbol names to see that nothing else was missed. Regular expression searches help this a lot. To find a symbol missing a dot prefix (or underscore) simply use regex Thanks to those of you (@esenapaj) who actually took the time to "science the shit out of this thing," examine at the code and see if it was good, bad, or otherwise. I realize it seems cold and scary when seen from a great height, but when you really get to know it, it's actually quite warm and fuzzy. |
5c5dc21
to
a0dad51
Compare
Ok, so I went through the same process as @esenapaj did with If anyone would like to prove that assertion wrong, I challenge you to find a bug in this. If you do, I give you one paragraph to tell me off, but no more. Time is short. I'm trying the name
|
@thinkyhead I vote for: thermalManager.autoShutdown();
thermalManager.getBedTemperature();
thermalManager.setBedTemperature();
thermalManager.setHotendTemperature();
thermalManager.getHotendTemperature();
The things a non native English speaker learns on a coding website. :-P |
abc9436
to
084f6b5
Compare
|
May The Force be with this PR. ⚡ |
Follow-up the PR #3643(Temperature singleton)
* RCBugFix: Use AxisEnum with _lcd_babystep() Localize babystepping in the Temperature class Follow-up the PR MarlinFirmware#3643(Temperature singleton) Temperature singleton class Disable THERMAL_PROTECTION_BED with no sensor Can't use the ENABLED macro as a boolean Moved DELTA radius/rod default trimmer values to Conditionals.h
Follow-up the PR MarlinFirmware#3643(Temperature singleton) ・Change from fanSpeedSoftPwm[0] to thermalManager.fanSpeedSoftPwm[0] in planner.cpp It fix compilation error when FAN_SOFT_PWM is enabled. ・Remove declaration of setExtruderAutoFanState() in temperature.h Because that function was abolished. ・Change from babystepsTodo to thermalManager.babystepsTodo in ultralcd.cpp It fix compilation errors when BABYSTEPPING is enabled.
PFW-1358 More button utilizes text and an empty character on the right
Following #3631 – Adding in a singleton called "
Temperature
". Let's see how Travis likes it.