mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
feat(common): add experimental_features setting
This commit is contained in:
parent
865c167ac5
commit
314cd260eb
@ -102,6 +102,7 @@ message Features {
|
||||
optional SafetyCheckLevel safety_checks = 37; // safety check level, set to Prompt to limit path namespace enforcement
|
||||
optional uint32 auto_lock_delay_ms = 38; // number of milliseconds after which the device locks itself
|
||||
optional uint32 display_rotation = 39; // in degrees from North
|
||||
optional bool experimental_features = 40; // are experimental message types enabled?
|
||||
}
|
||||
|
||||
/**
|
||||
@ -138,6 +139,7 @@ message ApplySettings {
|
||||
optional uint32 display_rotation = 7; // in degrees from North
|
||||
optional bool passphrase_always_on_device = 8; // do not prompt for passphrase, enforce device entry
|
||||
optional SafetyCheckLevel safety_checks = 9; // Safety check level, set to Prompt to limit path namespace enforcement
|
||||
optional bool experimental_features = 10; // enable experimental message types
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,6 +25,7 @@ class ApplySettings(p.MessageType):
|
||||
display_rotation: int = None,
|
||||
passphrase_always_on_device: bool = None,
|
||||
safety_checks: EnumTypeSafetyCheckLevel = None,
|
||||
experimental_features: bool = None,
|
||||
) -> None:
|
||||
self.language = language
|
||||
self.label = label
|
||||
@ -34,6 +35,7 @@ class ApplySettings(p.MessageType):
|
||||
self.display_rotation = display_rotation
|
||||
self.passphrase_always_on_device = passphrase_always_on_device
|
||||
self.safety_checks = safety_checks
|
||||
self.experimental_features = experimental_features
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
@ -46,4 +48,5 @@ class ApplySettings(p.MessageType):
|
||||
7: ('display_rotation', p.UVarintType, None),
|
||||
8: ('passphrase_always_on_device', p.BoolType, None),
|
||||
9: ('safety_checks', p.EnumType("SafetyCheckLevel", (0, 1, 2)), None),
|
||||
10: ('experimental_features', p.BoolType, None),
|
||||
}
|
||||
|
@ -56,6 +56,7 @@ class Features(p.MessageType):
|
||||
safety_checks: EnumTypeSafetyCheckLevel = None,
|
||||
auto_lock_delay_ms: int = None,
|
||||
display_rotation: int = None,
|
||||
experimental_features: bool = None,
|
||||
) -> None:
|
||||
self.capabilities = capabilities if capabilities is not None else []
|
||||
self.vendor = vendor
|
||||
@ -94,6 +95,7 @@ class Features(p.MessageType):
|
||||
self.safety_checks = safety_checks
|
||||
self.auto_lock_delay_ms = auto_lock_delay_ms
|
||||
self.display_rotation = display_rotation
|
||||
self.experimental_features = experimental_features
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
@ -135,4 +137,5 @@ class Features(p.MessageType):
|
||||
37: ('safety_checks', p.EnumType("SafetyCheckLevel", (0, 1, 2)), None),
|
||||
38: ('auto_lock_delay_ms', p.UVarintType, None),
|
||||
39: ('display_rotation', p.UVarintType, None),
|
||||
40: ('experimental_features', p.BoolType, None),
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ class ApplySettings(p.MessageType):
|
||||
display_rotation: int = None,
|
||||
passphrase_always_on_device: bool = None,
|
||||
safety_checks: EnumTypeSafetyCheckLevel = None,
|
||||
experimental_features: bool = None,
|
||||
) -> None:
|
||||
self.language = language
|
||||
self.label = label
|
||||
@ -34,6 +35,7 @@ class ApplySettings(p.MessageType):
|
||||
self.display_rotation = display_rotation
|
||||
self.passphrase_always_on_device = passphrase_always_on_device
|
||||
self.safety_checks = safety_checks
|
||||
self.experimental_features = experimental_features
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
@ -46,4 +48,5 @@ class ApplySettings(p.MessageType):
|
||||
7: ('display_rotation', p.UVarintType, None),
|
||||
8: ('passphrase_always_on_device', p.BoolType, None),
|
||||
9: ('safety_checks', p.EnumType("SafetyCheckLevel", (0, 1, 2)), None),
|
||||
10: ('experimental_features', p.BoolType, None),
|
||||
}
|
||||
|
@ -56,6 +56,7 @@ class Features(p.MessageType):
|
||||
safety_checks: EnumTypeSafetyCheckLevel = None,
|
||||
auto_lock_delay_ms: int = None,
|
||||
display_rotation: int = None,
|
||||
experimental_features: bool = None,
|
||||
) -> None:
|
||||
self.capabilities = capabilities if capabilities is not None else []
|
||||
self.vendor = vendor
|
||||
@ -94,6 +95,7 @@ class Features(p.MessageType):
|
||||
self.safety_checks = safety_checks
|
||||
self.auto_lock_delay_ms = auto_lock_delay_ms
|
||||
self.display_rotation = display_rotation
|
||||
self.experimental_features = experimental_features
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
@ -135,4 +137,5 @@ class Features(p.MessageType):
|
||||
37: ('safety_checks', p.EnumType("SafetyCheckLevel", (0, 1, 2)), None),
|
||||
38: ('auto_lock_delay_ms', p.UVarintType, None),
|
||||
39: ('display_rotation', p.UVarintType, None),
|
||||
40: ('experimental_features', p.BoolType, None),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user