From 4dd73d201b2eb36954a206ac03000a09a4bb0cda Mon Sep 17 00:00:00 2001 From: Gregory Fenton Date: Wed, 3 Jun 2020 12:38:05 +0100 Subject: [PATCH 1/4] Fix disappearing icons Icons disappear when they are rolled over using the jog wheel and the colour is set to ui::color::white() Fixed by changing the colours of the icons to something other than ui::color::white() --- firmware/application/apps/ui_debug.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/firmware/application/apps/ui_debug.cpp b/firmware/application/apps/ui_debug.cpp index d409cd295..25b9885ab 100644 --- a/firmware/application/apps/ui_debug.cpp +++ b/firmware/application/apps/ui_debug.cpp @@ -346,12 +346,12 @@ DebugPeripheralsMenuView::DebugPeripheralsMenuView(NavigationView& nav) { DebugMenuView::DebugMenuView(NavigationView& nav) { add_items({ //{ "..", ui::Color::light_grey(),&bitmap_icon_previous, [&nav](){ nav.pop(); } }, - { "Memory", ui::Color::white(), &bitmap_icon_soundboard, [&nav](){ nav.push(); } }, + { "Memory", ui::Color::green(), &bitmap_icon_soundboard, [&nav](){ nav.push(); } }, //{ "Radio State", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, - { "SD Card", ui::Color::white(), &bitmap_icon_file, [&nav](){ nav.push(); } }, - { "Peripherals", ui::Color::white(), &bitmap_icon_debug, [&nav](){ nav.push(); } }, - { "Temperature", ui::Color::white(), &bitmap_icon_transmit, [&nav](){ nav.push(); } }, - { "Controls", ui::Color::white(), &bitmap_icon_utilities, [&nav](){ nav.push(); } }, + { "SD Card", ui::Color::black(), &bitmap_icon_file, [&nav](){ nav.push(); } }, + { "Peripherals", ui::Color::green(), &bitmap_icon_debug, [&nav](){ nav.push(); } }, + { "Temperature", ui::Color::green(), &bitmap_icon_transmit, [&nav](){ nav.push(); } }, + { "Controls", ui::Color::black(), &bitmap_icon_utilities, [&nav](){ nav.push(); } }, }); set_max_rows(2); // allow wider buttons } From 853912733e8033825c556491f3814323872ac188 Mon Sep 17 00:00:00 2001 From: Gregory Fenton Date: Wed, 3 Jun 2020 18:26:24 +0100 Subject: [PATCH 2/4] Add debug menu icons --- firmware/application/bitmap.hpp | 109 ++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/firmware/application/bitmap.hpp b/firmware/application/bitmap.hpp index 13477161f..f3a84464d 100644 --- a/firmware/application/bitmap.hpp +++ b/firmware/application/bitmap.hpp @@ -2147,6 +2147,115 @@ static constexpr Bitmap bitmap_target_verify { { 32, 32 }, bitmap_target_verify_data }; +static constexpr uint8_t bitmap_icon_sd_card[] = { + 0x00, 0x00, // 0000000000000000 + 0xF8, 0x3F, // 0011111111111000 + 0x04, 0x20, // 0010000000000100 + 0x42, 0x31, // 0011000101000010 + 0x42, 0x31, // 0011000101000010 + 0x82, 0x11, // 0001000110000010 + 0x02, 0x11, // 0001000100000010 + 0x02, 0x31, // 0011000100000010 + 0x02, 0x20, // 0010000000000010 + 0x62, 0x23, // 0010001101100010 + 0x52, 0x24, // 0010010001010010 + 0x52, 0x22, // 0010001001010010 + 0x52, 0x21, // 0010000101010010 + 0x62, 0x26, // 0010011001100010 + 0x02, 0x20, // 0010000000000010 + 0xFE, 0x3F, // 0011111111111110 + }; +static constexpr Bitmap bitmap_icon_sd_card { + { 16, 16 }, bitmap_icon_sd_card_data +}; + +static constexpr uint8_t bitmap_icon_memory[] = { + 0x00, 0x00, // 0000000000000000 + 0x70, 0x0E, // 0000111001110000 + 0x9E, 0x79, // 0111100110011110 + 0x10, 0x08, // 0000100000010000 + 0x5E, 0x7A, // 0111101001011110 + 0x50, 0x0D, // 0000110101010000 + 0x5E, 0x7D, // 0111110101011110 + 0x50, 0x0D, // 0000110101010000 + 0x5E, 0x7A, // 0111101001011110 + 0x10, 0x08, // 0000100000010000 + 0x5E, 0x7A, // 0111101001011110 + 0xB0, 0x0A, // 0000101010110000 + 0xBE, 0x7A, // 0111101010111110 + 0xB0, 0x0A, // 0000101010110000 + 0x5E, 0x7A, // 0111101001011110 + 0xF0, 0x0F, // 0000111111110000 + }; +static constexpr Bitmap bitmap_icon_memory_data { + { 16, 16 }, bitmap_icon_memory +}; + +static constexpr uint8_t bitmap_icon_peripherals[] = { + 0x00, 0x00, // 0000000000000000 + 0x00, 0x7E, // 0111111000000000 + 0x50, 0x63, // 0110001101010000 + 0x00, 0x42, // 0100001000000000 + 0x10, 0x42, // 0100001000010000 + 0x7E, 0x42, // 0100001001111110 + 0x62, 0x7E, // 0111111001100010 + 0x42, 0x08, // 0000100001000010 + 0x42, 0x00, // 0000000001000010 + 0x42, 0x08, // 0000100001000010 + 0x7E, 0x7E, // 0111111001111110 + 0x10, 0x62, // 0110001000010000 + 0x00, 0x42, // 0100001000000000 + 0x50, 0x43, // 0100001101010000 + 0x00, 0x42, // 0100001000000000 + 0x00, 0x7E, // 0111111000000000 + }; +static constexpr Bitmap bitmap_icon_peripherals_data { + { 16, 16 }, bitmap_icon_peripherals +}; + +static constexpr uint8_t bitmap_icon_temperature[] = { + 0x00, 0x00, // 0000000000000000 + 0x0C, 0x23, // 0010001100001100 + 0x12, 0x54, // 0101010000010010 + 0x2A, 0x24, // 0010010000101010 + 0x44, 0x03, // 0000001101000100 + 0xA8, 0x00, // 0000000010101000 + 0x10, 0x01, // 0000000100010000 + 0xA0, 0x02, // 0000001010100000 + 0x40, 0x04, // 0000010001000000 + 0x80, 0x0A, // 0000101010000000 + 0x00, 0x11, // 0001000100000000 + 0x4E, 0x2A, // 0010101001001110 + 0xA8, 0x74, // 0111010010101000 + 0x4C, 0x78, // 0111100001001100 + 0x08, 0x30, // 0011000000001000 + 0x00, 0x00, // 0000000000000000 + }; +static constexpr Bitmap bitmap_icon_temperature_data { + { 16, 16 }, bitmap_icon_temperature +}; + +static constexpr uint8_t bitmap_icon_controls[] = { + 0x00, 0x00, // 0000000000000000 + 0xC0, 0x07, // 0000011111000000 + 0x30, 0x19, // 0001100100110000 + 0x88, 0x22, // 0010001010001000 + 0xC4, 0x47, // 0100011111000100 + 0x04, 0x40, // 0100000000000100 + 0x12, 0x90, // 1001000000010010 + 0x1A, 0xB1, // 1011000100011010 + 0x96, 0xD3, // 1101001110010110 + 0x1A, 0xB1, // 1011000100011010 + 0x12, 0x90, // 1001000000010010 + 0x04, 0x40, // 0100000000000100 + 0xC4, 0x47, // 0100011111000100 + 0x88, 0x22, // 0010001010001000 + 0x30, 0x19, // 0001100100110000 + 0xC0, 0x07, // 0000011111000000 + }; +static constexpr Bitmap bitmap_icon_controls_data { + { 16, 16 }, bitmap_icon_controls +}; } /* namespace ui */ From d7f3539cd96ff15eeb4bc4774f079105ecab95b8 Mon Sep 17 00:00:00 2001 From: Gregory Fenton Date: Wed, 3 Jun 2020 18:32:12 +0100 Subject: [PATCH 3/4] Testing new debug icons --- firmware/application/apps/ui_debug.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/firmware/application/apps/ui_debug.cpp b/firmware/application/apps/ui_debug.cpp index 25b9885ab..3f71d6354 100644 --- a/firmware/application/apps/ui_debug.cpp +++ b/firmware/application/apps/ui_debug.cpp @@ -346,12 +346,12 @@ DebugPeripheralsMenuView::DebugPeripheralsMenuView(NavigationView& nav) { DebugMenuView::DebugMenuView(NavigationView& nav) { add_items({ //{ "..", ui::Color::light_grey(),&bitmap_icon_previous, [&nav](){ nav.pop(); } }, - { "Memory", ui::Color::green(), &bitmap_icon_soundboard, [&nav](){ nav.push(); } }, + { "Memory", ui::Color::green(), &bitmap_icon_memory, [&nav](){ nav.push(); } }, //{ "Radio State", ui::Color::white(), nullptr, [&nav](){ nav.push(); } }, - { "SD Card", ui::Color::black(), &bitmap_icon_file, [&nav](){ nav.push(); } }, - { "Peripherals", ui::Color::green(), &bitmap_icon_debug, [&nav](){ nav.push(); } }, - { "Temperature", ui::Color::green(), &bitmap_icon_transmit, [&nav](){ nav.push(); } }, - { "Controls", ui::Color::black(), &bitmap_icon_utilities, [&nav](){ nav.push(); } }, + { "SD Card", ui::Color::black(), &bitmap_icon_sd_card, [&nav](){ nav.push(); } }, + { "Peripherals", ui::Color::green(), &bitmap_icon_peripherals, [&nav](){ nav.push(); } }, + { "Temperature", ui::Color::green(), &bitmap_icon_temperature, [&nav](){ nav.push(); } }, + { "Controls", ui::Color::black(), &bitmap_icon_controls, [&nav](){ nav.push(); } }, }); set_max_rows(2); // allow wider buttons } From eb3b7ac585b714bc0ddcfd86e6bcbcfc2491712b Mon Sep 17 00:00:00 2001 From: Gregory Fenton Date: Wed, 3 Jun 2020 18:35:56 +0100 Subject: [PATCH 4/4] Weird characters appeared in hpp file, removed --- firmware/application/bitmap.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/firmware/application/bitmap.hpp b/firmware/application/bitmap.hpp index f3a84464d..40ad50b3e 100644 --- a/firmware/application/bitmap.hpp +++ b/firmware/application/bitmap.hpp @@ -2164,7 +2164,7 @@ static constexpr uint8_t bitmap_icon_sd_card[] = { 0x62, 0x26, // 0010011001100010 0x02, 0x20, // 0010000000000010 0xFE, 0x3F, // 0011111111111110 - }; +}; static constexpr Bitmap bitmap_icon_sd_card { { 16, 16 }, bitmap_icon_sd_card_data }; @@ -2186,7 +2186,7 @@ static constexpr uint8_t bitmap_icon_memory[] = { 0xB0, 0x0A, // 0000101010110000 0x5E, 0x7A, // 0111101001011110 0xF0, 0x0F, // 0000111111110000 - }; +}; static constexpr Bitmap bitmap_icon_memory_data { { 16, 16 }, bitmap_icon_memory }; @@ -2208,7 +2208,7 @@ static constexpr uint8_t bitmap_icon_peripherals[] = { 0x50, 0x43, // 0100001101010000 0x00, 0x42, // 0100001000000000 0x00, 0x7E, // 0111111000000000 - }; +}; static constexpr Bitmap bitmap_icon_peripherals_data { { 16, 16 }, bitmap_icon_peripherals }; @@ -2230,7 +2230,7 @@ static constexpr uint8_t bitmap_icon_temperature[] = { 0x4C, 0x78, // 0111100001001100 0x08, 0x30, // 0011000000001000 0x00, 0x00, // 0000000000000000 - }; +}; static constexpr Bitmap bitmap_icon_temperature_data { { 16, 16 }, bitmap_icon_temperature }; @@ -2252,7 +2252,7 @@ static constexpr uint8_t bitmap_icon_controls[] = { 0x88, 0x22, // 0010001010001000 0x30, 0x19, // 0001100100110000 0xC0, 0x07, // 0000011111000000 - }; +}; static constexpr Bitmap bitmap_icon_controls_data { { 16, 16 }, bitmap_icon_controls };