Fix IDF version check.

This commit is contained in:
h2zero
2022-02-06 12:58:26 -07:00
parent 2386a8a68a
commit 2e498cef2b
2 changed files with 6 additions and 5 deletions

View File

@@ -464,8 +464,8 @@ void NimBLEClient::updateConnParams(uint16_t minInterval, uint16_t maxInterval,
* @param [in] tx_octets The preferred number of payload octets to use (Range 0x001B-0x00FB).
*/
void NimBLEClient::setDataLen(uint16_t tx_octets) {
#if defined(CONFIG_NIMBLE_CPP_IDF) && defined(ESP_IDF_VERSION) && \
ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MINOR >= 3 && ESP_IDF_VERSION_PATCH >= 2
#if defined(CONFIG_NIMBLE_CPP_IDF) && !defined(ESP_IDF_VERSION) || \
(ESP_IDF_VERSION_MAJOR * 100 + ESP_IDF_VERSION_MINOR * 10 + ESP_IDF_VERSION_PATCH) < 432
return;
#else
uint16_t tx_time = (tx_octets + 14) * 8;