Heltec Battery Readings update
This commit is contained in:
parent
1638adee06
commit
2fa922c75f
|
|
@ -59,6 +59,7 @@ ____________________________________________________
|
|||
____________________________________________________
|
||||
## Timeline (Versions):
|
||||
|
||||
- 2024.05.07 HELTEC V3 and Wireless Tracker Battery Measurments at 30seg to avoid accelerated discharge.
|
||||
- 2024.05.06 New Output Buffer for Messages with retry posibilities.
|
||||
- 2024.04.25 Added Lilygo TTGO T-Deck (add Neo6Mv2 GPS) support.
|
||||
- 2024.04.12 Added HELTEC Wireless Tracker support.
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ BluetoothSerial SerialBT;
|
|||
OneButton userButton = OneButton(BUTTON_PIN, true, true);
|
||||
#endif
|
||||
|
||||
String versionDate = "2024.05.06";
|
||||
String versionDate = "2024.05.07";
|
||||
|
||||
uint8_t myBeaconsIndex = 0;
|
||||
int myBeaconsSize = Config.beacons.size();
|
||||
|
|
@ -133,6 +133,8 @@ String winlinkAlias = "";
|
|||
String winlinkAliasComplete = "";
|
||||
bool winlinkCommentState = false;
|
||||
|
||||
uint32_t batteryMeasurmentTime = 0;
|
||||
|
||||
APRSPacket lastReceivedPacket;
|
||||
|
||||
logging::Logger logger;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ XPowersAXP2101 PMU;
|
|||
extern Configuration Config;
|
||||
extern logging::Logger logger;
|
||||
extern bool disableGPS;
|
||||
extern uint32_t batteryMeasurmentTime;
|
||||
|
||||
bool pmuInterrupt;
|
||||
float lora32BatReadingCorr = 6.5; // % of correction to higher value to reflect the real battery voltage (adjust this to your needs)
|
||||
|
|
@ -63,6 +64,7 @@ namespace POWER_Utils {
|
|||
#ifdef HELTEC_V3_GPS
|
||||
digitalWrite(ADC_CTRL, HIGH);
|
||||
#endif
|
||||
batteryMeasurmentTime = millis();
|
||||
#endif
|
||||
double voltage = (adc_value * 3.3 ) / 4095.0;
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(OE5HWN_MeshCom)
|
||||
|
|
@ -163,7 +165,11 @@ namespace POWER_Utils {
|
|||
}
|
||||
|
||||
void batteryManager() {
|
||||
#ifdef ADC_CTRL
|
||||
if(batteryMeasurmentTime == 0 || (millis() - batteryMeasurmentTime) > 30 * 1000) obtainBatteryInfo();
|
||||
#else
|
||||
obtainBatteryInfo();
|
||||
#endif
|
||||
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
|
||||
handleChargingLed();
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue