1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00

update protobuf, introduce homescreen

This commit is contained in:
Pavol Rusnak 2015-02-04 20:53:22 +01:00
parent d83926fb13
commit 686b8cc4b8
3 changed files with 118 additions and 99 deletions

View File

@ -62,5 +62,15 @@ class TestMsgApplysettings(common.TrezorTest):
self.assertEqual(self.client.features.passphrase_protection, True)
def test_apply_homescreen(self):
self.setup_mnemonic_pin_passphrase()
with self.client:
self.client.set_expected_responses([proto.ButtonRequest(),
proto.PinMatrixRequest(),
proto.Success(),
proto.Features()])
self.client.apply_settings(homescreen=1024*'\xf0')
if __name__ == '__main__':
unittest.main()

View File

@ -417,7 +417,7 @@ class ProtocolMixin(object):
@field('message')
@expect(proto.Success)
def apply_settings(self, label=None, language=None, use_passphrase=None):
def apply_settings(self, label=None, language=None, use_passphrase=None, homescreen=None):
settings = proto.ApplySettings()
if label != None:
settings.label = label
@ -425,6 +425,8 @@ class ProtocolMixin(object):
settings.language = language
if use_passphrase != None:
settings.use_passphrase = use_passphrase
if homescreen != None:
settings.homescreen = homescreen
out = self.call(settings)
self.init_device() # Reload Features

File diff suppressed because one or more lines are too long