From 9b5a294695654d2dd4e39ff629e505149b6b5874 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Sat, 8 Mar 2025 20:18:15 +1100 Subject: [PATCH] * T1000e battery measure fix --- src/helpers/nrf52/T1000eBoard.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/helpers/nrf52/T1000eBoard.h b/src/helpers/nrf52/T1000eBoard.h index 14272edb5..3c0f30b4d 100644 --- a/src/helpers/nrf52/T1000eBoard.h +++ b/src/helpers/nrf52/T1000eBoard.h @@ -31,8 +31,13 @@ public: uint16_t getBattMilliVolts() override { #ifdef BATTERY_PIN + analogReference(AR_INTERNAL_3_0); analogReadResolution(12); float volts = (analogRead(BATTERY_PIN) * ADC_MULTIPLIER * AREF_VOLTAGE) / 4096; + + analogReference(AR_DEFAULT); // put back to default + analogReadResolution(10); + return volts * 1000; #else return 0;