Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve T2B1 homescreen checks #3407

Merged
merged 3 commits into from
Nov 30, 2023
Merged

Conversation

TychoVrahe
Copy link
Contributor

closes #3263

  • Only TOIG is accepted as homescreen format.
  • Default image is painted if something else is stored in storage.

@TychoVrahe TychoVrahe removed the request for review from prusnak November 17, 2023 22:04
@TychoVrahe TychoVrahe self-assigned this Nov 17, 2023
@TychoVrahe
Copy link
Contributor Author

On second thought, i decided to move the homescreen format check to the homescreen module in rust. The format is dependent on the homescreen implementation, the check code is reused there and it eliminates the need for model-specific code in python. I didn't want to reimplement detailed error messages (format check failing due to dimensions, not being grayscale etc), i don't think its needed as it is also checked in CLI or suite, so unified message should be enough.

@matejcik
Copy link
Contributor

I wanted to suggest a refactor of the TR version of homescreen check, but it involved changes that are somewhat more spread out. Please check my commits.

@TychoVrahe
Copy link
Contributor Author

ACK for the TR refactor and related changes.

matejcik and others added 3 commits November 28, 2023 09:54
So that cstr! can be used in const contexts. This is not critical but it's nice-to-have as long as we are on nightly anyway.
@matejcik matejcik force-pushed the tychovrahe/T2B1/homscreen_checks branch from 9cdf69d to 59e8b99 Compare November 28, 2023 08:55
@matejcik
Copy link
Contributor

squashed, force-pushed, waiting for CI results

@matejcik matejcik merged commit 7b442a2 into main Nov 30, 2023
56 of 57 checks passed
@matejcik matejcik deleted the tychovrahe/T2B1/homscreen_checks branch November 30, 2023 12:42
@matejcik
Copy link
Contributor

@TychoVrahe can you provide a TOIg homescreen image for QA to test with?

@TychoVrahe
Copy link
Contributor Author

homescreen_legacy.zip

sorry for the delay.

@bosomt
Copy link

bosomt commented Dec 21, 2023

trezorctl set homescreen homescreen_legacy.toif
Error: TOIF file is corrupted

Info:

  • Suite version: desktop 23.12.3 (8fd6a446f2f03d4c8407e1f5f97a804f315a0253)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/23.12.3 Chrome/118.0.5993.129 Electron/27.0.4 Safari/537.36
  • OS: MacIntel
  • Screen: 1512x982
  • Device: Trezor T2B1 2.6.5 regular (revision f4d3a74)
  • Transport: BridgeTransport 2.0.33

@bosomt
Copy link

bosomt commented Jan 4, 2024

can i approve this ?
T2B1 FW works with Suite homescreens as expected

@matejcik
Copy link
Contributor

matejcik commented Jan 4, 2024

:yes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

T2B1 homescreen checks
3 participants