We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c383f6 commit b0ff23bCopy full SHA for b0ff23b
micropython/bluetooth/aioble/aioble/server.py
@@ -83,11 +83,15 @@ def read(self):
83
return ble.gatts_read(self._value_handle)
84
85
# Write value to local db.
86
- def write(self, data):
+ def write(self, data, send_update=False):
87
if self._value_handle is None:
88
self._initial = data
89
else:
90
- ble.gatts_write(self._value_handle, data)
+ if send_update:
91
+ # Send_update arg only added in 1.17, don't pass this arg unless required.
92
+ ble.gatts_write(self._value_handle, data, True)
93
+ else:
94
+ ble.gatts_write(self._value_handle, data)
95
96
# Wait for a write on this characteristic.
97
# Returns the device that did the write.
0 commit comments