Ensure events are defined inNimBLEUtils::gapEventToString

This commit is contained in:
h2zero 2024-11-18 08:11:44 -07:00
parent 7bd7b1dfc2
commit a6e75b3537

View file

@ -509,10 +509,14 @@ const char* NimBLEUtils::gapEventToString(uint8_t eventType) {
return "BLE_GAP_EVENT_AUTHORIZE"; return "BLE_GAP_EVENT_AUTHORIZE";
case BLE_GAP_EVENT_TEST_UPDATE: // 31 case BLE_GAP_EVENT_TEST_UPDATE: // 31
return "BLE_GAP_EVENT_TEST_UPDATE"; return "BLE_GAP_EVENT_TEST_UPDATE";
# ifdef BLE_GAP_EVENT_DATA_LEN_CHG
case BLE_GAP_EVENT_DATA_LEN_CHG: // 32 case BLE_GAP_EVENT_DATA_LEN_CHG: // 32
return "BLE_GAP_EVENT_DATA_LEN_CHG"; return "BLE_GAP_EVENT_DATA_LEN_CHG";
# endif
# ifdef BLE_GAP_EVENT_LINK_ESTAB
case BLE_GAP_EVENT_LINK_ESTAB: // 33 case BLE_GAP_EVENT_LINK_ESTAB: // 33
return "BLE_GAP_EVENT_LINK_ESTAB"; return "BLE_GAP_EVENT_LINK_ESTAB";
# endif
# endif # endif
default: default:
NIMBLE_LOGD(LOG_TAG, "Unknown event type %d 0x%.2x", eventType, eventType); NIMBLE_LOGD(LOG_TAG, "Unknown event type %d 0x%.2x", eventType, eventType);