Adding variable length attributes to Maxim Feather

pull/10072/head
Nick 2019-03-12 18:49:45 -04:00
parent 401a3c8551
commit e08b200eef
1 changed files with 6 additions and 0 deletions

View File

@ -146,6 +146,12 @@ ble_error_t MaximGattServer::addService_(GattService &service)
currAtt->pLen = p_char->getValueAttribute().getLengthPtr();
currAtt->maxLen = p_char->getValueAttribute().getMaxLength();
currAtt->settings = ATTS_SET_WRITE_CBACK | ATTS_SET_READ_CBACK;
if(p_char->getValueAttribute().hasVariableLength())
{
currAtt->settings |= ATTS_SET_VARIABLE_LEN;
}
if (p_char->getValueAttribute().getUUID().shortOrLong() == UUID::UUID_TYPE_LONG) {
currAtt->settings |= ATTS_SET_UUID_128;
}