espressif / esp-now

A connectionless Wi-Fi communication protocol
Apache License 2.0
486 stars 91 forks source link

Compilation error if SPIRAM is enabled in master branch (AEGHB-60) #55

Closed Mr-Techtron closed 1 year ago

Mr-Techtron commented 1 year ago

If I enable the SPIRAM in the configuration, there is the compilation error reporting that "CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM" is undeclared, since the WiFi configuration use the static tx buffer. I am using release/v4.4 of ESP-IDF.

wujiangang commented 1 year ago

@Mr-Techtron Thanks for your report. Please update line https://github.com/espressif/esp-now/blob/master/src/espnow/src/espnow.c#L51 with

#if CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM
#define MAX_BUFFERED_NUM              (CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM / 2)     /* Not more than CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM */
#elif CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM
#define MAX_BUFFERED_NUM              (CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM / 2)     /* Not more than CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM */
#endif

A fix will be soon in the master branch.

Mr-Techtron commented 1 year ago

@wujiangang Thank you. I have already done that.