diff --git a/src/config.h b/src/config.h index e23e12d..0444adf 100644 --- a/src/config.h +++ b/src/config.h @@ -3,7 +3,7 @@ // Uncomment to switch to AP mode. // Leave commented for wifi station mode. -// #define B_WIFI_AP +#define B_WIFI_AP // DAC #define I2S_DOUT 32 diff --git a/src/creds.dist.h b/src/creds.dist.h index 5e0110d..fc15479 100644 --- a/src/creds.dist.h +++ b/src/creds.dist.h @@ -1,4 +1,5 @@ // Copy to creds.h or creds_ap.h and edit +// If both, use different define guards #ifndef __CREDS_H__ #define __CREDS_H__ const char *ssid = "buzzer"; diff --git a/src/setup.cpp b/src/setup.cpp index 684af36..a3178d9 100644 --- a/src/setup.cpp +++ b/src/setup.cpp @@ -3,13 +3,15 @@ #include #include +// config.h must come before creds loading +// because it sets B_WIFI_AP +#include "config.h" #ifdef B_WIFI_AP #include "creds_ap.h" #else #include "creds.h" #endif -#include "config.h" #include "utils.h" #include "webHandlers.h"