Compare commits
3 commits
main
...
enable-dee
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0a404e699 | ||
|
|
a1c3f10e51 | ||
|
|
df2972816d |
2 changed files with 13 additions and 2 deletions
|
|
@ -287,8 +287,15 @@ void Wippersnapper_FS::createConfigFileSkel() {
|
||||||
secretsFile.println("!!! ERROR: undefined board !!!");
|
secretsFile.println("!!! ERROR: undefined board !!!");
|
||||||
#endif
|
#endif
|
||||||
secretsFile.flush();
|
secretsFile.flush();
|
||||||
secretsFile.print(
|
// Optional ESP32 Deep Sleep Mode
|
||||||
"HERE\",\n\t\t\"network_password\":\"YOUR_WIFI_PASS_HERE\"\n\t}\n}");
|
#if defined(ARDUINO_MAGTAG29_ESP32S2) || defined(ARDUINO_METRO_ESP32S2) || \
|
||||||
|
defined(ARDUINO_FUNHOUSE_ESP32S2) || defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
|
||||||
|
secretsFile.print("HERE\",\n\t\t\"network_password\":\"YOUR_WIFI_PASS_HERE\"\n\t},");
|
||||||
|
secretsFile.flush();
|
||||||
|
secretsFile.print("\n\t\"enable_deep_sleep\":false\n}");
|
||||||
|
#else
|
||||||
|
secretsFile.print("HERE\",\n\t\t\"network_password\":\"YOUR_WIFI_PASS_HERE\"\n\t}\n}");
|
||||||
|
#endif
|
||||||
secretsFile.flush();
|
secretsFile.flush();
|
||||||
secretsFile.close();
|
secretsFile.close();
|
||||||
writeErrorToBootOut(
|
writeErrorToBootOut(
|
||||||
|
|
@ -433,6 +440,9 @@ void Wippersnapper_FS::parseSecrets() {
|
||||||
fsHalt();
|
fsHalt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check for deep sleep mode
|
||||||
|
enable_deep_sleep = doc["enable_deep_sleep"];
|
||||||
|
|
||||||
// clear the document and release all memory from the memory pool
|
// clear the document and release all memory from the memory pool
|
||||||
doc.clear();
|
doc.clear();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ public:
|
||||||
const char *io_username =
|
const char *io_username =
|
||||||
NULL; /*!< Adafruit IO username, from config json. */
|
NULL; /*!< Adafruit IO username, from config json. */
|
||||||
const char *io_key = NULL; /*!< Adafruit IO password, from config json. */
|
const char *io_key = NULL; /*!< Adafruit IO password, from config json. */
|
||||||
|
bool enable_deep_sleep = false; /*!< Option to enable ESP32/S2 deep sleep mode, from config json. */
|
||||||
bool setNetwork; /*!< True if a network interface type was set up, False
|
bool setNetwork; /*!< True if a network interface type was set up, False
|
||||||
otherwise. */
|
otherwise. */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue