From e953ec9216f7d8c5fc36592e91406dce557d4268 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Mon, 23 May 2022 23:41:39 +0200 Subject: [PATCH] Cleanup arduino useless bullshit --- src/widgets/vumeter.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/widgets/vumeter.cpp b/src/widgets/vumeter.cpp index 5400eea..d4f6937 100644 --- a/src/widgets/vumeter.cpp +++ b/src/widgets/vumeter.cpp @@ -1,5 +1,12 @@ #include "vumeter.h" +// system includes +#include + +// 3rdparty lib includes +#include +#include + // local includes #include "tftinstance.h" @@ -104,7 +111,7 @@ void VuMeter::redraw(float value) if (value < -3) value = -3; // Limit value to emulate needle end stops if (value > 33) value = 33; - float sdeg = map(value, -3, 33, -150, -30); // Map value to angle + float sdeg = cpputils::mapValue(value, -3, 33, -150, -30); // Map value to angle // Calcualte tip of needle coords float sx = cos(sdeg * 0.0174532925); float sy = sin(sdeg * 0.0174532925);