Closed
Description
When doing libraries with project scope settings I usually do something like
config.h:
#pragma once
#if __has_include("userConfig.h")
#include "userConfig.h"
#else
#include "defaultConfig.h"
#endif
If the user want's to override the default settings he can copy defaultConfig.h
to the sketch folder and rename it to userConfig.h
. Settings will then be read from userConfig.h which works perfectly with platformIO and makefile builds.
However, looks like the Arduino builder doesn't include the sketch folder in the search path for include files, so this pattern doesn't work with the Arduino IDE.
Proposal: Include the sketch folder in the search path