updated ui

This commit is contained in:
Bernd Herzog 2023-04-01 19:16:01 +02:00
parent 8d8d457da2
commit 6fadd70c1d
3 changed files with 20 additions and 3 deletions

View File

@ -32,6 +32,19 @@ SdOverUsbView::SdOverUsbView(NavigationView& nav) : nav_ (nav) {
}); });
button_run.on_select = [this](Button&) { 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); sdcDisconnect(&SDCD1);
sdcStop(&SDCD1); sdcStop(&SDCD1);

View File

@ -46,11 +46,15 @@ private:
NavigationView& nav_; NavigationView& nav_;
Labels labels { 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 { Button button_run {
{ 2 * 8, 15 * 16, 12 * 8, 3 * 16 }, { 9 * 8, 15 * 16, 12 * 8, 3 * 16 },
"Run" "Run"
}; };
}; };

View File

@ -518,7 +518,7 @@ bool init() {
void shutdown(const bool leave_screen_on) { void shutdown(const bool leave_screen_on) {
gpdma::controller.disable(); gpdma::controller.disable();
if (leave_screen_on) { if (!leave_screen_on) {
backlight()->off(); backlight()->off();
display.shutdown(); display.shutdown();
} }