diff --git a/firmware/application/bitmap.hpp b/firmware/application/bitmap.hpp index d0e450b2..1b801caa 100644 --- a/firmware/application/bitmap.hpp +++ b/firmware/application/bitmap.hpp @@ -29,6 +29,351 @@ namespace ui { // Use firmware/tools/make_bitmap.py ! +static constexpr uint8_t bitmap_icon_adsb_data[] = { + 0x80, 0x01, + 0xC0, 0x03, + 0xC0, 0x03, + 0xC0, 0x03, + 0xC0, 0x03, + 0xE8, 0x17, + 0xFA, 0x5F, + 0xFE, 0x7F, + 0xFF, 0xFF, + 0xC7, 0xE3, + 0xC0, 0x03, + 0xC0, 0x03, + 0xC0, 0x03, + 0xE0, 0x07, + 0xF8, 0x1F, + 0x38, 0x1C, +}; + +static constexpr Bitmap bitmap_icon_adsb { + { 16, 16 }, bitmap_icon_adsb_data +}; + +static constexpr uint8_t bitmap_icon_bht_data[] = { + 0x00, 0x00, + 0xE0, 0x07, + 0xF8, 0x08, + 0x9C, 0x07, + 0x0C, 0x00, + 0x8E, 0x0A, + 0x46, 0x12, + 0x26, 0x22, + 0x06, 0x02, + 0x06, 0x00, + 0x06, 0x00, + 0x06, 0x00, + 0x06, 0x00, + 0x06, 0x00, + 0x06, 0x00, + 0x00, 0x00, +}; + +static constexpr Bitmap bitmap_icon_bht { + { 16, 16 }, bitmap_icon_bht_data +}; + +static constexpr uint8_t bitmap_icon_closecall_data[] = { + 0x00, 0x00, + 0x00, 0x10, + 0x00, 0x38, + 0x00, 0x7C, + 0x00, 0x00, + 0x3E, 0x00, + 0xE3, 0x00, + 0x80, 0x01, + 0x1C, 0x03, + 0x22, 0x02, + 0x41, 0x06, + 0x88, 0x04, + 0x9C, 0x04, + 0x88, 0x04, + 0x41, 0x06, + 0x22, 0x02, +}; + +static constexpr Bitmap bitmap_icon_closecall { + { 16, 16 }, bitmap_icon_closecall_data +}; + +static constexpr uint8_t bitmap_icon_foxhunt_data[] = { + 0x18, 0x18, + 0x28, 0x14, + 0x68, 0x16, + 0x68, 0x16, + 0xC8, 0x13, + 0x88, 0x11, + 0x04, 0x20, + 0x24, 0x24, + 0x22, 0x44, + 0x01, 0x80, + 0x06, 0x60, + 0x98, 0x19, + 0x20, 0x04, + 0x40, 0x02, + 0x80, 0x01, + 0x00, 0x00, +}; + +static constexpr Bitmap bitmap_icon_foxhunt { + { 16, 16 }, bitmap_icon_foxhunt_data +}; + +static constexpr uint8_t bitmap_icon_hackrf_data[] = { + 0x80, 0x00, + 0xC0, 0x01, + 0xE0, 0x03, + 0x80, 0x00, + 0x80, 0x0E, + 0x90, 0x0E, + 0xB8, 0x0E, + 0x90, 0x04, + 0x90, 0x02, + 0xA0, 0x01, + 0xC0, 0x00, + 0x80, 0x00, + 0xC0, 0x01, + 0xE0, 0x03, + 0xE0, 0x03, + 0xC0, 0x01, +}; + +static constexpr Bitmap bitmap_icon_hackrf { + { 16, 16 }, bitmap_icon_hackrf_data +}; + +static constexpr uint8_t bitmap_icon_jammer_data[] = { + 0xA6, 0x2C, + 0x73, 0x47, + 0x2E, 0xB9, + 0x55, 0xD7, + 0x7E, 0xAE, + 0xD3, 0x45, + 0xCA, 0xBA, + 0x71, 0x15, + 0xDA, 0xBE, + 0xF5, 0xAB, + 0xAD, 0x98, + 0x48, 0x77, + 0xAD, 0xCA, + 0x58, 0x7D, + 0xBF, 0xAF, + 0x5A, 0x65, +}; + +static constexpr Bitmap bitmap_icon_jammer { + { 16, 16 }, bitmap_icon_jammer_data +}; + +static constexpr uint8_t bitmap_icon_lcr_data[] = { + 0x0C, 0x00, + 0xFF, 0x7F, + 0x01, 0x80, + 0xC1, 0x9B, + 0xFF, 0x7F, + 0x0C, 0x00, + 0xFF, 0x7F, + 0x01, 0x80, + 0xC1, 0x9D, + 0xFF, 0x7F, + 0x0C, 0x00, + 0x0C, 0x00, + 0x0C, 0x00, + 0x0C, 0x00, + 0x0C, 0x00, + 0x0C, 0x00, +}; + +static constexpr Bitmap bitmap_icon_lcr { + { 16, 16 }, bitmap_icon_lcr_data +}; + +static constexpr uint8_t bitmap_icon_microphone_data[] = { + 0xC0, 0x03, + 0x60, 0x05, + 0xB0, 0x0A, + 0x50, 0x0D, + 0xB0, 0x0E, + 0x60, 0x05, + 0xE0, 0x07, + 0x20, 0x04, + 0x20, 0x04, + 0xE0, 0x04, + 0xE0, 0x04, + 0xC0, 0x02, + 0x40, 0x02, + 0x40, 0x02, + 0x40, 0x02, + 0xC0, 0x03, +}; + +static constexpr Bitmap bitmap_icon_microphone { + { 16, 16 }, bitmap_icon_microphone_data +}; + +static constexpr uint8_t bitmap_icon_morse_data[] = { + 0x00, 0x00, + 0x18, 0x00, + 0x18, 0x00, + 0x18, 0x00, + 0x0C, 0x00, + 0x0C, 0x00, + 0x0C, 0x00, + 0x0C, 0x1F, + 0x06, 0x1F, + 0x06, 0x00, + 0x66, 0xC0, + 0x66, 0xC0, + 0x03, 0x00, + 0x03, 0x00, + 0x03, 0x00, + 0x00, 0x00, +}; + +static constexpr Bitmap bitmap_icon_morse { + { 16, 16 }, bitmap_icon_morse_data +}; + +static constexpr uint8_t bitmap_icon_numbers_data[] = { + 0x00, 0x00, + 0x68, 0x1B, + 0x48, 0x09, + 0x48, 0x1A, + 0x48, 0x5B, + 0x08, 0x00, + 0x14, 0x00, + 0x1C, 0x00, + 0x14, 0x00, + 0x14, 0x00, + 0x1C, 0x00, + 0x14, 0x00, + 0x22, 0x00, + 0x3E, 0x00, + 0x22, 0x00, + 0x00, 0x00, +}; + +static constexpr Bitmap bitmap_icon_numbers { + { 16, 16 }, bitmap_icon_numbers_data +}; + +static constexpr uint8_t bitmap_icon_nuoptix_data[] = { + 0x80, 0x01, + 0x80, 0x01, + 0x40, 0x02, + 0x40, 0x1A, + 0x40, 0x1A, + 0x20, 0x0C, + 0x20, 0x0F, + 0x20, 0x1E, + 0x10, 0x0E, + 0x10, 0x0B, + 0x10, 0x0B, + 0xF8, 0x1F, + 0xF8, 0x1F, + 0xF8, 0x1F, + 0xFC, 0x3F, + 0xFC, 0x3F, +}; + +static constexpr Bitmap bitmap_icon_nuoptix { + { 16, 16 }, bitmap_icon_nuoptix_data +}; + +static constexpr uint8_t bitmap_icon_rds_data[] = { + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + 0x3C, 0x3C, + 0x7E, 0x7E, + 0x67, 0xE7, + 0x83, 0xC3, + 0xC7, 0xE1, + 0xFD, 0xBC, + 0x42, 0x42, + 0x3C, 0x3C, + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, +}; + +static constexpr Bitmap bitmap_icon_rds { + { 16, 16 }, bitmap_icon_rds_data +}; + +static constexpr uint8_t bitmap_icon_remote_data[] = { + 0x20, 0x00, + 0x20, 0x00, + 0x20, 0x00, + 0x20, 0x00, + 0xF0, 0x03, + 0x10, 0x04, + 0xD0, 0x08, + 0xD0, 0x08, + 0x10, 0x08, + 0xD0, 0x08, + 0xD0, 0x08, + 0x10, 0x08, + 0x10, 0x08, + 0x10, 0x08, + 0x10, 0x08, + 0xE0, 0x07, +}; + +static constexpr Bitmap bitmap_icon_remote { + { 16, 16 }, bitmap_icon_remote_data +}; + +static constexpr uint8_t bitmap_icon_soundboard_data[] = { + 0x00, 0x00, + 0xDE, 0x7B, + 0x63, 0x8C, + 0x21, 0x84, + 0x21, 0x84, + 0xDE, 0x7B, + 0x63, 0x8C, + 0x21, 0x84, + 0x21, 0x84, + 0xDE, 0x7B, + 0x63, 0x8C, + 0x21, 0x84, + 0x21, 0x84, + 0xDE, 0x7B, + 0x00, 0x00, + 0x00, 0x00, +}; + +static constexpr Bitmap bitmap_icon_soundboard { + { 16, 16 }, bitmap_icon_soundboard_data +}; + +static constexpr uint8_t bitmap_icon_whistle_data[] = { + 0x00, 0x00, + 0x60, 0x00, + 0xFC, 0x01, + 0xFF, 0x03, + 0xFF, 0x0F, + 0xF9, 0x11, + 0x66, 0x30, + 0x88, 0x3C, + 0x10, 0x7F, + 0x10, 0x7E, + 0x08, 0x7C, + 0x08, 0x7C, + 0x10, 0x3C, + 0x20, 0x0E, + 0xC0, 0x03, + 0x00, 0x00, +}; + +static constexpr Bitmap bitmap_icon_whistle { + { 16, 16 }, bitmap_icon_whistle_data +}; + static constexpr uint8_t bitmap_stealth_data[] = { 0x00, 0x00, 0x00, 0x00, diff --git a/firmware/application/main.cpp b/firmware/application/main.cpp index 3045d402..bbfd06a8 100755 --- a/firmware/application/main.cpp +++ b/firmware/application/main.cpp @@ -30,7 +30,6 @@ //TODO: Morse coder for foxhunts //TODO: Finish EPAR tx -//TODO: Test dual tone in proc_tones and remove proc_dtmf_tx //TODO: IQ replay //TODO: Waveform widget ? //TODO: Wav visualizer diff --git a/firmware/application/ui_debug.cpp b/firmware/application/ui_debug.cpp index 8d3df4e9..4dd1c189 100644 --- a/firmware/application/ui_debug.cpp +++ b/firmware/application/ui_debug.cpp @@ -248,19 +248,19 @@ void RegistersView::focus() { DebugPeripheralsMenuView::DebugPeripheralsMenuView(NavigationView& nav) { add_items<4>({ { - { "RFFC5072", ui::Color::white(), [&nav](){ nav.push( + { "RFFC5072", ui::Color::white(), nullptr, [&nav](){ nav.push( "RFFC5072", RegistersWidgetConfig { 31, 2, 4, 4 }, [](const size_t register_number) { return radio::debug::first_if::register_read(register_number); } ); } }, - { "MAX2837", ui::Color::white(), [&nav](){ nav.push( + { "MAX2837", ui::Color::white(), nullptr, [&nav](){ nav.push( "MAX2837", RegistersWidgetConfig { 32, 2, 3, 4 }, [](const size_t register_number) { return radio::debug::second_if::register_read(register_number); } ); } }, - { "Si5351C", ui::Color::white(), [&nav](){ nav.push( + { "Si5351C", ui::Color::white(), nullptr, [&nav](){ nav.push( "Si5351C", RegistersWidgetConfig { 96, 2, 2, 8 }, [](const size_t register_number) { return portapack::clock_generator.read_register(register_number); } ); } }, - { "WM8731",ui::Color::white(), [&nav](){ nav.push( + { "WM8731",ui::Color::white(), nullptr, [&nav](){ nav.push( "WM8731", RegistersWidgetConfig { audio::debug::reg_count(), 1, 3, 4 }, [](const size_t register_number) { return audio::debug::reg_read(register_number); } ); } }, @@ -272,11 +272,11 @@ DebugPeripheralsMenuView::DebugPeripheralsMenuView(NavigationView& nav) { DebugMenuView::DebugMenuView(NavigationView& nav) { add_items<5>({ { - { "Memory", ui::Color::white(), [&nav](){ nav.push(); } }, - { "Radio State", ui::Color::white(), [&nav](){ nav.push(); } }, - { "SD Card", ui::Color::white(), [&nav](){ nav.push(); } }, - { "Peripherals", ui::Color::white(), [&nav](){ nav.push(); } }, - { "Temperature", ui::Color::white(), [&nav](){ nav.push(); } }, + { "Memory", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + { "Radio State", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + { "SD Card", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + { "Peripherals", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + { "Temperature", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, } }); on_left = [&nav](){ nav.pop(); }; } diff --git a/firmware/application/ui_freqman.cpp b/firmware/application/ui_freqman.cpp index 775198aa..3a8d1eda 100644 --- a/firmware/application/ui_freqman.cpp +++ b/firmware/application/ui_freqman.cpp @@ -101,7 +101,7 @@ void FrequencyLoadView::setup_list() { menu_view.clear(); for (n = 0; n < frequencies.size(); n++) { - menu_view.add_item({ freqman_item_string(frequencies[n]), ui::Color::white(), [this](){ on_frequency_select(); } }); + menu_view.add_item({ freqman_item_string(frequencies[n]), ui::Color::white(), nullptr, [this](){ on_frequency_select(); } }); } menu_view.set_parent_rect({ 0, 0, 240, 216 }); @@ -168,7 +168,7 @@ void FreqManView::setup_list() { menu_view.clear(); for (n = 0; n < frequencies.size(); n++) { - menu_view.add_item({ freqman_item_string(frequencies[n]), ui::Color::white(), [this](){ on_frequency_select(); } }); + menu_view.add_item({ freqman_item_string(frequencies[n]), ui::Color::white(), nullptr, [this](){ on_frequency_select(); } }); } menu_view.set_parent_rect({ 0, 0, 240, 168 }); diff --git a/firmware/application/ui_menu.cpp b/firmware/application/ui_menu.cpp index 9054cf44..8731da7f 100644 --- a/firmware/application/ui_menu.cpp +++ b/firmware/application/ui_menu.cpp @@ -59,6 +59,15 @@ void MenuItemView::paint(Painter& painter) { r, final_bg_color ); + + if (item.bitmap) { + painter.draw_bitmap( + { r.pos.x + 4, r.pos.y + 4 }, + *item.bitmap, + final_item_color, + final_bg_color + ); + } Style text_style { .font = paint_style.font, @@ -67,7 +76,7 @@ void MenuItemView::paint(Painter& painter) { }; painter.draw_string( - { r.pos.x + 8, r.pos.y + (r.size.h - font_height) / 2 }, + { r.pos.x + 26, r.pos.y + (r.size.h - font_height) / 2 }, text_style, item.text ); diff --git a/firmware/application/ui_menu.hpp b/firmware/application/ui_menu.hpp index 3355a879..10e77176 100644 --- a/firmware/application/ui_menu.hpp +++ b/firmware/application/ui_menu.hpp @@ -38,6 +38,7 @@ namespace ui { struct MenuItem { std::string text; ui::Color color; + const Bitmap* bitmap; std::function on_select; // TODO: Prevent default-constructed MenuItems. diff --git a/firmware/application/ui_morse.cpp b/firmware/application/ui_morse.cpp index 04bf3307..83dd5613 100644 --- a/firmware/application/ui_morse.cpp +++ b/firmware/application/ui_morse.cpp @@ -107,6 +107,7 @@ MorseView::MorseView( ) { add_children({ { + &checkbox_foxhunt, &options_foxhunt, &button_transmit, &button_exit diff --git a/firmware/application/ui_morse.hpp b/firmware/application/ui_morse.hpp index a9ce4b7d..aebf709a 100644 --- a/firmware/application/ui_morse.hpp +++ b/firmware/application/ui_morse.hpp @@ -28,8 +28,8 @@ #include "message.hpp" #include "volume.hpp" #include "audio.hpp" -#include "transmitter_model.hpp" -//#include "receiver_model.hpp" +//#include "transmitter_model.hpp" +#include "receiver_model.hpp" #include "portapack.hpp" #define MORSE_TONE_DELTA ((1536000 / 800) - 1) // 1536000/800 @@ -56,17 +56,17 @@ private: void generate_message(char * text); const char foxhunt_codes[11][3] = { - { 'M', 'O', 'E' }, - { 'M', 'O', 'I' }, - { 'M', 'O', 'S' }, - { 'M', 'O', 'H' }, - { 'M', 'O', '5' }, - { 'M', 'O', 'N' }, - { 'M', 'O', 'D' }, - { 'M', 'O', 'B' }, - { 'M', 'O', '6' }, - { 'M', 'O', 0 }, - { 'S', 0, 0 } + { 'M', 'O', 'E' }, // -----. + { 'M', 'O', 'I' }, // -----.. + { 'M', 'O', 'S' }, // -----... + { 'M', 'O', 'H' }, // -----.... + { 'M', 'O', '5' }, // -----..... + { 'M', 'O', 'N' }, // ------. + { 'M', 'O', 'D' }, // ------.. + { 'M', 'O', 'B' }, // ------... + { 'M', 'O', '6' }, // ------.... + { 'M', 'O', 0 }, // ----- + { 'S', 0, 0 } // ... }; // 0=dot 1=dash @@ -155,8 +155,18 @@ private: 0b0001100000000101, // : 00010---- 0101 }; + /*Text text_status { + { 172, 196, 64, 16 }, + "Foxhunt code:" + };*/ + + Checkbox checkbox_foxhunt { + { 4 * 8, 24 }, + 8, + "Foxhunt:" + }; OptionsField options_foxhunt { - { 4 * 8, 32 }, + { 18 * 8, 32 }, 7, { { "0 (MOE)", 0 }, @@ -173,24 +183,13 @@ private: } }; - Text text_status { - { 172, 196, 64, 16 }, - "Ready" - }; - - Checkbox checkbox_am_a { - { 2 * 8, 68 }, - 4, - "TEST" - }; - Button button_transmit { - { 24, 270, 48, 32 }, + { 24, 260, 64, 32 }, "TX" }; Button button_exit { - { 176, 270, 48, 32 }, + { 160, 260, 64, 32 }, "Exit" }; }; diff --git a/firmware/application/ui_navigation.cpp b/firmware/application/ui_navigation.cpp index fe036560..d68d43b1 100644 --- a/firmware/application/ui_navigation.cpp +++ b/firmware/application/ui_navigation.cpp @@ -264,10 +264,10 @@ void NavigationView::focus() { TranspondersMenuView::TranspondersMenuView(NavigationView& nav) { add_items<4>({ { - { "ADS-B: Planes", ui::Color::grey(), [&nav](){ nav.push(); } }, - { "AIS: Boats", ui::Color::white(), [&nav](){ nav.push(); } }, - { "ERT: Utility Meters", ui::Color::white(), [&nav](){ nav.push(); } }, - { "TPMS: Cars", ui::Color::white(), [&nav](){ nav.push(); } }, + { "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(); } }, } }); on_left = [&nav](){ nav.pop(); }; } @@ -276,13 +276,13 @@ TranspondersMenuView::TranspondersMenuView(NavigationView& nav) { ReceiverMenuView::ReceiverMenuView(NavigationView& nav) { add_items<6>({ { - // { "AFSK", ui::Color::grey(), [&nav](){ nav.push(); } }, // AFSKRXView - { "Audio", ui::Color::green(), [&nav](){ nav.push(); } }, - { "CCIR", ui::Color::grey(), [&nav](){ nav.push(); } }, - { "Nordic/BTLE", ui::Color::grey(), [&nav](){ nav.push(); } }, - { "POCSAG 1200", ui::Color::cyan(), [&nav](){ nav.push(); } }, - { "SIGFOX", ui::Color::grey(), [&nav](){ nav.push(); } }, // SIGFRXView - { "Transponders", ui::Color::green(), [&nav](){ nav.push(); } }, + // { "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(); } }, + { "POCSAG 1200", ui::Color::cyan(), nullptr, [&nav](){ nav.push(); } }, + { "SIGFOX", ui::Color::grey(), nullptr, [&nav](){ nav.push(); } }, // SIGFRXView + { "Transponders", ui::Color::green(), nullptr, [&nav](){ nav.push(); } }, } }); on_left = [&nav](){ nav.pop(); }; } @@ -291,13 +291,13 @@ ReceiverMenuView::ReceiverMenuView(NavigationView& nav) { TransmitterCodedMenuView::TransmitterCodedMenuView(NavigationView& nav) { add_items<7>({ { - { "ADS-B Mode S", ui::Color::orange(), [&nav](){ nav.push(); } }, - { "BHT Xy/EP", ui::Color::yellow(), [&nav](){ nav.push(); } }, - { "Morse beacon", ui::Color::yellow(), [&nav](){ nav.push(); } }, - { "Nuoptix DTMF timecode", ui::Color::green(), [&nav](){ nav.push(); } }, - { "OOK remote encoders", ui::Color::green(), [&nav](){ nav.push(); } }, - { "RDS", ui::Color::green(), [&nav](){ nav.push(); } }, - { "TEDI/LCR AFSK", ui::Color::green(), [&nav](){ nav.push(); } }, + { "ADS-B Mode S", ui::Color::orange(),&bitmap_icon_adsb, [&nav](){ nav.push(); } }, + { "BHT Xy/EP", ui::Color::yellow(),&bitmap_icon_bht, [&nav](){ nav.push(); } }, + { "Morse beacon", ui::Color::yellow(),&bitmap_icon_morse, [&nav](){ nav.push(); } }, + { "Nuoptix DTMF timecode", ui::Color::green(), &bitmap_icon_nuoptix, [&nav](){ nav.push(); } }, + { "OOK remote encoders", ui::Color::green(), &bitmap_icon_remote, [&nav](){ nav.push(); } }, + { "RDS", ui::Color::green(), &bitmap_icon_rds, [&nav](){ nav.push(); } }, + { "TEDI/LCR AFSK", ui::Color::green(), &bitmap_icon_lcr, [&nav](){ nav.push(); } }, } }); on_left = [&nav](){ nav.pop(); }; } @@ -306,10 +306,10 @@ TransmitterCodedMenuView::TransmitterCodedMenuView(NavigationView& nav) { TransmitterAudioMenuView::TransmitterAudioMenuView(NavigationView& nav) { add_items<4>({ { - { "Soundboard", ui::Color::green(), [&nav](){ nav.push(); } }, - { "Numbers station", ui::Color::green(), [&nav](){ nav.push(); } }, - { "Microphone", ui::Color::grey(), [&nav](){ nav.push(); } }, - { "Whistle", ui::Color::yellow(), [&nav](){ nav.push(); } }, + { "Soundboard", ui::Color::green(), &bitmap_icon_soundboard, [&nav](){ nav.push(); } }, + { "Numbers station", ui::Color::green(), &bitmap_icon_numbers, [&nav](){ nav.push(); } }, + { "Microphone", ui::Color::grey(), &bitmap_icon_microphone, [&nav](){ nav.push(); } }, + { "Whistle", ui::Color::yellow(),&bitmap_icon_whistle, [&nav](){ nav.push(); } }, } }); on_left = [&nav](){ nav.pop(); }; } @@ -318,9 +318,9 @@ TransmitterAudioMenuView::TransmitterAudioMenuView(NavigationView& nav) { UtilitiesView::UtilitiesView(NavigationView& nav) { add_items<3>({ { - { "Frequency manager", ui::Color::red(), [&nav](){ nav.push(); } }, - { "Whip antenna length", ui::Color::green(), [&nav](){ nav.push(); } }, - { "Notepad", ui::Color::grey(), [&nav](){ nav.push(); } }, + { "Frequency manager", ui::Color::red(), nullptr, [&nav](){ nav.push(); } }, + { "Whip antenna length", ui::Color::green(), nullptr, [&nav](){ nav.push(); } }, + { "Notepad", ui::Color::grey(), nullptr, [&nav](){ nav.push(); } }, } }); on_left = [&nav](){ nav.pop(); }; } @@ -338,19 +338,19 @@ void SystemMenuView::hackrf_mode(NavigationView& nav) { SystemMenuView::SystemMenuView(NavigationView& nav) { add_items<11>({ { - { "Play dead", ui::Color::red(), [&nav](){ nav.push(); } }, - { "Receivers", ui::Color::cyan(), [&nav](){ nav.push(); } }, - { "Capture", ui::Color::cyan(), [&nav](){ nav.push(); } }, - { "Code transmitters", ui::Color::green(), [&nav](){ nav.push(); } }, - { "Audio transmitters", ui::Color::green(), [&nav](){ nav.push(); } }, - { "Close Call", ui::Color::orange(), [&nav](){ nav.push(); } }, - { "Jammer", ui::Color::orange(), [&nav](){ nav.push(); } }, - { "Utilities", ui::Color::purple(), [&nav](){ nav.push(); } }, + { "Play dead", ui::Color::red(), nullptr, [&nav](){ nav.push(); } }, + { "Receivers", ui::Color::cyan(), nullptr, [&nav](){ nav.push(); } }, + { "Capture", ui::Color::cyan(), nullptr, [&nav](){ nav.push(); } }, + { "Code transmitters", ui::Color::green(), nullptr, [&nav](){ nav.push(); } }, + { "Audio transmitters", ui::Color::green(), nullptr, [&nav](){ nav.push(); } }, + { "Close Call", ui::Color::orange(),&bitmap_icon_closecall, [&nav](){ nav.push(); } }, + { "Jammer", ui::Color::orange(),&bitmap_icon_jammer, [&nav](){ nav.push(); } }, + { "Utilities", ui::Color::purple(),nullptr, [&nav](){ nav.push(); } }, //{ "Analyze", ui::Color::white(), [&nav](){ nav.push(); } }, - { "Setup", ui::Color::white(), [&nav](){ nav.push(); } }, + { "Setup", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, //{ "Debug", ui::Color::white(), [&nav](){ nav.push(); } }, - { "HackRF mode", ui::Color::white(), [this, &nav](){ hackrf_mode(nav); } }, - { "About", ui::Color::white(), [&nav](){ nav.push(); } } + { "HackRF mode", ui::Color::white(), &bitmap_icon_hackrf, [this, &nav](){ hackrf_mode(nav); } }, + { "About", ui::Color::white(), nullptr, [&nav](){ nav.push(); } } } }); set_highlighted(1); // Startup selection is "Receivers" diff --git a/firmware/application/ui_setup.cpp b/firmware/application/ui_setup.cpp index fa9640d1..928949d1 100644 --- a/firmware/application/ui_setup.cpp +++ b/firmware/application/ui_setup.cpp @@ -446,13 +446,13 @@ void ModInfoView::focus() { SetupMenuView::SetupMenuView(NavigationView& nav) { add_items<6>({ { - { "UI", ui::Color::white(), [&nav](){ nav.push(); } }, + { "UI", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, //{ "SD card modules", ui::Color::white(), [&nav](){ nav.push(); } }, - { "Date/Time", ui::Color::white(), [&nav](){ nav.push(); } }, - { "Frequency correction", ui::Color::white(), [&nav](){ nav.push(); } }, - { "Antenna Bias Voltage", ui::Color::white(), [&nav](){ nav.push(); } }, - { "Touch screen", ui::Color::white(), [&nav](){ nav.push(); } }, - { "Play dead", ui::Color::red(), [&nav](){ nav.push(); } } + { "Date/Time", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + { "Frequency correction", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + { "Antenna Bias Voltage", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + { "Touch screen", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, + { "Play dead", ui::Color::red(), nullptr, [&nav](){ nav.push(); } } } }); on_left = [&nav](){ nav.pop(); }; } diff --git a/firmware/portapack-h1-havoc.bin b/firmware/portapack-h1-havoc.bin index 81958a17..6b2d6b3e 100644 Binary files a/firmware/portapack-h1-havoc.bin and b/firmware/portapack-h1-havoc.bin differ diff --git a/graphics/PP_ADSB.png b/graphics/PP_ADSB.png new file mode 100644 index 00000000..6445b0f0 Binary files /dev/null and b/graphics/PP_ADSB.png differ diff --git a/graphics/PP_BHT.png b/graphics/PP_BHT.png new file mode 100644 index 00000000..e6aeb882 Binary files /dev/null and b/graphics/PP_BHT.png differ diff --git a/graphics/PP_CLOSECALL.png b/graphics/PP_CLOSECALL.png new file mode 100644 index 00000000..1f5be0a3 Binary files /dev/null and b/graphics/PP_CLOSECALL.png differ diff --git a/graphics/PP_FOXHUNT.png b/graphics/PP_FOXHUNT.png new file mode 100644 index 00000000..574d11c9 Binary files /dev/null and b/graphics/PP_FOXHUNT.png differ diff --git a/graphics/PP_HACKRF.png b/graphics/PP_HACKRF.png new file mode 100644 index 00000000..edd9da99 Binary files /dev/null and b/graphics/PP_HACKRF.png differ diff --git a/graphics/PP_JAMMER.png b/graphics/PP_JAMMER.png new file mode 100644 index 00000000..99c42627 Binary files /dev/null and b/graphics/PP_JAMMER.png differ diff --git a/graphics/PP_LCR.png b/graphics/PP_LCR.png new file mode 100644 index 00000000..a7769c3e Binary files /dev/null and b/graphics/PP_LCR.png differ diff --git a/graphics/PP_MICROPHONE.png b/graphics/PP_MICROPHONE.png new file mode 100644 index 00000000..c3b2fd0a Binary files /dev/null and b/graphics/PP_MICROPHONE.png differ diff --git a/graphics/PP_MORSE.png b/graphics/PP_MORSE.png new file mode 100644 index 00000000..7b49fbee Binary files /dev/null and b/graphics/PP_MORSE.png differ diff --git a/graphics/PP_NUMBERS.png b/graphics/PP_NUMBERS.png new file mode 100644 index 00000000..48853db6 Binary files /dev/null and b/graphics/PP_NUMBERS.png differ diff --git a/graphics/PP_NUOPTIX.png b/graphics/PP_NUOPTIX.png new file mode 100644 index 00000000..9dbf6e11 Binary files /dev/null and b/graphics/PP_NUOPTIX.png differ diff --git a/graphics/PP_RDS.png b/graphics/PP_RDS.png new file mode 100644 index 00000000..d89f67f0 Binary files /dev/null and b/graphics/PP_RDS.png differ diff --git a/graphics/PP_REMOTE.png b/graphics/PP_REMOTE.png new file mode 100644 index 00000000..aeb8ddf5 Binary files /dev/null and b/graphics/PP_REMOTE.png differ diff --git a/graphics/PP_SOUNDBOARD.png b/graphics/PP_SOUNDBOARD.png new file mode 100644 index 00000000..c732b776 Binary files /dev/null and b/graphics/PP_SOUNDBOARD.png differ diff --git a/graphics/PP_WHISTLE.png b/graphics/PP_WHISTLE.png new file mode 100644 index 00000000..f74f2f25 Binary files /dev/null and b/graphics/PP_WHISTLE.png differ