OpenBK7231T_App
OpenBK7231T_App copied to clipboard
Add all defines "ENABLE_XY" to "about" page
I sometimes wonder, what defines I used during build of a firmware.
This PR will show the "ENABLE_XY" defines set during build of this firmware on the "About" page.
It parses "obk_config.h" to find all possible "#defines" and generates a simple header file which will only contain a string, containing all the defines set.
If you would like to test, use artifacts from initial commit or change obk_config.h to include #define ENABLE_INCLUDE_BUILD_DEFINES 1
The header file will look like this, so "platformdefines" will contain all the drivers ... defined during build process :
#pragma once
#define tstr(x) #x
#define str(x) tstr(x)
#include "obk_config.h"
char platformdefines[]=""
#ifdef OBK_VARIANT
"OBK_VARIANT=" str(OBK_VARIANT) "<br>\n"
#endif
#ifdef ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY
"ADVANCED_CHANNELTYPES_DISCOVERY<br>\n"
#endif
#ifdef ENABLE_DRIVER_BL0942
"DRIVER_BL0942<br>\n"
#endif
#ifdef ENABLE_SEND_POSTANDGET
"SEND_POSTANDGET<br>\n"
#endif
#ifdef ENABLE_DRIVER_HUE
"DRIVER_HUE<br>\n"
#endif
#ifdef ENABLE_DRIVER_CSE7766
"DRIVER_CSE7766<br>\n"
#endif
#ifdef ENABLE_DRIVER_FREEZE
"DRIVER_FREEZE<br>\n"
#endif
#ifdef ENABLE_DRIVER_TEXTSCROLLER
"DRIVER_TEXTSCROLLER<br>\n"
#endif
...
;
hey that's handy