wacom: add support for a set_name on the Spark

Part of #82
pull/70/head
Peter Hutterer 2018-02-13 10:32:19 +10:00 committed by Benjamin Tissoires
parent 590de68269
commit 7ff760dcbf
1 changed files with 9 additions and 0 deletions

View File

@ -588,6 +588,15 @@ class WacomProtocolBase(WacomProtocolLowLevelComm):
transaction_count += 1
return transaction_count
def set_name(self, name):
# On the Spark, the name needs a trailing linebreak, otherwise the
# firmware gets confused.
args = [ord(c) for c in name] + [0x0a]
data = self.send_nordic_command_sync(command=0xbb,
arguments=args,
expected_opcode=0xb3)
return bytes(data)
def register_device_finish(self):
self.send_nordic_command_sync(command=0xe5,
arguments=None,