summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorPete Johanson <peter@peterjohanson.com>2020-10-16 00:56:05 -0400
committerPete Johanson <peter@peterjohanson.com>2020-10-16 00:56:05 -0400
commitb07475b7d475a592ad974bb36a5580b1c863344f (patch)
tree69607f6b799a7e16b49aaf148d14325162ca370d /app/src
parent818f0a1f91020f3315ae09f70ddda6f8362fab98 (diff)
fix(bluetooth): Stop adv on connected profile.
Diffstat (limited to 'app/src')
-rw-r--r--app/src/ble.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/src/ble.c b/app/src/ble.c
index ddc92e9..1b25ca2 100644
--- a/app/src/ble.c
+++ b/app/src/ble.c
@@ -176,6 +176,10 @@ int update_advertising() {
LOG_DBG("advertising from %d to %d", advertising_status, desired_adv);
switch (desired_adv + CURR_ADV(advertising_status)) {
+ case ZMK_ADV_NONE + CURR_ADV(ZMK_ADV_DIR):
+ case ZMK_ADV_NONE + CURR_ADV(ZMK_ADV_CONN):
+ CHECKED_ADV_STOP();
+ break;
case ZMK_ADV_DIR + CURR_ADV(ZMK_ADV_DIR):
case ZMK_ADV_DIR + CURR_ADV(ZMK_ADV_CONN):
CHECKED_ADV_STOP();