aattww/sensors

Possible division by zero error in NTCSensor

aattww opened this issue · 1 comments

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.

Fixed in #6