Skip to content

Commit f425382

Browse files
committed
Ensure events are defined inNimBLEUtils::gapEventToString
1 parent 2ecfc40 commit f425382

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/NimBLEUtils.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,14 @@ const char* NimBLEUtils::gapEventToString(uint8_t eventType) {
509509
return "BLE_GAP_EVENT_AUTHORIZE";
510510
case BLE_GAP_EVENT_TEST_UPDATE: // 31
511511
return "BLE_GAP_EVENT_TEST_UPDATE";
512+
# ifdef BLE_GAP_EVENT_DATA_LEN_CHG
512513
case BLE_GAP_EVENT_DATA_LEN_CHG: // 32
513514
return "BLE_GAP_EVENT_DATA_LEN_CHG";
515+
# endif
516+
# ifdef BLE_GAP_EVENT_LINK_ESTAB
514517
case BLE_GAP_EVENT_LINK_ESTAB: // 33
515518
return "BLE_GAP_EVENT_LINK_ESTAB";
519+
# endif
516520
# endif
517521
default:
518522
NIMBLE_LOGD(LOG_TAG, "Unknown event type %d 0x%.2x", eventType, eventType);

0 commit comments

Comments
 (0)