This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new 8da39bc4 apps/bttester: fix start_direct_adv command
8da39bc4 is described below
commit 8da39bc40e6c900f51b7153fc4e3a679a62326bb
Author: Krzysztof Kopyściński <[email protected]>
AuthorDate: Mon Jul 31 14:07:12 2023 +0200
apps/bttester: fix start_direct_adv command
high_duty_cycle is defined in flags field that is 2 octet long, as first
bit.
---
apps/bttester/src/btp/btp_gap.h | 2 +-
apps/bttester/src/btp_gap.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/bttester/src/btp/btp_gap.h b/apps/bttester/src/btp/btp_gap.h
index 5e3e1b83..93b62c48 100644
--- a/apps/bttester/src/btp/btp_gap.h
+++ b/apps/bttester/src/btp/btp_gap.h
@@ -212,7 +212,7 @@ struct btp_gap_passkey_confirm_cmd {
#define BTP_GAP_START_DIRECT_ADV 0x15
struct btp_gap_start_direct_adv_cmd {
ble_addr_t address;
- uint8_t high_duty;
+ uint16_t options;
} __packed;
#define BTP_GAP_CONN_PARAM_UPDATE 0x16
diff --git a/apps/bttester/src/btp_gap.c b/apps/bttester/src/btp_gap.c
index ebd07631..e0d43a43 100644
--- a/apps/bttester/src/btp_gap.c
+++ b/apps/bttester/src/btp_gap.c
@@ -1577,7 +1577,7 @@ start_direct_adv(const void *cmd, uint16_t cmd_len,
SYS_LOG_DBG("");
- adv_params.high_duty_cycle = cp->high_duty;
+ adv_params.high_duty_cycle = cp->options & BIT(1);
err = ble_gap_adv_start(own_addr_type, &cp->address,
BLE_HS_FOREVER, &adv_params,