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

Bugfix for when temperature sensor reading exceeds highest mapped value in temperature map. #56

Merged
merged 1 commit into from
Oct 7, 2023

Conversation

physcon
Copy link
Contributor

@physcon physcon commented Oct 7, 2023

Fixed bug which allowed i to be incremented past the end of the array in various functions: pwm_map(), tacho_map(), get_sensor_duty(). This can cause fan speeds to drop to minimum when temperature of a sensor exceeds the highest value in the temperature map. For example, setting CONF:SENSOR1:TEMPMAP 25,20,50,100 would result in 0% fan speed when temperature exceeds 50C.

… in various functions: pwm_map(), tacho_map(), get_sensor_duty(). This can cause fan speeds to drop to minimum when temperature of a sensor exceeds the highest value in the temperature map. For example, setting CONF:SENSOR1:TEMPMAP 25,20,50,100 would result in 0% fan speed when temperature exceeds 50C.
@tjko tjko merged commit ac3f425 into tjko:main Oct 7, 2023
6 checks passed
@tjko
Copy link
Owner

tjko commented Oct 7, 2023

Thanks! Rather obvious off-by-one error, I must never have tested for input values going past the last point in the map...

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