mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 04:18:10 +00:00
feat(common/protob): add optional uint32 refresh_index into DebugLinkRecordScreen message
Allows for screenshots from multiple emulator restarts being recorded in the same directory without being overwritten by each other. (As core/embed/unix/display-unix.c::display_save() starts with zero index after each restart.) [no changelog]
This commit is contained in:
parent
f0223c7266
commit
9804926682
@ -69,6 +69,7 @@ message DebugLinkReseedRandom {
|
||||
*/
|
||||
message DebugLinkRecordScreen {
|
||||
optional string target_directory = 1; // empty or missing to stop recording
|
||||
optional uint32 refresh_index = 2 [default=0]; // which index to give the screenshots (after emulator restarts)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2667,11 +2667,13 @@ if TYPE_CHECKING:
|
||||
|
||||
class DebugLinkRecordScreen(protobuf.MessageType):
|
||||
target_directory: "str | None"
|
||||
refresh_index: "int"
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
target_directory: "str | None" = None,
|
||||
refresh_index: "int | None" = None,
|
||||
) -> None:
|
||||
pass
|
||||
|
||||
|
@ -3773,14 +3773,17 @@ class DebugLinkRecordScreen(protobuf.MessageType):
|
||||
MESSAGE_WIRE_TYPE = 9003
|
||||
FIELDS = {
|
||||
1: protobuf.Field("target_directory", "string", repeated=False, required=False, default=None),
|
||||
2: protobuf.Field("refresh_index", "uint32", repeated=False, required=False, default=0),
|
||||
}
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
target_directory: Optional["str"] = None,
|
||||
refresh_index: Optional["int"] = 0,
|
||||
) -> None:
|
||||
self.target_directory = target_directory
|
||||
self.refresh_index = refresh_index
|
||||
|
||||
|
||||
class DebugLinkGetState(protobuf.MessageType):
|
||||
|
Loading…
Reference in New Issue
Block a user