Skip to content

Commit

Permalink
Fix comments for AD types in advertising (#10512)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasw-mitutoyo-ctl authored Oct 23, 2024
1 parent 3502b9c commit cb83cda
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libraries/BLE/src/BLEAdvertising.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ void BLEAdvertisementData::setCompleteServices(BLEUUID uuid) {
switch (uuid.bitSize()) {
case 16:
{
// [Len] [0x02] [LL] [HH]
// [Len] [0x03] [LL] [HH]
cdata[0] = 3;
cdata[1] = ESP_BLE_AD_TYPE_16SRV_CMPL; // 0x03
addData(String(cdata, 2) + String((char *)&uuid.getNative()->uuid.uuid16, 2));
Expand All @@ -361,7 +361,7 @@ void BLEAdvertisementData::setCompleteServices(BLEUUID uuid) {

case 32:
{
// [Len] [0x04] [LL] [LL] [HH] [HH]
// [Len] [0x05] [LL] [LL] [HH] [HH]
cdata[0] = 5;
cdata[1] = ESP_BLE_AD_TYPE_32SRV_CMPL; // 0x05
addData(String(cdata, 2) + String((char *)&uuid.getNative()->uuid.uuid32, 4));
Expand All @@ -370,7 +370,7 @@ void BLEAdvertisementData::setCompleteServices(BLEUUID uuid) {

case 128:
{
// [Len] [0x04] [0] [1] ... [15]
// [Len] [0x07] [0] [1] ... [15]
cdata[0] = 17;
cdata[1] = ESP_BLE_AD_TYPE_128SRV_CMPL; // 0x07
addData(String(cdata, 2) + String((char *)uuid.getNative()->uuid.uuid128, 16));
Expand Down Expand Up @@ -453,7 +453,7 @@ void BLEAdvertisementData::setPartialServices(BLEUUID uuid) {

case 128:
{
// [Len] [0x04] [0] [1] ... [15]
// [Len] [0x06] [0] [1] ... [15]
cdata[0] = 17;
cdata[1] = ESP_BLE_AD_TYPE_128SRV_PART; // 0x06
addData(String(cdata, 2) + String((char *)&uuid.getNative()->uuid.uuid128, 16));
Expand Down

0 comments on commit cb83cda

Please sign in to comment.