protocol: 0xec is simply the GATT selection for file transfers
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
c39c20ede2
commit
73bc782a53
|
@ -74,9 +74,9 @@ class Interactions(enum.Enum):
|
||||||
REGISTER_PRESS_BUTTON = enum.auto()
|
REGISTER_PRESS_BUTTON = enum.auto()
|
||||||
REGISTER_WAIT_FOR_BUTTON = enum.auto()
|
REGISTER_WAIT_FOR_BUTTON = enum.auto()
|
||||||
REGISTER_COMPLETE = enum.auto()
|
REGISTER_COMPLETE = enum.auto()
|
||||||
|
SET_FILE_TRANSFER_REPORTING_TYPE = enum.auto()
|
||||||
|
|
||||||
UNKNOWN_E3 = enum.auto()
|
UNKNOWN_E3 = enum.auto()
|
||||||
UNKNOWN_EC = enum.auto()
|
|
||||||
|
|
||||||
|
|
||||||
def as_hex_string(data):
|
def as_hex_string(data):
|
||||||
|
@ -806,8 +806,12 @@ class MsgUnknownE3Command(Msg):
|
||||||
# no arguments, uses the default 0xb3 handler
|
# no arguments, uses the default 0xb3 handler
|
||||||
|
|
||||||
|
|
||||||
class MsgUnknownECCommand(Msg):
|
class MsgSetFileTransferReportingType(Msg):
|
||||||
interaction = Interactions.UNKNOWN_EC
|
'''
|
||||||
|
Changes where the device needs to send the data to.
|
||||||
|
0x00 is on the FFEE0003 GATT.
|
||||||
|
'''
|
||||||
|
interaction = Interactions.SET_FILE_TRANSFER_REPORTING_TYPE
|
||||||
opcode = 0xec
|
opcode = 0xec
|
||||||
protocol = ProtocolVersion.ANY
|
protocol = ProtocolVersion.ANY
|
||||||
|
|
||||||
|
|
|
@ -720,8 +720,8 @@ class WacomProtocolBase(WacomProtocolLowLevelComm):
|
||||||
logger.info(f'dimensions: {msg.width}x{msg.height}')
|
logger.info(f'dimensions: {msg.width}x{msg.height}')
|
||||||
return msg.width, msg.height
|
return msg.width, msg.height
|
||||||
|
|
||||||
def ec_command(self):
|
def select_transfer_gatt(self):
|
||||||
self.p.execute(Interactions.UNKNOWN_EC)
|
self.p.execute(Interactions.SET_FILE_TRANSFER_REPORTING_TYPE)
|
||||||
|
|
||||||
def start_live(self, fd):
|
def start_live(self, fd):
|
||||||
self.p.execute(Interactions.SET_MODE, Mode.LIVE)
|
self.p.execute(Interactions.SET_MODE, Mode.LIVE)
|
||||||
|
@ -992,7 +992,7 @@ class WacomProtocolSlate(WacomProtocolSpark):
|
||||||
def register_device_finish(self):
|
def register_device_finish(self):
|
||||||
self.set_time()
|
self.set_time()
|
||||||
self.read_time()
|
self.read_time()
|
||||||
self.ec_command()
|
self.select_transfer_gatt()
|
||||||
self.get_name()
|
self.get_name()
|
||||||
|
|
||||||
w, h = self.get_dimensions()
|
w, h = self.get_dimensions()
|
||||||
|
@ -1016,7 +1016,7 @@ class WacomProtocolSlate(WacomProtocolSpark):
|
||||||
self.notify('dimensions')
|
self.notify('dimensions')
|
||||||
|
|
||||||
self.get_firmware_version()
|
self.get_firmware_version()
|
||||||
self.ec_command()
|
self.select_transfer_gatt()
|
||||||
if self.read_offline_data() == 0:
|
if self.read_offline_data() == 0:
|
||||||
logger.info('no data to retrieve')
|
logger.info('no data to retrieve')
|
||||||
except WacomEEAGAINException:
|
except WacomEEAGAINException:
|
||||||
|
|
Loading…
Reference in New Issue