mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Return max rather than 0 for handle temp if outside of temp range [TS80P]
This commit is contained in:
@@ -60,37 +60,37 @@ static const uint16_t NTCHandleLookup[] = {
|
|||||||
22264, 27, //
|
22264, 27, //
|
||||||
21933, 28, //
|
21933, 28, //
|
||||||
21599, 29, //
|
21599, 29, //
|
||||||
21261, 30, //
|
21261, 30, //
|
||||||
20921, 31, //
|
20921, 31, //
|
||||||
20579, 32, //
|
20579, 32, //
|
||||||
20234, 33, //
|
20234, 33, //
|
||||||
19888, 34, //
|
19888, 34, //
|
||||||
19541, 35, //
|
19541, 35, //
|
||||||
19192, 36, //
|
19192, 36, //
|
||||||
18843, 37, //
|
18843, 37, //
|
||||||
18493, 38, //
|
18493, 38, //
|
||||||
18143, 39, //
|
18143, 39, //
|
||||||
17793, 40, //
|
17793, 40, //
|
||||||
17444, 41, //
|
17444, 41, //
|
||||||
17096, 42, //
|
17096, 42, //
|
||||||
16750, 43, //
|
16750, 43, //
|
||||||
16404, 44, //
|
16404, 44, //
|
||||||
16061, 45, //
|
16061, 45, //
|
||||||
// 15719, 46, //
|
// 15719, 46, //
|
||||||
// 15380, 47, //
|
// 15380, 47, //
|
||||||
// 15044, 48, //
|
// 15044, 48, //
|
||||||
// 14710, 49, //
|
// 14710, 49, //
|
||||||
// 14380, 50, //
|
// 14380, 50, //
|
||||||
// 14053, 51, //
|
// 14053, 51, //
|
||||||
// 13729, 52, //
|
// 13729, 52, //
|
||||||
// 13410, 53, //
|
// 13410, 53, //
|
||||||
// 13094, 54, //
|
// 13094, 54, //
|
||||||
// 12782, 55, //
|
// 12782, 55, //
|
||||||
// 12475, 56, //
|
// 12475, 56, //
|
||||||
// 12172, 57, //
|
// 12172, 57, //
|
||||||
// 11874, 58, //
|
// 11874, 58, //
|
||||||
// 11580, 59, //
|
// 11580, 59, //
|
||||||
// 11292, 60, //
|
// 11292, 60, //
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -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