Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Commit

Permalink
Add offset parameter to ble_adapter.py read_req (#154)
Browse files Browse the repository at this point in the history
Co-authored-by: Bjørn Inge Hanssen <[email protected]>
  • Loading branch information
RyanLindemanCAE and bihanssen authored Feb 14, 2020
1 parent 9a21d9e commit 98b8a2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pc_ble_driver_py/ble_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,11 +468,11 @@ def write_exec(self, conn_handle):
result = self.evt_sync[conn_handle].wait(evt=BLEEvtID.gattc_evt_write_rsp)
return result["status"]

def read_req(self, conn_handle, uuid):
def read_req(self, conn_handle, uuid, offset=0):
handle = self.db_conns[conn_handle].get_char_value_handle(uuid)
if handle is None:
raise NordicSemiException("Characteristic value handler not found")
self.driver.ble_gattc_read(conn_handle, handle, 0)
self.driver.ble_gattc_read(conn_handle, handle, offset)
result = self.evt_sync[conn_handle].wait(evt=BLEEvtID.gattc_evt_read_rsp)
gatt_res = result["status"]
if gatt_res == BLEGattStatusCode.success:
Expand Down

0 comments on commit 98b8a2e

Please sign in to comment.