This commit is contained in:
hathach committed 2017-03-30 16:38:46 +07:00
1 parent 3c0f3e84f1
commit a3cd4104b2
4 files changed
+8 -8

No files matched your search

+3 -3
View File
@@ -40,7 +40,7 @@
BLEGatt::BLEGatt(void)
{
_chars_count = 0;
for(uint8_t i=0; i<BLE_MAX_CHARS; i++) _chars_list[i] = NULL;
for(uint8_t i=0; i<BLE_GATT_MAX_SERVER_CHARS; i++) _chars_list[i] = NULL;
}
@@ -53,9 +53,9 @@ void BLEGatt::_eventHandler(ble_evt_t* evt)
}
bool BLEGatt::_registerCharacteristic(BLECharacteristic* chars)
bool BLEGatt::_addCharacteristic(BLECharacteristic* chars)
{
if ( _chars_count == BLE_MAX_CHARS ) return false;
if ( _chars_count == BLE_GATT_MAX_SERVER_CHARS ) return false;
_chars_list[ _chars_count++ ] = chars;
return true;