Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
François Revol
firmware
Commits
3d5789af
Commit
3d5789af
authored
Jun 20, 2020
by
schneider
Browse files
fix(ble): Keep advertising in slected mode after connection closes
parent
e86c7b6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
epicardium/ble/ble_main.c
View file @
3d5789af
...
...
@@ -600,7 +600,11 @@ static void bleProcMsg(bleMsg_t *pMsg)
break
;
case
DM_ADV_START_IND
:
LOG_INFO
(
"ble"
,
"Advertisement started"
);
LOG_INFO
(
"ble"
,
"Advertisement started %u %u"
,
advertising_mode
,
advertising_mode_target
);
if
(
advertising_mode
!=
advertising_mode_target
)
{
AppAdvStop
();
}
break
;
case
DM_ADV_STOP_IND
:
...
...
@@ -648,6 +652,12 @@ static void bleProcMsg(bleMsg_t *pMsg)
pMsg
->
dm
.
connClose
.
reason
);
break
;
}
/* Stack overwrites advertising mode after connection close.
* Force our desired mode.
*/
advertising_mode
=
APP_MODE_NONE
;
AppAdvStop
();
bleClose
(
pMsg
);
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment