To day I tried compiling a sketch using electricui-embedded 0.8.0 (installed via Arduino IDE).
The target is Seeduino XIAO ESP32.
The IDE tries to compile with this line (using g++) :
AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-rv32\\2302/bin/riscv32-esp-elf-g++" -MMD -c
I get the following error when using the macros for setting up the tracked variables
libraries\electricui-embedded\src/eui_macro.h:49:105: error: either all initializer clauses should be designated or none of them should be
49 | #define EUI_CUSTOM_RO( ID, DATA ) { .id = ID, .type = TYPE_CUSTOM|READ_ONLY_MASK, .size = sizeof(DATA), {.data = &DATA} }
The error is pretty self-explanatory : I manually added the .ptr= name in front of all {.data = &DATA} in eui_macro.h, and it compiled successfully.
Maybe you can consider adding this change to the next release to have more compatibility with C++ compilers ?
To day I tried compiling a sketch using electricui-embedded 0.8.0 (installed via Arduino IDE).
The target is Seeduino XIAO ESP32.
The IDE tries to compile with this line (using g++) :
AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-rv32\\2302/bin/riscv32-esp-elf-g++" -MMD -cI get the following error when using the macros for setting up the tracked variables
libraries\electricui-embedded\src/eui_macro.h:49:105: error: either all initializer clauses should be designated or none of them should be49 | #define EUI_CUSTOM_RO( ID, DATA ) { .id = ID, .type = TYPE_CUSTOM|READ_ONLY_MASK, .size = sizeof(DATA), {.data = &DATA} }The error is pretty self-explanatory : I manually added the
.ptr=name in front of all{.data = &DATA}in eui_macro.h, and it compiled successfully.Maybe you can consider adding this change to the next release to have more compatibility with C++ compilers ?