diff --git a/firmware/application/bitmap.hpp b/firmware/application/bitmap.hpp index fb36688a3..90c5cbf53 100644 --- a/firmware/application/bitmap.hpp +++ b/firmware/application/bitmap.hpp @@ -29,98 +29,6 @@ namespace ui { // Use firmware/tools/make_bitmap.py ! -static constexpr uint8_t bitmap_icon_audiotx_data[] = { - 0x00, 0x70, - 0x00, 0x7F, - 0xC0, 0x4F, - 0xC0, 0x60, - 0x40, 0x5E, - 0xC0, 0x41, - 0x40, 0x40, - 0x40, 0x40, - 0x40, 0x40, - 0x40, 0x70, - 0x70, 0x7C, - 0x7C, 0x7E, - 0x7E, 0x3E, - 0x3E, 0x1C, - 0x1C, 0x00, - 0x00, 0x00, -}; - -static constexpr Bitmap bitmap_icon_audiotx { - { 16, 16 }, bitmap_icon_audiotx_data -}; - -static constexpr uint8_t bitmap_icon_capture_data[] = { - 0xEF, 0x29, - 0xEF, 0x69, - 0xEF, 0xE9, - 0xEF, 0xE9, - 0xEF, 0xEF, - 0x1F, 0xF0, - 0xFF, 0xFF, - 0xFF, 0xFF, - 0x03, 0xC0, - 0xFB, 0xDF, - 0x0B, 0xD9, - 0xFB, 0xDF, - 0x4B, 0xDE, - 0xFB, 0xDF, - 0x03, 0xC0, - 0xFE, 0x7F, -}; - -static constexpr Bitmap bitmap_icon_capture { - { 16, 16 }, bitmap_icon_capture_data -}; - -static constexpr uint8_t bitmap_icon_codetx_data[] = { - 0x00, 0x00, - 0xF0, 0x07, - 0x0C, 0x18, - 0x03, 0x60, - 0xE0, 0x83, - 0x18, 0x0C, - 0x04, 0x10, - 0xC0, 0x01, - 0x20, 0x02, - 0x00, 0x00, - 0x00, 0x00, - 0xBB, 0x6D, - 0x2A, 0x49, - 0x2A, 0x49, - 0x3A, 0x49, - 0x00, 0x00, -}; - -static constexpr Bitmap bitmap_icon_codetx { - { 16, 16 }, bitmap_icon_codetx_data -}; - -static constexpr uint8_t bitmap_icon_receiver_data[] = { - 0xC0, 0x07, - 0x30, 0x18, - 0x10, 0x10, - 0x88, 0x23, - 0x48, 0x24, - 0x40, 0x24, - 0x80, 0x10, - 0x80, 0x10, - 0xC0, 0x08, - 0xE0, 0x08, - 0x60, 0x04, - 0x08, 0x04, - 0x08, 0x02, - 0x10, 0x01, - 0xE0, 0x00, - 0x00, 0x00, -}; - -static constexpr Bitmap bitmap_icon_receiver { - { 16, 16 }, bitmap_icon_receiver_data -}; - static constexpr uint8_t bitmap_icon_adsb_data[] = { 0x80, 0x01, 0xC0, 0x03, @@ -144,6 +52,52 @@ static constexpr Bitmap bitmap_icon_adsb { { 16, 16 }, bitmap_icon_adsb_data }; +static constexpr uint8_t bitmap_icon_ais_data[] = { + 0x00, 0x01, + 0x80, 0x01, + 0xC0, 0x0D, + 0xC0, 0x3D, + 0xE0, 0x3D, + 0xF0, 0x7D, + 0xF8, 0x7D, + 0xF8, 0x7D, + 0xFC, 0x7D, + 0xFE, 0x7D, + 0x00, 0x00, + 0xF8, 0x3F, + 0xF8, 0x1F, + 0xFB, 0xCF, + 0x00, 0x00, + 0x00, 0x00, +}; + +static constexpr Bitmap bitmap_icon_ais { + { 16, 16 }, bitmap_icon_ais_data +}; + +static constexpr uint8_t bitmap_icon_audiotx_data[] = { + 0x00, 0x70, + 0x00, 0x7F, + 0xC0, 0x4F, + 0xC0, 0x60, + 0x40, 0x5E, + 0xC0, 0x41, + 0x40, 0x40, + 0x40, 0x40, + 0x40, 0x40, + 0x40, 0x70, + 0x70, 0x7C, + 0x7C, 0x7E, + 0x7E, 0x3E, + 0x3E, 0x1C, + 0x1C, 0x00, + 0x00, 0x00, +}; + +static constexpr Bitmap bitmap_icon_audiotx { + { 16, 16 }, bitmap_icon_audiotx_data +}; + static constexpr uint8_t bitmap_icon_bht_data[] = { 0x00, 0x00, 0xE0, 0x07, @@ -167,6 +121,29 @@ static constexpr Bitmap bitmap_icon_bht { { 16, 16 }, bitmap_icon_bht_data }; +static constexpr uint8_t bitmap_icon_capture_data[] = { + 0xEF, 0x29, + 0xEF, 0x69, + 0xEF, 0xE9, + 0xEF, 0xE9, + 0xEF, 0xEF, + 0x1F, 0xF0, + 0xFF, 0xFF, + 0xFF, 0xFF, + 0x03, 0xC0, + 0xFB, 0xDF, + 0x0B, 0xD9, + 0xFB, 0xDF, + 0x4B, 0xDE, + 0xFB, 0xDF, + 0x03, 0xC0, + 0xFE, 0x7F, +}; + +static constexpr Bitmap bitmap_icon_capture { + { 16, 16 }, bitmap_icon_capture_data +}; + static constexpr uint8_t bitmap_icon_closecall_data[] = { 0x00, 0x00, 0x00, 0x10, @@ -190,6 +167,52 @@ static constexpr Bitmap bitmap_icon_closecall { { 16, 16 }, bitmap_icon_closecall_data }; +static constexpr uint8_t bitmap_icon_codetx_data[] = { + 0x00, 0x00, + 0xF0, 0x07, + 0x0C, 0x18, + 0x03, 0x60, + 0xE0, 0x83, + 0x18, 0x0C, + 0x04, 0x10, + 0xC0, 0x01, + 0x20, 0x02, + 0x00, 0x00, + 0x00, 0x00, + 0xBB, 0x6D, + 0x2A, 0x49, + 0x2A, 0x49, + 0x3A, 0x49, + 0x00, 0x00, +}; + +static constexpr Bitmap bitmap_icon_codetx { + { 16, 16 }, bitmap_icon_codetx_data +}; + +static constexpr uint8_t bitmap_icon_ert_data[] = { + 0x00, 0x00, + 0x00, 0x00, + 0x77, 0x77, + 0x55, 0x41, + 0x75, 0x77, + 0x55, 0x44, + 0x55, 0x44, + 0x77, 0x77, + 0x00, 0x00, + 0x20, 0x04, + 0x02, 0x26, + 0x04, 0x12, + 0x00, 0x03, + 0x80, 0x01, + 0xC3, 0x61, + 0x80, 0x00, +}; + +static constexpr Bitmap bitmap_icon_ert { + { 16, 16 }, bitmap_icon_ert_data +}; + static constexpr uint8_t bitmap_icon_foxhunt_data[] = { 0x18, 0x18, 0x28, 0x14, @@ -328,6 +351,29 @@ static constexpr Bitmap bitmap_icon_morse { { 16, 16 }, bitmap_icon_morse_data }; +static constexpr uint8_t bitmap_icon_nordic_data[] = { + 0x00, 0x00, + 0x18, 0x18, + 0x26, 0x6C, + 0xC1, 0x8E, + 0x07, 0x8F, + 0x1F, 0x8C, + 0x3F, 0x80, + 0xFF, 0x80, + 0xFF, 0x83, + 0xFF, 0x87, + 0xEF, 0x9F, + 0x8F, 0xFF, + 0x4F, 0xFF, + 0x2E, 0x7C, + 0x18, 0x18, + 0x00, 0x00, +}; + +static constexpr Bitmap bitmap_icon_nordic { + { 16, 16 }, bitmap_icon_nordic_data +}; + static constexpr uint8_t bitmap_icon_numbers_data[] = { 0x00, 0x00, 0x68, 0x1B, @@ -420,6 +466,29 @@ static constexpr Bitmap bitmap_icon_rds { { 16, 16 }, bitmap_icon_rds_data }; +static constexpr uint8_t bitmap_icon_receiver_data[] = { + 0xC0, 0x07, + 0x30, 0x18, + 0x10, 0x10, + 0x88, 0x23, + 0x48, 0x24, + 0x40, 0x24, + 0x80, 0x10, + 0x80, 0x10, + 0xC0, 0x08, + 0xE0, 0x08, + 0x60, 0x04, + 0x08, 0x04, + 0x08, 0x02, + 0x10, 0x01, + 0xE0, 0x00, + 0x00, 0x00, +}; + +static constexpr Bitmap bitmap_icon_receiver { + { 16, 16 }, bitmap_icon_receiver_data +}; + static constexpr uint8_t bitmap_icon_remote_data[] = { 0x20, 0x00, 0x20, 0x00, @@ -466,6 +535,29 @@ static constexpr Bitmap bitmap_icon_soundboard { { 16, 16 }, bitmap_icon_soundboard_data }; +static constexpr uint8_t bitmap_icon_tpms_data[] = { + 0xE0, 0x07, + 0xF8, 0x1A, + 0x78, 0x10, + 0x3C, 0x20, + 0x34, 0x27, + 0x9A, 0x4C, + 0x96, 0x6C, + 0xBA, 0x4C, + 0x96, 0x6C, + 0xB2, 0x4C, + 0x92, 0x4E, + 0x24, 0x27, + 0x24, 0x20, + 0x48, 0x10, + 0xD8, 0x1A, + 0xE0, 0x07, +}; + +static constexpr Bitmap bitmap_icon_tpms { + { 16, 16 }, bitmap_icon_tpms_data +}; + static constexpr uint8_t bitmap_icon_whistle_data[] = { 0x00, 0x00, 0x60, 0x00, diff --git a/firmware/application/ui_encoders.cpp b/firmware/application/ui_encoders.cpp index 65bc837be..b9bd81714 100644 --- a/firmware/application/ui_encoders.cpp +++ b/firmware/application/ui_encoders.cpp @@ -118,10 +118,10 @@ void EncodersView::update_progress() { } } -void EncodersView::on_txdone(int n) { +void EncodersView::on_txdone(int n, const bool txdone) { //char str[16]; - if (n > 0) { + if (!txdone) { // Repeating... repeat_index = n + 1; /*if (tx_mode == SCAN) { diff --git a/firmware/application/ui_encoders.hpp b/firmware/application/ui_encoders.hpp index 65871c473..a3d9b9c8d 100644 --- a/firmware/application/ui_encoders.hpp +++ b/firmware/application/ui_encoders.hpp @@ -68,7 +68,7 @@ private: void generate_frame(); void update_progress(); void start_tx(const bool scan); - void on_txdone(int n); + void on_txdone(int n, const bool txdone); const Style style_val { .font = font::fixed_8x16, @@ -189,7 +189,7 @@ private: Message::ID::TXDone, [this](const Message* const p) { const auto message = *reinterpret_cast(p); - this->on_txdone(message.progress); + this->on_txdone(message.progress, message.done); } }; }; diff --git a/firmware/application/ui_navigation.cpp b/firmware/application/ui_navigation.cpp index c958447e7..812913f19 100644 --- a/firmware/application/ui_navigation.cpp +++ b/firmware/application/ui_navigation.cpp @@ -265,9 +265,9 @@ void NavigationView::focus() { TranspondersMenuView::TranspondersMenuView(NavigationView& nav) { add_items<4>({ { { "ADS-B: Planes", ui::Color::grey(), &bitmap_icon_adsb, [&nav](){ nav.push(); }, }, - { "AIS: Boats", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, - { "ERT: Utility Meters", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, - { "TPMS: Cars", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + { "AIS: Boats", ui::Color::white(), &bitmap_icon_ais, [&nav](){ nav.push(); } }, + { "ERT: Utility Meters", ui::Color::white(), &bitmap_icon_ert, [&nav](){ nav.push(); } }, + { "TPMS: Cars", ui::Color::white(), &bitmap_icon_tpms, [&nav](){ nav.push(); } }, } }); on_left = [&nav](){ nav.pop(); }; } @@ -279,9 +279,9 @@ ReceiverMenuView::ReceiverMenuView(NavigationView& nav) { // { "AFSK", ui::Color::grey(), nullptr, [&nav](){ nav.push(); } }, // AFSKRXView { "Audio", ui::Color::green(), nullptr, [&nav](){ nav.push(); } }, { "CCIR", ui::Color::grey(), nullptr, [&nav](){ nav.push(); } }, - { "Nordic/BTLE", ui::Color::grey(), nullptr, [&nav](){ nav.push(); } }, + { "Nordic/BTLE", ui::Color::grey(), &bitmap_icon_nordic_data, [&nav](){ nav.push(); } }, { "POCSAG 1200", ui::Color::cyan(), nullptr, [&nav](){ nav.push(); } }, - { "SIGFOX", ui::Color::grey(), nullptr, [&nav](){ nav.push(); } }, // SIGFRXView + { "SIGFOX", ui::Color::grey(), &bitmap_icon_foxhunt, [&nav](){ nav.push(); } }, // SIGFRXView { "Transponders", ui::Color::green(), nullptr, [&nav](){ nav.push(); } }, } }); on_left = [&nav](){ nav.pop(); }; diff --git a/firmware/portapack-h1-havoc.bin b/firmware/portapack-h1-havoc.bin index f7849f834..26295fb4b 100644 Binary files a/firmware/portapack-h1-havoc.bin and b/firmware/portapack-h1-havoc.bin differ diff --git a/graphics/PP_AIS.png b/graphics/PP_AIS.png new file mode 100644 index 000000000..1f9ab92f1 Binary files /dev/null and b/graphics/PP_AIS.png differ diff --git a/graphics/PP_CODETX.png b/graphics/PP_CODETX.png index e8f373583..220c53ac7 100644 Binary files a/graphics/PP_CODETX.png and b/graphics/PP_CODETX.png differ diff --git a/graphics/PP_ERT.png b/graphics/PP_ERT.png new file mode 100644 index 000000000..41e87b5fb Binary files /dev/null and b/graphics/PP_ERT.png differ diff --git a/graphics/PP_NORDIC.png b/graphics/PP_NORDIC.png new file mode 100644 index 000000000..9f067806e Binary files /dev/null and b/graphics/PP_NORDIC.png differ diff --git a/graphics/PP_TPMS.png b/graphics/PP_TPMS.png new file mode 100644 index 000000000..868d82bfe Binary files /dev/null and b/graphics/PP_TPMS.png differ