Skip to content

Improve removing unused TEMP_SENSOR definitions #27826

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

Conversation

ellensp
Copy link
Contributor

@ellensp ellensp commented Apr 30, 2025

Description

It was noticed that unused erroneous TEMP_SENSOR_[N] defines where not being removed.
In most cases this doesn't cause issue, but thermistor type 66 has sanity checks that break building, there are probably others.

So I improved the conditionals that remove unused TEMP_SENSOR_[N] defines to also check for a hotend.

Benefits

Less unused defines.

Note

This should be considered for other branches also. (the person who brought this to my attention was using 2.1.2.5)

@ellensp ellensp changed the title add a CHECK_TEMP_SENSOR macro, improve removing unused TEMP_SENSOR definitions Improve removing unused TEMP_SENSOR definitions Apr 30, 2025
@thinkyhead
Copy link
Member

Looks ok! I was initially worried that TEMP_SENSOR_REDUNDANT_SOURCE E1 might need TEMP_SENSOR_E1 to be defined, but TEMP_SENSOR_REDUNDANT_SOURCE just refers to the pin, not the sensor type.

@thinkyhead thinkyhead force-pushed the Improve-Clean-up-unused-temperature-sensors branch from 7f9df06 to d244533 Compare April 30, 2025 19:35
@thinkyhead thinkyhead merged commit 48cc310 into MarlinFirmware:bugfix-2.1.x Apr 30, 2025
66 checks passed
@ellensp ellensp deleted the Improve-Clean-up-unused-temperature-sensors branch April 30, 2025 23:18
EvilGremlin pushed a commit to EvilGremlin/Marlin that referenced this pull request May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants