From 650aacfaa7ce6d05b8843c14c7bf33ce78c05f92 Mon Sep 17 00:00:00 2001 From: gullradriel <3157857+gullradriel@users.noreply.github.com> Date: Sat, 18 Nov 2023 22:32:52 +0100 Subject: [PATCH] BLE RX: added clear list button (#1593) * added clear list button * Bigger buttons and text * Change case on labels --------- Co-authored-by: GullCode --- firmware/application/apps/ble_rx_app.cpp | 5 +++++ firmware/application/apps/ble_rx_app.hpp | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/firmware/application/apps/ble_rx_app.cpp b/firmware/application/apps/ble_rx_app.cpp index 0624d210..df775088 100644 --- a/firmware/application/apps/ble_rx_app.cpp +++ b/firmware/application/apps/ble_rx_app.cpp @@ -420,6 +420,7 @@ BLERxView::BLERxView(NavigationView& nav) &options_sort, &button_filter, &button_save_list, + &button_clear_list, &button_switch, &recent_entries_view}); @@ -448,6 +449,10 @@ BLERxView::BLERxView(NavigationView& nav) }); }; + button_clear_list.on_select = [this](Button&) { + recent.clear(); + }; + button_switch.on_select = [&nav](Button&) { nav.replace(); }; diff --git a/firmware/application/apps/ble_rx_app.hpp b/firmware/application/apps/ble_rx_app.hpp index b536572a..6d58514a 100644 --- a/firmware/application/apps/ble_rx_app.hpp +++ b/firmware/application/apps/ble_rx_app.hpp @@ -274,13 +274,17 @@ class BLERxView : public View { Console console{ {0, 4 * 16, 240, 240}}; + Button button_clear_list{ + {2 * 8, 320 - (16 + 32), 7 * 8, 32}, + "Clear"}; + Button button_save_list{ - {1 * 8, 16 * 16, 13 * 8, 2 * 16}, - "Save List"}; + {11 * 8, 320 - (16 + 32), 11 * 8, 32}, + "Export CSV"}; Button button_switch{ - {16 * 8, 16 * 16, 13 * 8, 2 * 16}, - "Switch to Rx"}; + {240 - 6 * 8, 320 - (16 + 32), 4 * 8, 32}, + "Tx"}; std::string str_log{""}; bool logging{false};