Fix analog thermocouple Boards reading incorrectly. #27884
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
RainMotorsports on discord noticed that thermistor type -1 (AD595 with Thermocouple) was not working.
They traced it back to #26021 where a float to int conversion was introduced
The macro TEMP_AD595(RAW) is not working correctly.
I generated a quick Arduino test with values for a RAMPS
Temperature A: is the current code
Temperature B: is the fixed code.
Truncated results
On examination this bug is also in thermistor type -4 (AD8495 with Thermocouple)
Updated both TEMP_AD595 and TEMP_AD8495
Requirements
type -1 or -4 thermistor
Benefits
Works as expected
Related Issues
https://discord.com/channels/461605380783472640/1376429364303892480