diff --git a/examples/simple_repeater/main.cpp b/examples/simple_repeater/main.cpp index 80cae6a6..e7f852f3 100644 --- a/examples/simple_repeater/main.cpp +++ b/examples/simple_repeater/main.cpp @@ -19,7 +19,7 @@ /* ------------------------------ Config -------------------------------- */ -#define FIRMWARE_VER_TEXT "v2 (build: 1 Feb 2025)" +#define FIRMWARE_VER_TEXT "v2 (build: 2 Feb 2025)" #ifndef LORA_FREQ #define LORA_FREQ 915.0 diff --git a/src/helpers/RAK4631Board.h b/src/helpers/RAK4631Board.h index e194d05a..5894f586 100644 --- a/src/helpers/RAK4631Board.h +++ b/src/helpers/RAK4631Board.h @@ -19,8 +19,8 @@ #define SX126X_DIO3_TCXO_VOLTAGE 1.8 // built-ins -#define PIN_VBAT_READ 1 -#define ADC_MULTIPLIER 6.17 +#define PIN_VBAT_READ 5 +#define ADC_MULTIPLIER (3 * 1.73) class RAK4631Board : public mesh::MainBoard { protected: @@ -31,6 +31,8 @@ public: // for future use, sub-classes SHOULD call this from their begin() startup_reason = BD_STARTUP_NORMAL; + pinMode(PIN_VBAT_READ, INPUT); + pinMode(SX126X_POWER_EN, OUTPUT); digitalWrite(SX126X_POWER_EN, HIGH); delay(10); // give sx1262 some time to power up @@ -38,7 +40,7 @@ public: uint8_t getStartupReason() const override { return startup_reason; } - #define BATTERY_SAMPLES 10 + #define BATTERY_SAMPLES 8 uint16_t getBattMilliVolts() override { analogReadResolution(12);