From 98b8a2eec91106c3475cd93b47a4f2ebbc3c9704 Mon Sep 17 00:00:00 2001 From: Ryan Lindeman Date: Fri, 14 Feb 2020 06:49:25 -0700 Subject: [PATCH] Add offset parameter to ble_adapter.py read_req (#154) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bjørn Inge Hanssen --- pc_ble_driver_py/ble_adapter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pc_ble_driver_py/ble_adapter.py b/pc_ble_driver_py/ble_adapter.py index 0b06f976..164d593a 100644 --- a/pc_ble_driver_py/ble_adapter.py +++ b/pc_ble_driver_py/ble_adapter.py @@ -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: