From 7475e3c1053f10b5b942c20ad8aa55ea649a74c7 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Sun, 9 May 2021 10:31:42 +0800 Subject: [PATCH] give more margin for heltec no battery voltage --- geeksville-private/TODO.md | 13 +++++++------ src/Power.cpp | 4 +++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/geeksville-private/TODO.md b/geeksville-private/TODO.md index 7dbf5b0fd..51f136e78 100644 --- a/geeksville-private/TODO.md +++ b/geeksville-private/TODO.md @@ -4,17 +4,18 @@ You probably don't care about this section - skip to the next one. ## before next release +* fix python tool problem +* fix ttgo eink screen +* make native sim not touch hardware +* reenable sim in CI builds +* figure our wss for mqtt.meshtastic - use cloudflare? 2052 ws, 2053 crypt +* release android APK - fix recent 1.2.28 crash report * turn on setTx(timeout) and state = setDioIrqParams(SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT, SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT); in sx1262 code * pine64 lora module -* nrf52 USB is unreliable while sleeping? * @havealoha fixedposition not working -* merge https://meshtastic.discourse.group/t/spanish-translation-update/2986/5 * @luxonn reports that after a while the android app stops showing new messages -* nrf52 shows as "sleeping" in android app? (but led is blinking) * ask for vercel access -* fix heltec battery scaling -* check android 1.2.20 usage, possibly release to general -* release android APK +* finish plan for riot.im * add rak4600 support (with rf95 radio and limited ram) diff --git a/src/Power.cpp b/src/Power.cpp index 2ff783ad9..1f4848713 100644 --- a/src/Power.cpp +++ b/src/Power.cpp @@ -129,7 +129,9 @@ class AnalogBatteryLevel : public HasBatteryLevel private: /// If we see a battery voltage higher than physics allows - assume charger is pumping /// in power - const float fullVolt = 4200, emptyVolt = 3270, chargingVolt = 4210, noBatVolt = 2100; + + /// For heltecs with no battery connected, the measured voltage is 2204, so raising to 2230 from 2100 + const float fullVolt = 4200, emptyVolt = 3270, chargingVolt = 4210, noBatVolt = 2230; float last_read_value = 0.0; uint32_t last_read_time_ms = 0; } analogLevel;