From 37c6b35fb784221c1545fa9a28f8d8e532f9151c Mon Sep 17 00:00:00 2001 From: Mark Thompson <129641948+NotherNgineer@users.noreply.github.com> Date: Wed, 11 Oct 2023 11:32:01 -0500 Subject: [PATCH] Moved external Font Viewer app to DEBUG menu (#1485) * Updated icon * Support external apps on DEBUG menu screen --- firmware/application/apps/ui_debug.cpp | 6 +++ .../application/external/font_viewer/main.cpp | 40 +++++++++--------- firmware/common/external_app.hpp | 3 +- firmware/graphics/icon_font_viewer.png | Bin 166 -> 167 bytes 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/firmware/application/apps/ui_debug.cpp b/firmware/application/apps/ui_debug.cpp index 90869c5f6..2c82f04ba 100644 --- a/firmware/application/apps/ui_debug.cpp +++ b/firmware/application/apps/ui_debug.cpp @@ -34,6 +34,7 @@ #include "ui_font_fixed_8x16.hpp" #include "ui_styles.hpp" #include "ui_painter.hpp" +#include "ui_external_items_menu_loader.hpp" #include "portapack.hpp" #include "portapack_persistent_memory.hpp" @@ -409,6 +410,11 @@ DebugMenuView::DebugMenuView(NavigationView& nav) { {"Temperature", ui::Color::dark_cyan(), &bitmap_icon_temperature, [&nav]() { nav.push(); }}, {"Touch Test", ui::Color::dark_cyan(), &bitmap_icon_notepad, [&nav]() { nav.push(); }}, }); + + for (auto const& gridItem : ExternalItemsMenuLoader::load_external_items(app_location_t::DEBUG, nav)) { + add_item(gridItem); + }; + set_max_rows(2); // allow wider buttons } diff --git a/firmware/application/external/font_viewer/main.cpp b/firmware/application/external/font_viewer/main.cpp index a275649bd..f83e7be84 100644 --- a/firmware/application/external/font_viewer/main.cpp +++ b/firmware/application/external/font_viewer/main.cpp @@ -40,32 +40,32 @@ __attribute__((section(".external_app.app_font_viewer.application_information"), /*.app_name = */ "Font Viewer", /*.bitmap_data = */ { + 0x00, + 0x00, 0x00, 0x00, 0x10, - 0x08, - 0x10, - 0x08, + 0x0C, 0x38, - 0x08, - 0x28, - 0x08, + 0x0C, + 0x38, + 0x0C, 0x6C, - 0x08, - 0x44, - 0x08, + 0x0C, + 0x6C, + 0x0C, + 0xC6, + 0x7C, 0xFE, - 0x78, - 0x82, - 0x88, + 0xFC, + 0xFF, + 0x8D, 0x83, - 0x89, + 0x8D, + 0x83, + 0xFD, 0x01, - 0x89, - 0x01, - 0x79, - 0x00, - 0x00, + 0x7D, 0x00, 0x00, 0x00, @@ -73,8 +73,8 @@ __attribute__((section(".external_app.app_font_viewer.application_information"), 0x00, 0x00, }, - /*.icon_color = */ ui::Color::yellow().v, - /*.menu_location = */ app_location_t::UTILITIES, + /*.icon_color = */ ui::Color::cyan().v, + /*.menu_location = */ app_location_t::DEBUG, /*.m4_app_tag = portapack::spi_flash::image_tag_noop */ {'\0', '\0', '\0', '\0'}, /*.m4_app_offset = */ 0x00000000, // will be filled at compile time diff --git a/firmware/common/external_app.hpp b/firmware/common/external_app.hpp index 396574c81..38824fc22 100644 --- a/firmware/common/external_app.hpp +++ b/firmware/common/external_app.hpp @@ -33,7 +33,8 @@ typedef void (*externalAppEntry_t)(ui::NavigationView& nav); enum app_location_t : uint32_t { UTILITIES = 0, RX, - TX + TX, + DEBUG }; struct application_information_t { diff --git a/firmware/graphics/icon_font_viewer.png b/firmware/graphics/icon_font_viewer.png index 62eb3e119a696e92bb81f3a96c3e8a84e1a9e87b..b4a13c6318f801bb16da02cbccbf45cea65ed6ad 100644 GIT binary patch delta 117 zcmV-*0E+*n0jB|wIc`}=L_t(Ijn$A#3cxT3MDxV^U)in%3tA1?q_Z67hihF2GqZ}% zZjza+kPOmGh5_CRu(RTL!K=;Nr;7kI5p0j2?vIc-=;L_t(Ijop#K4!|G`LZ#XN|1zFjw9#VcPI9GzM_S6?BFT(r zr-eg6YltW$0RVg=@U6QP13_!gP(ZcyVgBy*Rsm`jNt)WKeDj!7#6XWah={T;zf~2G WM?3hcE