From ca5795d3e7ebd06485fe3bfdf8f1c42c5ff04b6b Mon Sep 17 00:00:00 2001 From: code8buster <20384924+code8buster@users.noreply.github.com> Date: Thu, 8 Feb 2024 20:46:22 +0000 Subject: [PATCH] Fix init resolution for all architectures --- src/Power.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Power.cpp b/src/Power.cpp index dc8a43d46e..ffae81aec5 100644 --- a/src/Power.cpp +++ b/src/Power.cpp @@ -389,11 +389,9 @@ bool Power::analogInit() #else analogReference(AR_INTERNAL); // 3.6V #endif - analogReadResolution(BATTERY_SENSE_RESOLUTION_BITS); // Default of 12 is not very linear. Recommended to use 10 or 11 - // depending on needed resolution. - #endif // ARCH_NRF52 - + analogReadResolution(BATTERY_SENSE_RESOLUTION_BITS); + batteryLevel = &analogLevel; return true; #else @@ -900,4 +898,4 @@ bool Power::axpChipInit() #else return false; #endif -} \ No newline at end of file +}