forked from letscontrolit/ESPEasy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom define file (letscontrolit#807)
* Allows to use a Custom.h file to change defaults setting without changing the repo file * Custom.h example
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
.piolibdeps | ||
|
||
lib/readme.txt | ||
src/Custom.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
To modify the stock configuration without changing the EspEasy.ino file : | ||
1) rename this file to "Custom.h" (It is ignored by Git) | ||
2) define your own settings below | ||
3) define USE_CUSTOM_H as a build flags. ie : export PLATFORMIO_BUILD_FLAGS="'-DUSE_CUSTOM_H'" | ||
*/ | ||
|
||
|
||
|
||
// make the compiler show a warning to confirm that this file is inlcuded | ||
#warning "**** Using Settings from Custom.h File ***" | ||
|
||
/* | ||
####################################################################################################### | ||
Your Own Default Settings | ||
####################################################################################################### | ||
You can basically ovveride ALL macro defined in ESPEasy.ino. | ||
Don't forget to first #undef each existing #define that you add below. | ||
Here are some examples: | ||
*/ | ||
|
||
|
||
#undef DEFAULT_NAME | ||
#define DEFAULT_NAME "MyEspEasyDevice" // Enter your device friendly name | ||
|
||
#undef DEFAULT_SSID | ||
#define DEFAULT_SSID "MyHomeSSID" // Enter your network SSID | ||
|
||
#undef DEFAULT_KEY | ||
#define DEFAULT_KEY "MySuperSecretPassword" // Enter your network WPA key | ||
|
||
#undef DEFAULT_AP_KEY | ||
#define DEFAULT_AP_KEY "MyOwnConfigPassword" // Enter network WPA key for AP (config) mode | ||
|
||
#ifdef BUILD_GIT | ||
#undef BUILD_GIT | ||
#endif | ||
|
||
#define BUILD_GIT "MyBuildNum" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters