From 6fadd70c1daedd4997fdcf32def28e7556f20aea Mon Sep 17 00:00:00 2001 From: Bernd Herzog Date: Sat, 1 Apr 2023 19:16:01 +0200 Subject: [PATCH] updated ui --- firmware/application/apps/ui_sd_over_usb.cpp | 13 +++++++++++++ firmware/application/apps/ui_sd_over_usb.hpp | 8 ++++++-- firmware/application/portapack.cpp | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/firmware/application/apps/ui_sd_over_usb.cpp b/firmware/application/apps/ui_sd_over_usb.cpp index 0bc3095b..82da9d34 100644 --- a/firmware/application/apps/ui_sd_over_usb.cpp +++ b/firmware/application/apps/ui_sd_over_usb.cpp @@ -32,6 +32,19 @@ SdOverUsbView::SdOverUsbView(NavigationView& nav) : nav_ (nav) { }); button_run.on_select = [this](Button&) { + ui::Painter painter; + painter.fill_rectangle( + { 0, 0, portapack::display.width(), portapack::display.height() }, + ui::Color::black() + ); + + painter.draw_bitmap( + { portapack::display.width()/2-8, portapack::display.height()/2-8 }, + bitmap_icon_hackrf, + ui::Color::yellow(), + ui::Color::black() + ); + sdcDisconnect(&SDCD1); sdcStop(&SDCD1); diff --git a/firmware/application/apps/ui_sd_over_usb.hpp b/firmware/application/apps/ui_sd_over_usb.hpp index e0086805..99d31290 100644 --- a/firmware/application/apps/ui_sd_over_usb.hpp +++ b/firmware/application/apps/ui_sd_over_usb.hpp @@ -46,11 +46,15 @@ private: NavigationView& nav_; Labels labels { - { { 40, 4 }, "This will provide access\nto the SD card over USB.", Color::white() } + { { 3 * 8, 2 * 16 }, "Click Run to start the", Color::white() }, + { { 3 * 8, 3 * 16 }, "USB Mass Storage Mode.", Color::white() }, + { { 3 * 8, 5 * 16 }, "It can take up to 20s", Color::white() }, + { { 3 * 8, 6 * 16 }, "for the drive to be.", Color::white() }, + { { 3 * 8, 7 * 16 }, "available.", Color::white() }, }; Button button_run { - { 2 * 8, 15 * 16, 12 * 8, 3 * 16 }, + { 9 * 8, 15 * 16, 12 * 8, 3 * 16 }, "Run" }; }; diff --git a/firmware/application/portapack.cpp b/firmware/application/portapack.cpp index 6a7f3376..c7237171 100644 --- a/firmware/application/portapack.cpp +++ b/firmware/application/portapack.cpp @@ -518,7 +518,7 @@ bool init() { void shutdown(const bool leave_screen_on) { gpdma::controller.disable(); - if (leave_screen_on) { + if (!leave_screen_on) { backlight()->off(); display.shutdown(); }