Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

Commit b544322

Browse files
committed
optimized #include directive
1 parent 983a21d commit b544322

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/esp8266-google-home-notifier.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ boolean GoogleHomeNotifier::device(const char * name, const char * locale, int t
2020
uint64_t chipid;
2121
#ifdef ARDUINO_ARCH_ESP8266
2222
chipid = ESP.getChipId();
23-
#endif
24-
#ifdef ARDUINO_ARCH_ESP32
23+
#elif defined ARDUINO_ARCH_ESP32
2524
chipid = ESP.getEfuseMac();
25+
#else
26+
#error "ARDUINO_ARCH_ESP8266 or ARDUINO_ARCH_ESP32 has to be defined."
2627
#endif
2728
sprintf(hostString, "ESP_%06X", chipid);
2829

src/esp8266-google-home-notifier.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
#ifdef ARDUINO_ARCH_ESP8266
1212
#include <ESP8266mDNS.h>
13-
#endif
14-
15-
#ifdef ARDUINO_ARCH_ESP32
13+
#elif defined ARDUINO_ARCH_ESP32
1614
#include <ESPmDNS.h>
15+
#else
16+
#error "ARDUINO_ARCH_ESP8266 or ARDUINO_ARCH_ESP32 has to be defined."
1717
#endif
1818

1919
#include <google-tts.h>

0 commit comments

Comments
 (0)