Skip to content

Commit 5046a36

Browse files
committed
drv/bluetooth_stm32_bluenrg: don't hard-code name size
We originally hard-coded the name size but now we can get the size from pbdrv_bluetooth_hub_name.
1 parent a1c3416 commit 5046a36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pbio/drv/bluetooth/bluetooth_stm32_bluenrg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ static PT_THREAD(hci_init(struct pt *pt)) {
11161116
// init GAP layer
11171117

11181118
PT_WAIT_WHILE(pt, write_xfer_size);
1119-
aci_gap_init_begin(GAP_PERIPHERAL_ROLE | GAP_CENTRAL_ROLE, PRIVACY_DISABLED, 16); // 16 comes from LEGO bootloader
1119+
aci_gap_init_begin(GAP_PERIPHERAL_ROLE | GAP_CENTRAL_ROLE, PRIVACY_DISABLED, sizeof(pbdrv_bluetooth_hub_name));
11201120
PT_WAIT_UNTIL(pt, hci_command_complete);
11211121
aci_gap_init_end(&gap_service_handle, &gap_dev_name_char_handle, &gap_appearance_char_handle);
11221122

0 commit comments

Comments
 (0)