lowBatteryBeep update
This commit is contained in:
parent
5864652211
commit
50bbcf6c47
|
|
@ -55,7 +55,7 @@ bool bluetoothConnected = false;
|
||||||
|
|
||||||
bool messageLed = false;
|
bool messageLed = false;
|
||||||
uint32_t messageLedTime = millis();
|
uint32_t messageLedTime = millis();
|
||||||
int batteryPercent = 21;
|
int lowBatteryPercent = 21;
|
||||||
|
|
||||||
uint32_t lastTx = 0.0;
|
uint32_t lastTx = 0.0;
|
||||||
uint32_t txInterval = 60000L;
|
uint32_t txInterval = 60000L;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ extern std::vector<String> loadedAPRSMessages;
|
||||||
extern int messagesIterator;
|
extern int messagesIterator;
|
||||||
extern uint32_t menuTime;
|
extern uint32_t menuTime;
|
||||||
extern bool symbolAvailable;
|
extern bool symbolAvailable;
|
||||||
extern int batteryPercent;
|
extern int lowBatteryPercent;
|
||||||
|
|
||||||
namespace MENU_Utils {
|
namespace MENU_Utils {
|
||||||
|
|
||||||
|
|
@ -148,18 +148,15 @@ namespace MENU_Utils {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef TTGO_T_Beam_V1_2
|
#ifdef TTGO_T_Beam_V1_2
|
||||||
if (Config.notification.lowBatteryBeep && !powerManagement.isChargeing() && batteryCharge.toInt() < batteryPercent) {
|
if (Config.notification.lowBatteryBeep && !powerManagement.isChargeing() && batteryCharge.toInt() < lowBatteryPercent) {
|
||||||
Serial.println(batteryPercent);
|
lowBatteryPercent = batteryCharge.toInt();
|
||||||
Serial.println(batteryCharge.toInt());
|
|
||||||
Serial.println("--");
|
|
||||||
batteryPercent = batteryCharge.toInt();
|
|
||||||
NOTIFICATION_Utils::lowBatteryBeep();
|
NOTIFICATION_Utils::lowBatteryBeep();
|
||||||
if (batteryCharge.toInt() < 6) {
|
if (batteryCharge.toInt() < 6) {
|
||||||
NOTIFICATION_Utils::lowBatteryBeep();
|
NOTIFICATION_Utils::lowBatteryBeep();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (powerManagement.isChargeing()) {
|
if (powerManagement.isChargeing()) {
|
||||||
batteryPercent = 21;
|
lowBatteryPercent = 21;
|
||||||
}
|
}
|
||||||
batteryVoltage = batteryVoltage.toFloat()/1000;
|
batteryVoltage = batteryVoltage.toFloat()/1000;
|
||||||
if (powerManagement.isChargeing() && batteryCharge!="100") {
|
if (powerManagement.isChargeing() && batteryCharge!="100") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue