Skip to content

Commit ae3479f

Browse files
committed
Apply suggested style fixes.
1 parent f783789 commit ae3479f

File tree

5 files changed

+26
-31
lines changed

5 files changed

+26
-31
lines changed

libraries/esp8266/examples/AutoSleepDemo/AutoSleepDemo.ino

+7-6
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535

3636
// enter your WiFi configuration below
3737
const char* AP_SSID = "SSID"; // your router's SSID here
38-
const char* AP_PASS = "PSK"; // your router's password here
38+
const char* AP_PASS = "PSK"; // your router's password here
3939

40-
uint32_t timeout = 30E3; // 30 second timeout on the WiFi connection
40+
uint32_t timeout = 30E3; // 30 second timeout on the WiFi connection
4141
esp8266::polledTimeout::oneShotMs wifiTimeout(timeout); // 30 second timeout on WiFi connection
4242

4343
ESP8266WebServer server(80);
@@ -63,7 +63,8 @@ void handleNotFound() {
6363

6464
void setup() {
6565
Serial.begin(74880);
66-
while (!Serial);
66+
while (!Serial)
67+
;
6768
delay(100);
6869
Serial.println();
6970
WiFi.mode(WIFI_STA);
@@ -83,9 +84,9 @@ void setup() {
8384
}
8485
WiFi.setAutoReconnect(true);
8586

86-
//if (MDNS.begin("esp8266")) {
87-
// Serial.println("MDNS responder started");
88-
//}
87+
// if (MDNS.begin("esp8266")) {
88+
// Serial.println("MDNS responder started");
89+
// }
8990

9091
server.on("/", handleRoot);
9192

libraries/esp8266/examples/ForcedLightSleep/ForcedLightSleep.ino

+4-3
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ void wakeupCallback() {
5454

5555
void setup() {
5656
Serial.begin(74880);
57-
while (!Serial);
57+
while (!Serial)
58+
;
5859
delay(100);
59-
pinMode(LED_BUILTIN, OUTPUT); // activity and status indicator
60-
digitalWrite(LED_BUILTIN, LOW); // turn on the LED
60+
pinMode(LED_BUILTIN, OUTPUT); // activity and status indicator
61+
digitalWrite(LED_BUILTIN, LOW); // turn on the LED
6162
pinMode(WAKE_UP_PIN, INPUT_PULLUP); // polled to advance tests, interrupt for Forced Light Sleep
6263
attachInterrupt(WAKE_UP_PIN, wakeupPinIsr, FALLING);
6364
}

libraries/esp8266/examples/ForcedModemSleep/ForcedModemSleep.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ void wakeupCallback() {
3535

3636
void setup() {
3737
Serial.begin(74880);
38-
while (!Serial);
38+
while (!Serial)
39+
;
3940
delay(100);
40-
pinMode(LED_BUILTIN, OUTPUT); // activity and status indicator
41+
pinMode(LED_BUILTIN, OUTPUT); // activity and status indicator
4142
digitalWrite(LED_BUILTIN, LOW); // turn on the LED
4243
}
4344

libraries/esp8266/examples/LowPowerDemo/LowPowerDemo.ino

+6-6
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,9 @@ void runTest7() {
289289
// WiFi.shutdown(nv->wss); // Forced Modem Sleep for a more Instant Deep Sleep,
290290
// and no extended RFCAL as it goes into Deep Sleep
291291
Serial.println(F("going into Deep Sleep now..."));
292-
printMillis(); // show time difference across sleep
293-
testPoint_HIGH; // testPoint set HIGH to track Deep Sleep period, cleared at startup()
294-
ESP.deepSleep(10E6); // good night! D0 fires a reset in 10 seconds...
292+
printMillis(); // show time difference across sleep
293+
testPoint_HIGH; // testPoint set HIGH to track Deep Sleep period, cleared at startup()
294+
ESP.deepSleep(10E6); // good night! D0 fires a reset in 10 seconds...
295295
// if you do ESP.deepSleep(0); it needs a RESET to come out of sleep (RTC is disconnected)
296296
// maximum timed Deep Sleep interval ~ 3 to 4 hours depending on the RTC timer, see the README
297297
// the 2 uA GPIO amperage during Deep Sleep can't drive the LED so it's not lit now, although
@@ -309,7 +309,7 @@ void runTest8() {
309309
Serial.println(F("going into Deep Sleep now..."));
310310
Serial.flush(); // needs a delay(10) or Serial.flush() else it doesn't print the whole message
311311
testPoint_HIGH; // testPoint set HIGH to track Deep Sleep period, cleared at startup()
312-
ESP.deepSleep(10E6); // good night! D0 fires a reset in 10 seconds...
312+
ESP.deepSleep(10E6); // good night! D0 fires a reset in 10 seconds...
313313
Serial.println(F("What... I'm not asleep?!?")); // it will never get here
314314
}
315315

@@ -322,7 +322,7 @@ void runTest9() {
322322
Serial.println(F("going into Deep Sleep now..."));
323323
Serial.flush(); // needs a delay(10) or Serial.flush() else it doesn't print the whole message
324324
testPoint_HIGH; // testPoint set HIGH to track Deep Sleep period, cleared at startup()
325-
ESP.deepSleepInstant(10E6); // good night! D0 fires a reset in 10 seconds...
325+
ESP.deepSleepInstant(10E6); // good night! D0 fires a reset in 10 seconds...
326326
Serial.println(F("What... I'm not asleep?!?")); // it will never get here
327327
}
328328

@@ -335,7 +335,7 @@ void runTest10() {
335335
Serial.println(F("going into Deep Sleep now..."));
336336
Serial.flush(); // needs a delay(10) or Serial.flush() else it doesn't print the whole message
337337
testPoint_HIGH; // testPoint set HIGH to track Deep Sleep period, cleared at startup()
338-
ESP.deepSleepInstant(10E6); // good night! D0 fires a reset in 10 seconds...
338+
ESP.deepSleepInstant(10E6); // good night! D0 fires a reset in 10 seconds...
339339
Serial.println(F("What... I'm not asleep?!?")); // it will never get here
340340
}
341341

tests/host/common/MockEsp.cpp

+6-14
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ bool EspClass::forcedModemSleep(uint32_t duration_us, void (*wakeupCb)())
100100
return true;
101101
}
102102

103-
void EspClass::forcedModemSleepOff()
104-
{
105-
}
103+
void EspClass::forcedModemSleepOff() { }
106104

107105
bool EspClass::forcedLightSleepBegin(uint32_t duration_us, void (*wakeupCb)())
108106
{
@@ -116,21 +114,15 @@ void EspClass::forcedLightSleepEnd(bool cancel)
116114
(void)cancel;
117115
}
118116

119-
void EspClass::autoModemSleep() {
120-
}
121-
122-
void EspClass::autoLightSleep() {
123-
}
117+
void EspClass::autoModemSleep() { }
124118

125-
void EspClass::autoSleepOff() {
126-
}
119+
void EspClass::autoLightSleep() { }
127120

128-
void EspClass::neverSleep() {
129-
}
121+
void EspClass::autoSleepOff() { }
130122

131-
void EspClass::neverSleepOff() {
132-
}
123+
void EspClass::neverSleep() { }
133124

125+
void EspClass::neverSleepOff() { }
134126

135127
void EspClass::restart()
136128
{

0 commit comments

Comments
 (0)