Skip to content

Commit

Permalink
build break -- optional header doesn't exist
Browse files Browse the repository at this point in the history
Instead, use platformio_user.ini to allow users
to override these settings.
  • Loading branch information
henrygab committed Apr 25, 2022
1 parent 52a07ae commit f754202
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ESPixelStick/src/network/WiFiDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions platformio_user.ini.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f754202

Please sign in to comment.