TR-common/protob: add DebugPhysicalButton

grdddj/debuglink_improvements
grdddj 1 year ago
parent 1f5a0a0df6
commit e3570f7d6d

@ -39,10 +39,21 @@ message DebugLinkDecision {
INFO = 2;
}
/**
* Structure representing model R button presses
*/
// TODO: probably delete the middle_btn as it is not a physical one
enum DebugPhysicalButton {
LEFT_BTN = 0;
MIDDLE_BTN = 1;
RIGHT_BTN = 2;
}
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
optional DebugPhysicalButton physical_button = 8; // physical button press
}
/**

@ -99,6 +99,8 @@ trezor.enums.Capability
import trezor.enums.Capability
trezor.enums.DebugButton
import trezor.enums.DebugButton
trezor.enums.DebugPhysicalButton
import trezor.enums.DebugPhysicalButton
trezor.enums.DebugSwipeDirection
import trezor.enums.DebugSwipeDirection
trezor.enums.DecredStakingSpendType

@ -0,0 +1,7 @@
# Automatically generated by pb2py
# fmt: off
# isort:skip_file
LEFT_BTN = 0
MIDDLE_BTN = 1
RIGHT_BTN = 2

@ -455,6 +455,11 @@ if TYPE_CHECKING:
YES = 1
INFO = 2
class DebugPhysicalButton(IntEnum):
LEFT_BTN = 0
MIDDLE_BTN = 1
RIGHT_BTN = 2
class EthereumDefinitionType(IntEnum):
NETWORK = 0
TOKEN = 1

@ -35,6 +35,7 @@ if TYPE_CHECKING:
from trezor.enums import CardanoTxSigningMode # noqa: F401
from trezor.enums import CardanoTxWitnessType # noqa: F401
from trezor.enums import DebugButton # noqa: F401
from trezor.enums import DebugPhysicalButton # noqa: F401
from trezor.enums import DebugSwipeDirection # noqa: F401
from trezor.enums import DecredStakingSpendType # noqa: F401
from trezor.enums import EthereumDataType # noqa: F401
@ -2619,6 +2620,7 @@ if TYPE_CHECKING:
y: "int | None"
wait: "bool | None"
hold_ms: "int | None"
physical_button: "DebugPhysicalButton | None"
def __init__(
self,
@ -2630,6 +2632,7 @@ if TYPE_CHECKING:
y: "int | None" = None,
wait: "bool | None" = None,
hold_ms: "int | None" = None,
physical_button: "DebugPhysicalButton | None" = None,
) -> None:
pass

@ -492,6 +492,12 @@ class DebugButton(IntEnum):
INFO = 2
class DebugPhysicalButton(IntEnum):
LEFT_BTN = 0
MIDDLE_BTN = 1
RIGHT_BTN = 2
class EthereumDefinitionType(IntEnum):
NETWORK = 0
TOKEN = 1

Loading…
Cancel
Save