Return max rather than 0 for handle temp if outside of temp range [TS80P]
This commit is contained in:
@@ -100,13 +100,12 @@ uint16_t getHandleTemperature() {
|
|||||||
//NTCG104EF104FT1X from TDK
|
//NTCG104EF104FT1X from TDK
|
||||||
//For now not doing interpolation
|
//For now not doing interpolation
|
||||||
int32_t result = getADC(0);
|
int32_t result = getADC(0);
|
||||||
for (uint32_t i = 0; i < (sizeof(NTCHandleLookup) / (2 * sizeof(uint16_t)));
|
for (uint32_t i = 0; i < (sizeof(NTCHandleLookup) / (2 * sizeof(uint16_t))); i++) {
|
||||||
i++) {
|
|
||||||
if (result > NTCHandleLookup[(i * 2) + 0]) {
|
if (result > NTCHandleLookup[(i * 2) + 0]) {
|
||||||
return NTCHandleLookup[(i * 2) + 1] * 10;
|
return NTCHandleLookup[(i * 2) + 1] * 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 45 * 10;
|
||||||
#endif
|
#endif
|
||||||
#ifdef TEMP_TMP36
|
#ifdef TEMP_TMP36
|
||||||
// We return the current handle temperature in X10 C
|
// We return the current handle temperature in X10 C
|
||||||
|
|||||||
Reference in New Issue
Block a user