1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-21 23:18:13 +00:00

feat(common): add hold_ms to DebugLinkDecision

This commit is contained in:
Martin Milata 2021-01-19 16:16:03 +01:00
parent 854a256b5a
commit db2db8e6f3
3 changed files with 10 additions and 3 deletions

View File

@ -26,9 +26,10 @@ message DebugLinkDecision {
RIGHT = 3;
}
optional uint32 x = 4; // touch X coordinate
optional uint32 y = 5; // touch Y coordinate
optional bool wait = 6; // wait for layout change
optional uint32 x = 4; // touch X coordinate
optional uint32 y = 5; // touch Y coordinate
optional bool wait = 6; // wait for layout change
optional uint32 hold_ms = 7; // touch hold duration
}
/**

View File

@ -23,6 +23,7 @@ class DebugLinkDecision(p.MessageType):
x: int = None,
y: int = None,
wait: bool = None,
hold_ms: int = None,
) -> None:
self.yes_no = yes_no
self.swipe = swipe
@ -30,6 +31,7 @@ class DebugLinkDecision(p.MessageType):
self.x = x
self.y = y
self.wait = wait
self.hold_ms = hold_ms
@classmethod
def get_fields(cls) -> Dict:
@ -40,4 +42,5 @@ class DebugLinkDecision(p.MessageType):
4: ('x', p.UVarintType, None),
5: ('y', p.UVarintType, None),
6: ('wait', p.BoolType, None),
7: ('hold_ms', p.UVarintType, None),
}

View File

@ -23,6 +23,7 @@ class DebugLinkDecision(p.MessageType):
x: int = None,
y: int = None,
wait: bool = None,
hold_ms: int = None,
) -> None:
self.yes_no = yes_no
self.swipe = swipe
@ -30,6 +31,7 @@ class DebugLinkDecision(p.MessageType):
self.x = x
self.y = y
self.wait = wait
self.hold_ms = hold_ms
@classmethod
def get_fields(cls) -> Dict:
@ -40,4 +42,5 @@ class DebugLinkDecision(p.MessageType):
4: ('x', p.UVarintType, None),
5: ('y', p.UVarintType, None),
6: ('wait', p.BoolType, None),
7: ('hold_ms', p.UVarintType, None),
}