wacom: time_to_bytes is obsolete now

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
pull/153/head
Peter Hutterer 2019-08-13 12:37:08 +10:00
parent 1ea89d2f09
commit c014393adb
1 changed files with 0 additions and 9 deletions

View File

@ -677,11 +677,6 @@ class WacomProtocolBase(WacomProtocolLowLevelComm):
def e3_command(self):
self.p.execute(Interactions.UNKNOWN_E3)
def time_to_bytes(self):
# Device time is UTC
current_time = time.strftime('%y%m%d%H%M%S', time.gmtime())
return [int(i) for i in binascii.unhexlify(current_time)]
@classmethod
def time_from_bytes(self, data):
assert len(data) >= 6
@ -1063,10 +1058,6 @@ class WacomProtocolIntuosPro(WacomProtocolSlate):
assert(protocol_version >= ProtocolVersion.INTUOS_PRO)
super().__init__(device, uuid, protocol_version=protocol_version)
def time_to_bytes(self):
t = int(time.time())
return list(t.to_bytes(length=4, byteorder='little')) + [0x00, 0x00]
@classmethod
def time_from_bytes(self, data):
seconds = int.from_bytes(data[0:4], byteorder='little')