Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
d1134fd4
Commit
d1134fd4
authored
Jul 10, 2019
by
chegewara
Committed by
Me No Dev
Jul 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue with semaphores (#2974)
parent
d5fdd715
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
5 deletions
+3
-5
libraries/BLE/src/BLEClient.cpp
libraries/BLE/src/BLEClient.cpp
+2
-1
libraries/BLE/src/BLERemoteCharacteristic.cpp
libraries/BLE/src/BLERemoteCharacteristic.cpp
+1
-2
libraries/BLE/src/BLERemoteDescriptor.cpp
libraries/BLE/src/BLERemoteDescriptor.cpp
+0
-2
No files found.
libraries/BLE/src/BLEClient.cpp
View file @
d1134fd4
...
...
@@ -184,10 +184,11 @@ void BLEClient::gattClientEventHandler(
if
(
m_pClientCallbacks
!=
nullptr
)
{
m_pClientCallbacks
->
onDisconnect
(
this
);
}
BLEDevice
::
removePeerDevice
(
m_appId
,
true
);
esp_ble_gattc_app_unregister
(
m_gattc_if
);
m_semaphoreOpenEvt
.
give
(
ESP_GATT_IF_NONE
);
m_semaphoreRssiCmplEvt
.
give
();
m_semaphoreSearchCmplEvt
.
give
(
1
);
BLEDevice
::
removePeerDevice
(
m_appId
,
true
);
break
;
}
// ESP_GATTC_DISCONNECT_EVT
...
...
libraries/BLE/src/BLERemoteCharacteristic.cpp
View file @
d1134fd4
...
...
@@ -400,7 +400,6 @@ std::string BLERemoteCharacteristic::readValue() {
// Check to see that we are connected.
if
(
!
getRemoteService
()
->
getClient
()
->
isConnected
())
{
log_e
(
"Disconnected"
);
// throw BLEDisconnectedException(); TODO:: think about error reporting mechanism
return
std
::
string
();
}
...
...
@@ -552,7 +551,7 @@ void BLERemoteCharacteristic::writeValue(uint8_t* data, size_t length, bool resp
// Check to see that we are connected.
if
(
!
getRemoteService
()
->
getClient
()
->
isConnected
())
{
log_e
(
"Disconnected"
);
// throw BLEDisconnectedException()
;
return
;
}
m_semaphoreWriteCharEvt
.
take
(
"writeValue"
);
...
...
libraries/BLE/src/BLERemoteDescriptor.cpp
View file @
d1134fd4
...
...
@@ -55,7 +55,6 @@ std::string BLERemoteDescriptor::readValue() {
// Check to see that we are connected.
if
(
!
getRemoteCharacteristic
()
->
getRemoteService
()
->
getClient
()
->
isConnected
())
{
log_e
(
"Disconnected"
);
// throw BLEDisconnectedException(); TODO:: think about error reporting mechanism
return
std
::
string
();
}
...
...
@@ -134,7 +133,6 @@ void BLERemoteDescriptor::writeValue(uint8_t* data, size_t length, bool response
// Check to see that we are connected.
if
(
!
getRemoteCharacteristic
()
->
getRemoteService
()
->
getClient
()
->
isConnected
())
{
log_e
(
"Disconnected"
);
// throw BLEDisconnectedException(); TODO:: think about error reporting mechanism
return
;
}
...
...
Write
Preview
Markdown
is supported
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