1
0
forked from me/IronOS

Return max rather than 0 for handle temp if outside of temp range [TS80P]

This commit is contained in:
Ben V. Brown
2020-12-29 12:16:29 +11:00
parent 2c6142d421
commit 3696e08dde

View File

@@ -100,13 +100,12 @@ uint16_t getHandleTemperature() {
//NTCG104EF104FT1X from TDK
//For now not doing interpolation
int32_t result = getADC(0);
for (uint32_t i = 0; i < (sizeof(NTCHandleLookup) / (2 * sizeof(uint16_t)));
i++) {
for (uint32_t i = 0; i < (sizeof(NTCHandleLookup) / (2 * sizeof(uint16_t))); i++) {
if (result > NTCHandleLookup[(i * 2) + 0]) {
return NTCHandleLookup[(i * 2) + 1] * 10;
}
}
return 0;
return 45 * 10;
#endif
#ifdef TEMP_TMP36
// We return the current handle temperature in X10 C