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

refactor(core): simplify fade_backlight_duration #4606

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

romanz
Copy link
Contributor

@romanz romanz commented Feb 11, 2025

  • IIUC, casting to and from i32 can be removed.
  • timer.elapsed() can be evaluated once per loop iteration.

- IIUC, casting to and from `i32` can be removed.
- `timer.elapsed()` can be evaluated once per loop iteration.
- Removed unused `impl_lerp_for_...` definitions.

[no changelog]
@romanz romanz self-assigned this Feb 11, 2025
Copy link

github-actions bot commented Feb 11, 2025

core UI changes device test click test persistence test
T2T1 Model T test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
T3B1 Safe 3 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
T3T1 Safe 5 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
All main(screens)

@romanz romanz added the core Trezor Core firmware. Runs on Trezor Model T and T2B1. label Feb 11, 2025
impl_lerp_for_unsigned!(u8);
impl_lerp_for_unsigned!(u16);
impl_lerp_for_unsigned!(u32);

impl_lerp_for_signed!(f32);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any specific reason to remove those? they won't be compiled in when unused, and it seems generally useful to have them available for all types

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right - I will revert this change.

Copy link
Contributor Author

@romanz romanz Feb 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in fb6b11b.

@romanz romanz marked this pull request as ready for review February 11, 2025 11:42
@romanz romanz requested a review from prusnak as a code owner February 11, 2025 11:42
@romanz romanz requested review from matejcik and removed request for prusnak February 11, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Trezor Core firmware. Runs on Trezor Model T and T2B1.
Projects
Status: 🔎 Needs review
Development

Successfully merging this pull request may close these issues.

2 participants