more code cleaning

This commit is contained in:
richonguzman 2024-01-02 01:14:12 -03:00
parent 4fe1494b94
commit 8256bb4327
2 changed files with 5 additions and 5 deletions

View File

@ -401,20 +401,20 @@ namespace MENU_Utils {
}
#endif
#if defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_2_SX1262)
if (Config.notification.lowBatteryBeep && !POWER_Utils::isChargeing() && batteryCharge.toInt() < lowBatteryPercent) {
if (Config.notification.lowBatteryBeep && !POWER_Utils::isCharging() && batteryCharge.toInt() < lowBatteryPercent) {
lowBatteryPercent = batteryCharge.toInt();
NOTIFICATION_Utils::lowBatteryBeep();
if (batteryCharge.toInt() < 6) {
NOTIFICATION_Utils::lowBatteryBeep();
}
}
if (POWER_Utils::isChargeing()) {
if (POWER_Utils::isCharging()) {
lowBatteryPercent = 21;
}
batteryVoltage = batteryVoltage.toFloat()/1000;
if (POWER_Utils::isChargeing() && batteryCharge!="100") {
if (POWER_Utils::isCharging() && batteryCharge!="100") {
sixthRowMainMenu = "Bat: " + String(batteryVoltage) + "V (charging)";
} else if (!POWER_Utils::isChargeing() && batteryCharge=="100") {
} else if (!POWER_Utils::isCharging() && batteryCharge=="100") {
sixthRowMainMenu = "Battery Charged " + String(batteryVoltage) + "V";
} else {
sixthRowMainMenu = "Battery " + String(batteryVoltage) + "V " + batteryCharge + "%";

View File

@ -105,7 +105,7 @@
#define RADIO_BUSY_PIN 4
/* NOT USED????
/*#define SPI_MOSI 35 // ??
#define SPI_MOSI 35 // ??
#define SPI_SCK 36 // ??
#define SPI_MISO 37 // ??
#define SPI_CS 47 // ??