From 700650eb3a7d35cf731236bbb22b146b63e99d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Tue, 30 Jan 2018 11:41:04 +0100 Subject: [PATCH] Example on how to set USE_CUSTOM_H for Arduino IDE (#484) --- code/espurna/config/all.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/code/espurna/config/all.h b/code/espurna/config/all.h index 3834ba3c..dfa31e3f 100644 --- a/code/espurna/config/all.h +++ b/code/espurna/config/all.h @@ -1,13 +1,24 @@ /* + If you want to modify the stock configuration but you don't want to touch - the repo files you can either define USE_CUSTOM_H or remove the - "#ifdef USE_CUSTOM_H" & "#endif" lines and add a "custom.h" - file to this same folder. + the repo files you can define USE_CUSTOM_H in your build settings. + + Arduino IDE: + define it in your boards.txt for the board of your choice. + For instance, for the "Generic ESP8266 Module" with prefix "generic" just add: + + generic.build.extra_flags=-DESP8266 -DUSE_CUSTOM_H + + PlatformIO: + add the setting to your environment or just define global PLATFORMIO_BUILD_FLAGS + + export PLATFORMIO_BUILD_FLAGS="'-DUSE_CUSTOM_H'" + Check https://github.com/xoseperez/espurna/issues/104 for an example on how to use this file. - (Define USE_CUSTOM_H on commandline for platformio: - export PLATFORMIO_BUILD_FLAGS="'-DUSE_CUSTOM_H'" ) + */ + #ifdef USE_CUSTOM_H #include "custom.h" #endif