From a652715873d722010c8b335ea87182b0f9b8b7ca Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Tue, 6 Sep 2022 01:51:49 -0400 Subject: [PATCH] interpolation helpers are no longer used (#145) Co-authored-by: Andrey Gusakov --- firmware/Makefile | 1 - firmware/interpolation.cpp | 19 ------------------- firmware/interpolation.h | 4 ---- 3 files changed, 24 deletions(-) delete mode 100644 firmware/interpolation.cpp delete mode 100644 firmware/interpolation.h diff --git a/firmware/Makefile b/firmware/Makefile index 4fa85ad..8f17205 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -152,7 +152,6 @@ CPPSRC = $(ALLCPPSRC) \ pump_control.cpp \ max31855.cpp \ uart.cpp \ - interpolation.cpp \ auxout.cpp \ livedata.cpp \ console/binary/tunerstudio.cpp \ diff --git a/firmware/interpolation.cpp b/firmware/interpolation.cpp deleted file mode 100644 index eaffc87..0000000 --- a/firmware/interpolation.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "interpolation.h" - -float interpolateFloat(float x1, float y1, float x2, float y2, float x) -{ - if (x1 == x2) - return y1; - - return (y1 + (y2 - y1) * (x - x1) / (x2 - x1)); -} - -float interpolateFloatClamped(float x1, float y1, float x2, float y2, float x) -{ - if (x <= x1) - return y1; - if (x >= x2) - return y2; - - return interpolateFloat(x1, y1, x2, y2, x); -} diff --git a/firmware/interpolation.h b/firmware/interpolation.h deleted file mode 100644 index 67e4028..0000000 --- a/firmware/interpolation.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -float interpolateFloat(float x1, float y1, float x2, float y2, float x); -float interpolateFloatClamped(float x1, float y1, float x2, float y2, float x);