Convert the interpolator to int32

This commit is contained in:
Ben V. Brown
2022-07-13 20:19:57 +10:00
parent 7b30d040e7
commit c23a29a51a
3 changed files with 4 additions and 4 deletions

View File

@@ -7,7 +7,7 @@
#include <Utils.h>
int32_t Utils::InterpolateLookupTable(const uint16_t *lookupTable, const int noItems, const uint16_t value) {
int32_t Utils::InterpolateLookupTable(const int32_t *lookupTable, const int noItems, const int32_t value) {
if (value) {
for (int i = 1; i < (noItems - 1); i++) {
// If current tip temp is less than current lookup, then this current lookup is the higher point to interpolate

View File

@@ -10,7 +10,7 @@
#include <stdint.h>
class Utils {
public:
static int32_t InterpolateLookupTable(const uint16_t *lookupTable, const int noItems, const uint16_t value);
static int32_t InterpolateLookupTable(const int32_t *lookupTable, const int noItems, const int32_t value);
static int32_t LinearInterpolate(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x);
};