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

Possible division by zero error in NTCSensor #5

Closed
aattww opened this issue Feb 20, 2020 · 1 comment
Closed

Possible division by zero error in NTCSensor #5

aattww opened this issue Feb 20, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@aattww
Copy link
Owner

aattww commented Feb 20, 2020

average = 1023.0 / average - 1;
average = SERIES_RESISTOR / average;

Having shorted thermistor is handled but having not a thermistor at all results in pulling analog in to VCC and counted as 1023. This in turn will result in division by zero in line 197 in NTCSensor.cpp.

@aattww aattww added the bug Something isn't working label Feb 20, 2020
@aattww
Copy link
Owner Author

aattww commented Mar 31, 2020

Fixed in #6

@aattww aattww closed this as completed Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant