Miniware+Pinecil: fix number of items in uVtoDegC array. This only af… (#1531)
Miniware+Pinecil: fix number of items in uVtoDegC array. This only affects us in case we go above 500degC, in which case we'll be reading invalid memory
This commit is contained in:
@@ -125,6 +125,6 @@ const int32_t uVtoDegC[] = {
|
|||||||
38137, 500, //
|
38137, 500, //
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
const int uVtoDegCItems = sizeof(uVtoDegC) / (2 * sizeof(uint16_t));
|
const int uVtoDegCItems = sizeof(uVtoDegC) / (2 * sizeof(uVtoDegC[0]));
|
||||||
|
|
||||||
uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }
|
uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }
|
||||||
|
|||||||
@@ -67,6 +67,6 @@ const int32_t uVtoDegC[] = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const int uVtoDegCItems = sizeof(uVtoDegC) / (2 * sizeof(uint16_t));
|
const int uVtoDegCItems = sizeof(uVtoDegC) / (2 * sizeof(uVtoDegC[0]));
|
||||||
|
|
||||||
uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }
|
uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }
|
||||||
|
|||||||
Reference in New Issue
Block a user