From d4e8452c60822226755b506685b4a0c6e7bae188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 25 Sep 2024 20:51:11 +0200 Subject: [PATCH] Tbeams have no ADC (#4871) --- src/Power.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Power.cpp b/src/Power.cpp index bbb6cd2c3..c71d17586 100644 --- a/src/Power.cpp +++ b/src/Power.cpp @@ -147,6 +147,8 @@ using namespace meshtastic; */ static HasBatteryLevel *batteryLevel; // Default to NULL for no battery level sensor +#ifdef BATTERY_PIN + static void adcEnable() { #ifdef ADC_CTRL // enable adc voltage divider when we need to read @@ -171,6 +173,8 @@ static void adcDisable() #endif } +#endif + /** * A simple battery level sensor that assumes the battery voltage is attached via a voltage-divider to an analog input */