add updater and some tiny changes

This commit is contained in:
sharandac
2020-07-22 11:43:49 +02:00
parent 9c67712f90
commit 3d85767af9
18 changed files with 473 additions and 12 deletions

View File

@@ -109,7 +109,7 @@ void pmu_loop( TTGOClass *ttgo ) {
uint32_t pmu_get_byttery_percent( TTGOClass *ttgo ) {
// discharg coulumb higher then charge coulumb, battery state unknow and set to zero
if ( ttgo->power->getBattChargeCoulomb() < ttgo->power->getBattDischargeCoulomb() ) {
if ( ttgo->power->getBattChargeCoulomb() < ttgo->power->getBattDischargeCoulomb() || ttgo->power->getBattVoltage() < 3200 ) {
ttgo->power->ClearCoulombcounter();
return( -1 );
}