Closed vortex314 closed 1 year ago
@vortex314 Can you tell me how to show the issue? I added it via idf.py add-dependency "espressif/esp-now^2.1.1"
based on the espnow example in 5.0.0 and 5.0.1, and modify the code as the attachment, it's fine.
espnow_compile.zip
I copied the component from managed components to my own components and changed the order of fields in : I moved 'qsize=32' , 2 lines earlier and then it compiles. But I notice also that the esp_now api is quiet different between the main program and the component I installed. Not sure what version mixing has been happening. I'll have to retry from scratch.
Maybe the difference is that I compile from C++ and the example is C based. Has ESP-NOW been tested with C++ ? Maybe C++ is more order sensitive than C in that sense.
Looks highly related to this : https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/cplusplus.html#designated-initializers
@vortex314 It doesn't test with C++, could you provide your example code?
@lhespress you can find the source here : https://github.com/vortex314/esp-now-bridge/blob/main/main/main.cpp I solved it by creating myself the ESPNOW_INIT_CONFIG_DEFAULT initialization structure in a C++ compliant way.
@vortex314 Thanks for your feedback, i have reproduce the issue as your source.
Got compiler errors :
Changing the order correctly in the below include works.