From 4dfe1ddab93d23a0ca84a72e3a4811e0ed3bbafc Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sun, 1 Jun 2025 14:47:05 -0500 Subject: [PATCH] better fix for clamp() on native --- src/graphics/draw/NodeListRenderer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graphics/draw/NodeListRenderer.cpp b/src/graphics/draw/NodeListRenderer.cpp index d2ba64d05..74fd8b98e 100644 --- a/src/graphics/draw/NodeListRenderer.cpp +++ b/src/graphics/draw/NodeListRenderer.cpp @@ -8,6 +8,7 @@ #include "graphics/ScreenFonts.h" #include "graphics/SharedUIDisplay.h" #include "graphics/images.h" +#include "meshUtils.h" #include // Forward declarations for functions defined in Screen.cpp @@ -663,7 +664,7 @@ void drawNodeInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, in // 2. Signal and Hops (combined on one line, if available) char signalHopsStr[32] = ""; bool haveSignal = false; - int percentSignal = std::clamp((int)((node->snr + 10) * 5), 0, 100); + int percentSignal = clamp((int)((node->snr + 10) * 5), 0, 100); const char *signalLabel = " Sig"; // If SNR looks reasonable, show signal