wacom: drop our NordicData, use the one from the protocol

Same thing anyway, this is just namespace handling

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
pull/153/head
Peter Hutterer 2019-08-02 15:49:10 +10:00
parent a817d10cc7
commit bcbb0982c8
1 changed files with 1 additions and 13 deletions

View File

@ -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