From f7542023a73957b26989b57583636fe41b94896e Mon Sep 17 00:00:00 2001 From: Henry Gabryjelski Date: Mon, 25 Apr 2022 15:14:41 -0700 Subject: [PATCH] build break -- optional header doesn't exist Instead, use platformio_user.ini to allow users to override these settings. --- ESPixelStick/src/network/WiFiDriver.cpp | 10 ++++++---- platformio_user.ini.sample | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ESPixelStick/src/network/WiFiDriver.cpp b/ESPixelStick/src/network/WiFiDriver.cpp index a670aedf5..f5a9efc81 100644 --- a/ESPixelStick/src/network/WiFiDriver.cpp +++ b/ESPixelStick/src/network/WiFiDriver.cpp @@ -31,13 +31,15 @@ #include "../FileMgr.hpp" //----------------------------------------------------------------------------- -// Create secrets.h with a #define for SECRETS_SSID and SECRETS_PASS +// Use platformio_user.ini to define these values. +// Platformio_user.ini defines these in the [env] section. // or delete the #include and enter the strings directly below. -#include "secrets.h" -#ifndef SECRETS_SSID +#if !defined(SECRETS_SSID) # define SECRETS_SSID "DEFAULT_SSID_NOT_SET" +#endif // SECRETS_SSID +#if !defined(SECRETS_PASS) # define SECRETS_PASS "DEFAULT_PASSPHRASE_NOT_SET" -#endif // ndef SECRETS_SSID +#endif // SECRETS_SSID /* Fallback configuration if config.json is empty or fails */ const String default_ssid = SECRETS_SSID; diff --git a/platformio_user.ini.sample b/platformio_user.ini.sample index b1551e720..a6d7d5f4f 100644 --- a/platformio_user.ini.sample +++ b/platformio_user.ini.sample @@ -30,6 +30,9 @@ ;build_type = debug ;monitor_port = COM3 ;upload_port = COM3 +;build_flags = +; -D SECRETS_SSID="DEFAULT_SSID_NOT_SET" +; -D SECRETS_PASS="DEFAULT_PASSPHRASE_NOT_SET" ;[esp8266] ;monitor_port = COM4