Closed shaffenmeister closed 9 months ago
Hmmm, I would have thought
in fdrs_globals.h
#define GLOBAL_DBG_LEVEL 0
in fdrs_debug.h
#ifndef DBG_LEVEL
#define DBG_LEVEL GLOBAL_DBG_LEVEL
#endif
Should have taken care of that but maybe there's an issue with the order of the files. I'll have to check this out again.
"error: 'GLOBAL_DBG_LEVEL' was not declared in this scope>" means that maybe GLOBAL_DBG_LEVEL is not yet defined or not defined at all before fdrs_debug is compiled.
Thanks so much for reporting this and for all of that information that you provided.
@shaffenmeister, I cannot reproduce the issue. Can you check your src fdrs_globals.h line 9 and see if it says:
#define GLOBAL_DBG_LEVEL 0
and then fdrs_debug.h line 1-3 and see if they say:
#ifndef DBG_LEVEL
#define DBG_LEVEL GLOBAL_DBG_LEVEL
#endif
Thanks!
@aviateur17 Yes, cross-checked both files again and they are ok. I am using the current commit as given above. Will dive a bit deeper and come back.
Thank you!
@shaffenmeister, if you feel comfortable, you can direct me to your github repo with the code or paste a zip file attachment with the entire code. Maybe email me directly, I don't know if that's possible through GitHub.
@aviateur17 , stupid me.
I checked my code over and again and just now found the issue in a local library for my system, where I used #define __FDRS_GLOBALS_h__
instead of my library-local define.
My bad. Owe you a coffee, or two.
Nevermind and sorry and thank you...
Observation
When compiling FDRS projects using platformio, the compilation fails when DEBUG_FDRS is defined in fdrs_gateway_config.h without defining DBG_LEVEL as introduced with #194 .
Same applies to nodes / controllers (fdrs_node_config.h etc.).
Compilation passes:
Environment
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/lolin32.html PLATFORM: Espressif 32 (2024.1.1) > WEMOS LOLIN32 HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash PACKAGES:
FDRS commit a0a4fa396d0b9b360168a0a94366a2349f993993 (latest as of 12.02.2024)
Error message
Files
platformio.ini.txt fdrs_node_config.h.txt