Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Commit

Permalink
code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Sep 1, 2019
1 parent a538a89 commit 7606f91
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/MyESP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

// 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) {
found = true;
break;
Expand Down
3 changes: 1 addition & 2 deletions src/TelnetSpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,7 @@ void TelnetSpy::handle() {
return;
}
if (!listening) {

if ((WiFi.status() == WL_DISCONNECTED) && (WiFi.getMode() & WIFI_AP)) {
if ((WiFi.status() == WL_DISCONNECTED) && (WiFi.getMode() & WIFI_AP)) {
if (usedSer) {
usedSer->println("[TELNET] in AP mode"); // added by Proddy
}
Expand Down
25 changes: 12 additions & 13 deletions src/TimeLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,28 +105,28 @@ void refreshCache(time_t t) {
}

int day(time_t t) { // the day for the given time (0-6)
refreshCache(t);
return tm.Day;
refreshCache(t);
return tm.Day;
}

int month(time_t t) { // the month for the given time
refreshCache(t);
return tm.Month;
int month(time_t t) { // the month for the given time
refreshCache(t);
return tm.Month;
}

int second(time_t t) { // the second for the given time
refreshCache(t);
return tm.Second;
int second(time_t t) { // the second for the given time
refreshCache(t);
return tm.Second;
}

int minute(time_t t) { // the minute for the given time
refreshCache(t);
return tm.Minute;
refreshCache(t);
return tm.Minute;
}

int hour(time_t t) { // the hour for the given time
refreshCache(t);
return tm.Hour;
refreshCache(t);
return tm.Hour;
}

int year(time_t t) { // the year for the given time
Expand All @@ -140,4 +140,3 @@ void setTime(time_t t) {
Status = timeSet;
prevMillis = millis(); // restart counting from now (thanks to Korman for this fix)
}

0 comments on commit 7606f91

Please sign in to comment.