OpenBK7231T_App icon indicating copy to clipboard operation
OpenBK7231T_App copied to clipboard

Add all defines "ENABLE_XY" to "about" page

Open MaxineMuster opened this issue 2 months ago • 1 comments

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
...
;

Bildschirmfoto vom 2025-10-22 20-43-48 Bildschirmfoto vom 2025-10-22 20-39-21 Bildschirmfoto vom 2025-10-22 20-39-02

MaxineMuster avatar Oct 22 '25 18:10 MaxineMuster

hey that's handy image

divadiow avatar Oct 23 '25 15:10 divadiow