Skip to content

Commit 830c4cc

Browse files
committed
Re-enable data length extension newer IDF versions.
1 parent ea6e210 commit 830c4cc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/NimBLEClient.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,8 @@ void NimBLEClient::updateConnParams(uint16_t minInterval, uint16_t maxInterval,
464464
* @param [in] tx_octets The preferred number of payload octets to use (Range 0x001B-0x00FB).
465465
*/
466466
void NimBLEClient::setDataLen(uint16_t tx_octets) {
467-
#ifdef CONFIG_NIMBLE_CPP_IDF // not yet available in IDF, Sept 9 2021
467+
#if defined(CONFIG_NIMBLE_CPP_IDF) && defined(ESP_IDF_VERSION) && \
468+
ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(4,3,2)
468469
return;
469470
#else
470471
uint16_t tx_time = (tx_octets + 14) * 8;

src/NimBLEServer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,8 @@ void NimBLEServer::updateConnParams(uint16_t conn_handle,
785785
* @param [in] tx_octets The preferred number of payload octets to use (Range 0x001B-0x00FB).
786786
*/
787787
void NimBLEServer::setDataLen(uint16_t conn_handle, uint16_t tx_octets) {
788-
#ifdef CONFIG_NIMBLE_CPP_IDF // not yet available in IDF, Sept 9 2021
788+
#if defined(CONFIG_NIMBLE_CPP_IDF) && defined(ESP_IDF_VERSION) && \
789+
ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(4,3,2)
789790
return;
790791
#else
791792
uint16_t tx_time = (tx_octets + 14) * 8;

0 commit comments

Comments
 (0)