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 !!!");
|
||||
#endif
|
||||
secretsFile.flush();
|
||||
secretsFile.print(
|
||||
"HERE\",\n\t\t\"network_password\":\"YOUR_WIFI_PASS_HERE\"\n\t}\n}");
|
||||
// Optional ESP32 Deep Sleep Mode
|
||||
#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.close();
|
||||
writeErrorToBootOut(
|
||||
|
|
@ -433,6 +440,9 @@ void Wippersnapper_FS::parseSecrets() {
|
|||
fsHalt();
|
||||
}
|
||||
|
||||
// Check for deep sleep mode
|
||||
enable_deep_sleep = doc["enable_deep_sleep"];
|
||||
|
||||
// clear the document and release all memory from the memory pool
|
||||
doc.clear();
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ public:
|
|||
const char *io_username =
|
||||
NULL; /*!< Adafruit IO username, 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
|
||||
otherwise. */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue