From 71d5b0d607a1273909c8794c1f901a90c90b9002 Mon Sep 17 00:00:00 2001 From: Wessel Nieboer Date: Thu, 5 Mar 2026 03:34:38 +0100 Subject: [PATCH] remove adc override --- variants/rak11200/RAK11200Board.cpp | 13 ------------- variants/rak11200/RAK11200Board.h | 2 -- 2 files changed, 15 deletions(-) diff --git a/variants/rak11200/RAK11200Board.cpp b/variants/rak11200/RAK11200Board.cpp index 602ce96cb..20b3a3c46 100644 --- a/variants/rak11200/RAK11200Board.cpp +++ b/variants/rak11200/RAK11200Board.cpp @@ -18,19 +18,6 @@ void RAK11200Board::begin() { #endif } -uint16_t RAK11200Board::getBattMilliVolts() { - analogReadResolution(12); - - uint32_t raw = 0; - const int BATTERY_SAMPLES = 8; - for (int i = 0; i < BATTERY_SAMPLES; i++) { - raw += analogRead(PIN_VBAT_READ); - } - raw = raw / BATTERY_SAMPLES; - - return (ADC_MULTIPLIER * raw) / 4096; -} - const char* RAK11200Board::getManufacturerName() const { return "RAK 11200"; } diff --git a/variants/rak11200/RAK11200Board.h b/variants/rak11200/RAK11200Board.h index 0c93d611c..ecd00fba9 100644 --- a/variants/rak11200/RAK11200Board.h +++ b/variants/rak11200/RAK11200Board.h @@ -13,13 +13,11 @@ #define P_LORA_MOSI 25 // GPIO25 (ESP32 pin 10 -> SPI_MOSI) #define SX126X_POWER_EN 27 // GPIO27 (ESP32 pin 12 -> IO2) #define PIN_VBAT_READ 36 // WB_A0 for battery reading -#define ADC_MULTIPLIER (3 * 1.73 * 1.110 * 1000) class RAK11200Board : public ESP32Board { public: void begin(); - uint16_t getBattMilliVolts() override; const char* getManufacturerName() const override; };