Skip to content

Commit

Permalink
fixup! remove the implicit space and put L in the device name
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisandreae committed Feb 15, 2023
1 parent 5575865 commit 10748bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/boards/arm/glove80/glove80_lh_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CONFIG_USB_DEVICE_VID=0x16c0
CONFIG_USB_DEVICE_MANUFACTURER="MoErgo"
CONFIG_USB_DEVICE_SN="moergo.com:GLV80-0123456789ABCDEF"

CONFIG_BT_DEVICE_NAME="Glove80"
CONFIG_BT_DEVICE_NAME="Glove80 L"
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_APPEND_SN=y
CONFIG_BT_DEVICE_NAME_SN_BYTES=6
Expand Down
5 changes: 2 additions & 3 deletions app/src/ble.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,15 @@ static uint8_t active_profile;

#if IS_ENABLED(CONFIG_BT_DEVICE_NAME_APPEND_SN)

static char bt_device_name[sizeof(CONFIG_BT_DEVICE_NAME) + CONFIG_BT_DEVICE_NAME_SN_BYTES + 1];
static char bt_device_name[sizeof(CONFIG_BT_DEVICE_NAME) + CONFIG_BT_DEVICE_NAME_SN_BYTES];

void fill_serial_number(char *buf, int length);

// configure the BT device name by appending a serial number prefix to
// CONFIG_BT_DEVICE_NAME
void init_bt_device_name() {
strncpy(bt_device_name, CONFIG_BT_DEVICE_NAME, sizeof(bt_device_name));
bt_device_name[sizeof(CONFIG_BT_DEVICE_NAME) - 1] = ' ';
fill_serial_number(bt_device_name + sizeof(CONFIG_BT_DEVICE_NAME),
fill_serial_number(bt_device_name + sizeof(CONFIG_BT_DEVICE_NAME) - 1,
CONFIG_BT_DEVICE_NAME_SN_BYTES);
bt_device_name[sizeof(bt_device_name) - 1] = '\0';
}
Expand Down

0 comments on commit 10748bc

Please sign in to comment.