From bcbb0982c8e24f35024e8cb481c81ef60a8849e9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 2 Aug 2019 15:49:10 +1000 Subject: [PATCH] wacom: drop our NordicData, use the one from the protocol Same thing anyway, this is just namespace handling Signed-off-by: Peter Hutterer --- tuhi/wacom.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/tuhi/wacom.py b/tuhi/wacom.py index 0d4bc7a..31ff6d7 100644 --- a/tuhi/wacom.py +++ b/tuhi/wacom.py @@ -25,6 +25,7 @@ import errno from gi.repository import GObject from .drawing import Drawing from .uhid import UHIDDevice +from tuhi.protocol import NordicData logger = logging.getLogger('tuhi.wacom') @@ -268,19 +269,6 @@ class DataLogger(object): self.logfile.write(f' source: {source}') -class NordicData(list): - '''A set of bytes as expected by the Nordic controller on the device. - First byte is the opcode, second byte is the length, rest is data. - - This is an abstraction of a list. Instantiate with the full raw data, - the list contents will just be the data bytes. - ''' - def __init__(self, bs): - super().__init__(bs[2:]) - self.opcode = bs[0] - self.length = bs[1] - - class WacomException(Exception): errno = errno.ENOSYS