Skip to content

Commit d72f2bd

Browse files
sandeepmistrySidLeung
authored andcommitted
Correct | to &, and swap order of write vs write without response
1 parent 33df47d commit d72f2bd

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

libraries/CurieBLE/src/internal/BLECharacteristicImp.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -697,15 +697,7 @@ bool BLECharacteristicImp::write(const unsigned char value[],
697697
}
698698

699699
// Send write request
700-
if (_gatt_chrc.properties | BT_GATT_CHRC_WRITE_WITHOUT_RESP)
701-
{
702-
retval = bt_gatt_write_without_response(conn,
703-
_value_handle,
704-
value,
705-
length,
706-
false);
707-
}
708-
else if (_gatt_chrc.properties | BT_GATT_CHRC_WRITE)
700+
if (_gatt_chrc.properties & BT_GATT_CHRC_WRITE)
709701
{
710702
_gattc_writing = true;
711703
retval = bt_gatt_write(conn,
@@ -718,6 +710,13 @@ bool BLECharacteristicImp::write(const unsigned char value[],
718710
{
719711
delay(2);
720712
}
713+
} else if (_gatt_chrc.properties & BT_GATT_CHRC_WRITE_WITHOUT_RESP)
714+
{
715+
retval = bt_gatt_write_without_response(conn,
716+
_value_handle,
717+
value,
718+
length,
719+
false);
721720
}
722721
bt_conn_unref(conn);
723722
return (0 == retval);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy