Skip to content
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

fix: ignore null on thermal change calculation #1139

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

pedrolamas
Copy link
Member

We currently use the last (most recent) thermal history item and the 5th oldest from that and calculate the thermal change.

This was working fine as up until now the thermal history was always a valid number, however the TMC2240 can report null.

As such this PR changes the behavior to the following:

  • Take the last (most recent) 5 thermal history items
  • From right to left, take items until we find a null
  • Calculate thermal change resulting from the change of the first (oldest) and the last (newest) thermal history items

Fixes #1138

@pedrolamas pedrolamas added the GH - Bug Something isn't working label Aug 8, 2023
@pedrolamas pedrolamas added this to the 1.25.1 milestone Aug 8, 2023
@pedrolamas pedrolamas merged commit ee6579b into fluidd-core:develop Aug 8, 2023
@pedrolamas pedrolamas deleted the pedrolamas/fix-1138 branch August 8, 2023 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GH - Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thermal change on the TMC2240 driver is showing NaN
1 participant