-
-
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
[BUG] Compilation error PROBE_TEMP_COMPENSATION #22044
Comments
"Comment out, for example, #define PTC_SAMPLE_START 30.0f in Configuration_adv.h" |
Yes, you are right! Remove the I edited the report to reflect that correction. |
I guess the question here is should probe temp compenation a) use I think it may be helpful to have granularity here due to the scale of things.. small probe, so small changes in temp may be more noticable? |
Oh, I wasn't aware celsius_float_t even existed ;) I don't really think it's needed here though.I doubt the thermistor is neither accurate nor precise in fractional degrees over the temperature span used. Not to mention ADC, noise, etc … Just for reference, some measurements though. I have a none-name inductive probe with temp sensor and I have:
For me it seems, fractions of a degree wouldn't be necessary. I don't know if there are other kinds of temperature compensated probes which need more resolution. |
…default configuration to remove float vals. (MarlinFirmware#22044)
#22130 merged; this can be closed. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Did you test the latest
bugfix-2.0.x
code?Yes, and the problem still exists.
Bug Description
PROBE_TEMP_COMPENSATION is configurable in Configuration_adv.h, for example:
If values are not defined, sane defaults are substituted in probe_temp_comp.h:
Obviously, values in Configuration_adv.h are defined as floats, whereas the substitute values are ints. Because these values are used to brace-initialize a variable of type
celsius_t
, defining these macros as floats results in a compilation error, because they need to narrowed from float to celsius_t (which, apparently is type short int):Aside from the facts, that I'm not a huge fan of repeated values (Configuration_adv.h and probe_temp_comp.h) and macros (not type safe), I'd be willing to fix this. I'm just not sure how:
Do you want the values in Configuration_adv.h to be int?
Do you want probe_temp_comp.h to include static_cast to celsius_t?
Something else?
Bug Timeline
Unknown
Expected behavior
Successful compile with default values un-commented in Configuration_adv.h.
Actual behavior
Compilation error:
Steps to Reproduce
#define PTC_SAMPLE_START 30.0f
in Configuration_adv.hVersion of Marlin Firmware
2.0.x-bugfix, master as of yesterday
Printer model
Two Trees Sapphiro Pro
Electronics
Stock for the printer, but modified, MKS Robin Nano
Add-ons
Inductive Z probe with temperature sensor (aka: PINDA v2)
Your Slicer
Cura
Host Software
OctoPrint
Additional information & file uploads
No response
The text was updated successfully, but these errors were encountered: