diff --git a/game.cpp b/game.cpp index 50a58d1..ad9b3dc 100644 --- a/game.cpp +++ b/game.cpp @@ -255,8 +255,8 @@ void gameLoop() } drawString(gameBuff,(char*)"LOW BATTERY!",0,0,0xE0,0); - drawString(gameBuff,(char*)"PLEASE CHARGE!",0,0,0xE0,0); - + drawString(gameBuff,(char*)"PLEASE CHARGE!",0,16,0xE0,0); + return; } calcFPS(); diff --git a/platform/esp32.h b/platform/esp32.h index 27e6047..5d2767b 100644 --- a/platform/esp32.h +++ b/platform/esp32.h @@ -38,7 +38,7 @@ static float battery_voltage = 0.0f; static uint64_t timeStamp = 0; float getVoltage() { - if (millis() - timeStamp > 10000) { + if (millis() - timeStamp > 2000) { float v = ((float)analogRead(ADC_PIN) / 4095.0) * 2.0 * 3.3 * (vref / 1000.0); if (v > 0) { battery_voltage = v;