mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-10 17:59:53 +03:00
code formatting
This commit is contained in:
@@ -2658,7 +2658,7 @@ void MyESP::_addMQTTLog(const char * topic, const char * payload) {
|
|||||||
// myDebug("Publish [#%d] %s (%d) %s (%d)", logCount, topic, strlen(topic), payload, strlen(payload)); // for debugging
|
// myDebug("Publish [#%d] %s (%d) %s (%d)", logCount, topic, strlen(topic), payload, strlen(payload)); // for debugging
|
||||||
|
|
||||||
// find the topic
|
// find the topic
|
||||||
while ((_hasValue(MQTT_log[logPointer].topic) && logPointer < MYESP_MQTTLOG_MAX)) {
|
while ((logPointer < MYESP_MQTTLOG_MAX) && (_hasValue(MQTT_log[logPointer].topic))) {
|
||||||
if (strcmp(MQTT_log[logPointer].topic, topic) == 0) {
|
if (strcmp(MQTT_log[logPointer].topic, topic) == 0) {
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -573,8 +573,7 @@ void TelnetSpy::handle() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!listening) {
|
if (!listening) {
|
||||||
|
if ((WiFi.status() == WL_DISCONNECTED) && (WiFi.getMode() & WIFI_AP)) {
|
||||||
if ((WiFi.status() == WL_DISCONNECTED) && (WiFi.getMode() & WIFI_AP)) {
|
|
||||||
if (usedSer) {
|
if (usedSer) {
|
||||||
usedSer->println("[TELNET] in AP mode"); // added by Proddy
|
usedSer->println("[TELNET] in AP mode"); // added by Proddy
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,28 +105,28 @@ void refreshCache(time_t t) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int day(time_t t) { // the day for the given time (0-6)
|
int day(time_t t) { // the day for the given time (0-6)
|
||||||
refreshCache(t);
|
refreshCache(t);
|
||||||
return tm.Day;
|
return tm.Day;
|
||||||
}
|
}
|
||||||
|
|
||||||
int month(time_t t) { // the month for the given time
|
int month(time_t t) { // the month for the given time
|
||||||
refreshCache(t);
|
refreshCache(t);
|
||||||
return tm.Month;
|
return tm.Month;
|
||||||
}
|
}
|
||||||
|
|
||||||
int second(time_t t) { // the second for the given time
|
int second(time_t t) { // the second for the given time
|
||||||
refreshCache(t);
|
refreshCache(t);
|
||||||
return tm.Second;
|
return tm.Second;
|
||||||
}
|
}
|
||||||
|
|
||||||
int minute(time_t t) { // the minute for the given time
|
int minute(time_t t) { // the minute for the given time
|
||||||
refreshCache(t);
|
refreshCache(t);
|
||||||
return tm.Minute;
|
return tm.Minute;
|
||||||
}
|
}
|
||||||
|
|
||||||
int hour(time_t t) { // the hour for the given time
|
int hour(time_t t) { // the hour for the given time
|
||||||
refreshCache(t);
|
refreshCache(t);
|
||||||
return tm.Hour;
|
return tm.Hour;
|
||||||
}
|
}
|
||||||
|
|
||||||
int year(time_t t) { // the year for the given time
|
int year(time_t t) { // the year for the given time
|
||||||
@@ -140,4 +140,3 @@ void setTime(time_t t) {
|
|||||||
Status = timeSet;
|
Status = timeSet;
|
||||||
prevMillis = millis(); // restart counting from now (thanks to Korman for this fix)
|
prevMillis = millis(); // restart counting from now (thanks to Korman for this fix)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user