Compare commits

..

8 Commits

@ -248,8 +248,6 @@ def cargo_build():
if NEW_RENDERING:
features.append('new_rendering')
if TREZOR_MODEL in ('T', 'T3T1', ):
features.append('ui_antialiasing')
cargo_opts = [
f'--target={env.get("ENV")["RUST_TARGET"]}',

@ -318,14 +318,12 @@ def cargo_build():
features.append('new_rendering')
if TREZOR_MODEL in ('T',):
features.append('display_rgb565')
features.append('ui_antialiasing')
elif TREZOR_MODEL in ('R', '1',):
features.append('display_mono')
features.append('xframebuffer')
elif TREZOR_MODEL in ('T3T1',):
features.append('display_rgb565')
features.append('xframebuffer')
features.append('ui_antialiasing')
if TREZOR_MODEL in ('T', 'T3T1'):
features.append('touch')

@ -769,7 +769,6 @@ def cargo_build():
features.append('debug')
features.append('ui_debug')
if TREZOR_MODEL in ('T', 'T3T1', 'DISC1', 'DISC2'):
features.append('ui_antialiasing')
features.append('ui_blurring')
features.append('ui_jpeg_decoder')

@ -875,7 +875,6 @@ def cargo_build():
if TREZOR_MODEL in ('T', 'T3T1'):
features.append('touch')
features.append('sd_card')
features.append('ui_antialiasing')
features.append('ui_blurring')
features.append('ui_jpeg_decoder')
if TREZOR_MODEL in ('R', '1'):

@ -53,7 +53,7 @@ static uint64_t term_glyph_bits(char ch) {
uint8_t bytes[8];
} result = {0};
if (ch > ' ' && ch < 128) {
if (ch > 32 && (uint8_t)ch < 128) {
const uint8_t *b = &Font_Bitmap[(ch - ' ') * 5];
for (int y = 0; y < 7; y++) {

@ -17,8 +17,8 @@ ui = []
dma2d = []
xframebuffer = []
display_mono = []
display_rgb565 = []
display_rgba8888 = []
display_rgb565 = ["ui_antialiasing"]
display_rgba8888 = ["ui_antialiasing"]
framebuffer = []
framebuffer32bit = []
ui_debug = []

@ -27,4 +27,3 @@ void bld_continue_label(uint16_t bg_color);
void screen_boot(bool warning, const char* vendor_str, size_t vendor_str_len,
uint32_t version, const void* vendor_img,
size_t vendor_img_len, int wait);

@ -13,6 +13,7 @@ extern "C" fn screen_welcome() {
}
#[no_mangle]
#[cfg(not(feature = "new_rendering"))]
extern "C" fn bld_continue_label(bg_color: cty::uint16_t) {
ModelUI::bld_continue_label(bg_color.into());
}

@ -128,7 +128,10 @@ fn render_demo(ctx: &DemoContext) -> time::Duration {
let start_time = time::Instant::now();
shape::render_on_display(
Some(Rect::new(Point::new(0, 0), Point::new(128, 64))),
Some(shape::Viewport::new(Rect::new(
Point::new(0, 0),
Point::new(128, 64),
))),
Some(Color::black()),
|target| {
target.with_origin(Offset::new(split.x, split.y), &|target| {
@ -156,7 +159,10 @@ fn render_demo(ctx: &DemoContext) -> time::Duration {
fn render_info(duration: time::Duration) {
shape::render_on_display(
Some(Rect::new(Point::new(96, 0), Point::new(128, 10))),
Some(shape::Viewport::new(Rect::new(
Point::new(96, 0),
Point::new(128, 10),
))),
Some(Color::white()),
|target| {
let text_color = Color::black();

@ -191,7 +191,10 @@ fn render_demo(ctx: &DemoContext) -> time::Duration {
let start_time = time::Instant::now();
shape::render_on_display(
Some(Rect::new(Point::new(0, 20), Point::new(240, 240))),
Some(shape::Viewport::new(Rect::new(
Point::new(0, 20),
Point::new(240, 240),
))),
Some(Color::rgb(0, 0, 48)),
|target| {
target.with_origin(Offset::new(split.x, split.y), &|target| {
@ -237,7 +240,10 @@ fn render_demo(ctx: &DemoContext) -> time::Duration {
fn render_info(duration: time::Duration, evstr: &str) {
shape::render_on_display(
Some(Rect::new(Point::zero(), Point::new(240, 20))),
Some(shape::Viewport::new(Rect::new(
Point::zero(),
Point::new(240, 20),
))),
Some(Color::rgb(0, 0, 255)),
|target| {
let text_color = Color::rgb(255, 255, 0);

@ -121,7 +121,7 @@ impl ModelMercuryFeatures {
let loader_offset: i16 = 19;
let center_text_offset: i16 = 10;
let center = SCREEN.center() + Offset::y(-loader_offset);
let center = SCREEN.center() + Offset::y(loader_offset);
let inactive_color = bg_color.blend(fg_color, 85);
shape::Circle::new(center, constant::LOADER_OUTER)
@ -133,7 +133,7 @@ impl ModelMercuryFeatures {
.with_end_angle(((progress as i32 * shape::PI4 as i32 * 8) / 1000) as i16)
.render(target);
shape::Circle::new(center, constant::LOADER_INNER)
shape::Circle::new(center, constant::LOADER_INNER + 2)
.with_bg(bg_color)
.render(target);
@ -169,6 +169,7 @@ impl UIFeaturesBootloader for ModelMercuryFeatures {
show(&mut frame, true);
}
#[cfg(not(feature = "new_rendering"))]
fn bld_continue_label(bg_color: Color) {
display::text_center(
Point::new(SCREEN.width() / 2, SCREEN.height() - 5),

@ -149,6 +149,7 @@ impl UIFeaturesBootloader for ModelTRFeatures {
show(&mut frame, true);
}
#[cfg(not(feature = "new_rendering"))]
fn bld_continue_label(bg_color: Color) {
display::text_center(
Point::new(constant::WIDTH / 2, HEIGHT - 2),

@ -176,6 +176,7 @@ impl UIFeaturesBootloader for ModelTTFeatures {
show(&mut frame, true);
}
#[cfg(not(feature = "new_rendering"))]
fn bld_continue_label(bg_color: Color) {
display::text_center(
Point::new(SCREEN.width() / 2, SCREEN.height() - 5),

@ -52,7 +52,7 @@ where
));
if let Some(viewport) = viewport {
canvas.set_viewport(Viewport::new(viewport));
canvas.set_viewport(viewport);
}
let mut target = DirectRenderer::new(&mut canvas, bg_color, &cache);

@ -18,6 +18,7 @@ pub trait UIFeaturesCommon {
pub trait UIFeaturesBootloader {
fn screen_welcome();
#[cfg(not(feature = "new_rendering"))]
fn bld_continue_label(bg_color: Color);
fn screen_install_success(restart_seconds: u8, initial_setup: bool, complete_draw: bool);

Loading…
Cancel
Save