1
0
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:
grdddj 2023-03-30 12:46:19 +02:00 committed by Jiří Musil
parent f0223c7266
commit 9804926682
3 changed files with 7 additions and 1 deletions

View File

@ -68,7 +68,8 @@ message DebugLinkReseedRandom {
* @next Success
*/
message DebugLinkRecordScreen {
optional string target_directory = 1; // empty or missing to stop recording
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)
}
/**

View File

@ -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

View File

@ -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):