From 113b2f10817e02d9c90dee103ed3259342e8c473 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 15 Jan 2025 21:18:52 +0100 Subject: [PATCH] Battery management for T-Echo --- Power.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Power.h b/Power.h index 5320126..3ab6e10 100644 --- a/Power.h +++ b/Power.h @@ -130,7 +130,7 @@ float bat_state_change_v = 0; #elif BOARD_MODEL == BOARD_TECHO #define BAT_V_MIN 3.15 - #define BAT_V_MAX 4.2 + #define BAT_V_MAX 4.16 #define BAT_V_CHG 4.48 #define BAT_V_FLOAT 4.33 #define BAT_SAMPLES 7 @@ -165,7 +165,7 @@ void measure_battery() { #elif BOARD_MODEL == BOARD_HELTEC_T114 float battery_measurement = (float)(analogRead(pin_vbat)) * 0.017165; #elif BOARD_MODEL == BOARD_TECHO - float battery_measurement = (float)(analogRead(pin_vbat)) * 0.017165; + float battery_measurement = (float)(analogRead(pin_vbat)) * 0.007067; #else float battery_measurement = (float)(analogRead(pin_vbat)) / 4095.0*7.26; #endif @@ -340,7 +340,7 @@ void update_pmu() { } bool init_pmu() { - #if BOARD_MODEL == BOARD_RNODE_NG_21 || BOARD_MODEL == BOARD_LORA32_V2_1 || BOARD_MODEL == BOARD_TDECK || BOARD_MODEL ==BOARD_T3S3 + #if BOARD_MODEL == BOARD_RNODE_NG_21 || BOARD_MODEL == BOARD_LORA32_V2_1 || BOARD_MODEL == BOARD_TDECK || BOARD_MODEL == BOARD_T3S3 || BOARD_MODEL == BOARD_TECHO pinMode(pin_vbat, INPUT); return true; #elif BOARD_MODEL == BOARD_HELTEC32_V3