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

fan: Tests and cleanups for the interpolation functions #363

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

agherzan
Copy link

No description provided.

We have two tests for the case were temp is greater than both points so
drop one of these tests.

We also don't have any interpolation test for the case where temp is
strictly between the points. This change adds one.

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
First of all, this clarifies what kind of interpolation is done in
"interpolate_duties" by renaming it to "linear_interpolation_duty". This
function mathematically handles the cases where the point to be fit is
one of the boundaries so there is no need for extra logic of that in
"get_duty_between_points".

This change also includes some minor rewordings and formatting.

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
@mmstick mmstick requested a review from a team November 3, 2022 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants