From 934301ca378192aecbaacf345cdb76a4d96c269d Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 10 Jun 2024 13:47:41 -0700 Subject: [PATCH] altos/telelco-v3.0: Add "Scanning..." to startup screen Make it clear what's going on. Had to shrink the logo to make room, so switched from 26 to 24 point text. Signed-off-by: Keith Packard --- src/telelco-v3.0/Makefile | 4 ++-- src/telelco-v3.0/ao_lco_v3.c | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/telelco-v3.0/Makefile b/src/telelco-v3.0/Makefile index cc17a221..2531374b 100644 --- a/src/telelco-v3.0/Makefile +++ b/src/telelco-v3.0/Makefile @@ -77,7 +77,7 @@ ALTOS_SRC = \ BitstreamVeraSans-Roman-24.c \ BitstreamVeraSans-Roman-10.c \ BitstreamVeraSans-Roman-12.c \ - BenguiatGothicStd-Bold-26.c \ + BenguiatGothicStd-Bold-24.c \ ao_quadrature.c \ ao_button.c \ ao_event.c \ @@ -122,7 +122,7 @@ BitstreamVeraSans-Roman-58.c: ao_font.h BitstreamVeraSans-Roman-24.c: ao_font.h BitstreamVeraSans-Roman-10.c: ao_font.h BitstreamVeraSans-Roman-12.c: ao_font.h -BenguiatGothicStd-Bold-26.c: ao_font.h +BenguiatGothicStd-Bold-24.c: ao_font.h install: diff --git a/src/telelco-v3.0/ao_lco_v3.c b/src/telelco-v3.0/ao_lco_v3.c index 688df285..8c451e21 100644 --- a/src/telelco-v3.0/ao_lco_v3.c +++ b/src/telelco-v3.0/ao_lco_v3.c @@ -40,8 +40,8 @@ static struct ao_bitmap fb = { }; static const struct ao_transform logo_transform = { - .x_scale = 48, .x_off = 2, - .y_scale = 48, .y_off = 0, + .x_scale = 40, .x_off = 8, + .y_scale = 40, .y_off = 0, }; static const struct ao_transform show_transform = { @@ -53,7 +53,7 @@ static const struct ao_transform show_transform = { #define VOLT_FONT BitstreamVeraSans_Roman_58_font #define SMALL_FONT BitstreamVeraSans_Roman_12_font #define TINY_FONT BitstreamVeraSans_Roman_10_font -#define LOGO_FONT BenguiatGothicStd_Bold_26_font +#define LOGO_FONT BenguiatGothicStd_Bold_24_font #define LABEL_Y (int16_t) (SMALL_FONT.ascent) #define VALUE_Y (int16_t) (LABEL_Y + 5 + BIG_FONT.ascent) @@ -70,6 +70,8 @@ static const struct ao_transform show_transform = { #define SCAN_X (WIDTH - 100) / 2 #define SCAN_Y 50 #define SCAN_HEIGHT 3 +#define SCANNING_X (WIDTH / 2) +#define SCANNING_Y (SCAN_Y - 2) #define FOUND_Y 63 #define FOUND_X 3 #define FOUND_WIDTH (WIDTH - 6) @@ -432,6 +434,7 @@ ao_lco_search_start(void) { ao_rect(&fb, 0, 0, WIDTH, HEIGHT, AO_WHITE, AO_COPY); ao_logo(&fb, &logo_transform, &LOGO_FONT, AO_BLACK, AO_COPY); + _ao_center_text(SCANNING_X, SCANNING_Y, &TINY_FONT, "Scanning..."); found_width = 0; nfound = 0; } -- 2.47.2