From a1a417d94bcfe59c99827a19cdf8128fcc06388f Mon Sep 17 00:00:00 2001
From: Erwin Ried <1091420+eried@users.noreply.github.com>
Date: Wed, 3 Jun 2020 21:37:08 +0200
Subject: [PATCH] Icons for debug app

---
 firmware/application/apps/ui_debug.cpp |  10 +-
 firmware/application/bitmap.hpp        | 219 +++++++++++++------------
 firmware/graphics/icon_controls.png    | Bin 0 -> 144 bytes
 firmware/graphics/icon_memory.png      | Bin 0 -> 168 bytes
 firmware/graphics/icon_peripherals.png | Bin 0 -> 198 bytes
 firmware/graphics/icon_sdcard.png      | Bin 0 -> 132 bytes
 firmware/graphics/icon_temperature.png | Bin 0 -> 189 bytes
 7 files changed, 115 insertions(+), 114 deletions(-)
 create mode 100644 firmware/graphics/icon_controls.png
 create mode 100644 firmware/graphics/icon_memory.png
 create mode 100644 firmware/graphics/icon_peripherals.png
 create mode 100644 firmware/graphics/icon_sdcard.png
 create mode 100644 firmware/graphics/icon_temperature.png

diff --git a/firmware/application/apps/ui_debug.cpp b/firmware/application/apps/ui_debug.cpp
index 3f71d635..3b5319a3 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_memory,	[&nav](){ nav.push<DebugMemoryView>(); } },
+		{ "Memory", 		ui::Color::cyan(),	&bitmap_icon_memory,	[&nav](){ nav.push<DebugMemoryView>(); } },
 		//{ "Radio State",	ui::Color::white(),	nullptr,	[&nav](){ nav.push<NotImplementedView>(); } },
-		{ "SD Card",		ui::Color::black(),	&bitmap_icon_sd_card,	[&nav](){ nav.push<SDCardDebugView>(); } },
-		{ "Peripherals",	ui::Color::green(),	&bitmap_icon_peripherals,	[&nav](){ nav.push<DebugPeripheralsMenuView>(); } },
-		{ "Temperature",	ui::Color::green(),	&bitmap_icon_temperature,	[&nav](){ nav.push<TemperatureView>(); } },
-		{ "Controls",		ui::Color::black(),	&bitmap_icon_controls,	[&nav](){ nav.push<DebugControlsView>(); } },
+		{ "SD Card",		ui::Color::cyan(),	&bitmap_icon_sdcard,	[&nav](){ nav.push<SDCardDebugView>(); } },
+		{ "Peripherals",	ui::Color::cyan(),	&bitmap_icon_peripherals,	[&nav](){ nav.push<DebugPeripheralsMenuView>(); } },
+		{ "Temperature",	ui::Color::cyan(),	&bitmap_icon_temperature,	[&nav](){ nav.push<TemperatureView>(); } },
+		{ "Controls",		ui::Color::cyan(),	&bitmap_icon_controls,	[&nav](){ nav.push<DebugControlsView>(); } },
 	});
 	set_max_rows(2); // allow wider buttons
 }
diff --git a/firmware/application/bitmap.hpp b/firmware/application/bitmap.hpp
index 40ad50b3..33b68b11 100644
--- a/firmware/application/bitmap.hpp
+++ b/firmware/application/bitmap.hpp
@@ -427,6 +427,28 @@ static constexpr Bitmap bitmap_icon_codetx {
 	{ 16, 16 }, bitmap_icon_codetx_data
 };
 
+static constexpr uint8_t bitmap_icon_controls_data[] = {
+	0x8C, 0x31, 
+	0x5A, 0x6B, 
+	0xDE, 0x7B, 
+	0x8C, 0x31, 
+	0x00, 0x00, 
+	0x8C, 0x31, 
+	0x5A, 0x7B, 
+	0xDE, 0x7B, 
+	0x8C, 0x31, 
+	0x00, 0x00, 
+	0x8C, 0x31, 
+	0xDA, 0x7B, 
+	0xDE, 0x7B, 
+	0x8C, 0x31, 
+	0x00, 0x00, 
+	0x00, 0x00, 
+};
+static constexpr Bitmap bitmap_icon_controls {
+	{ 16, 16 }, bitmap_icon_controls_data
+};
+
 static constexpr uint8_t bitmap_icon_cwgen_data[] = {
 	0x18, 0x00, 
 	0x24, 0x00, 
@@ -889,6 +911,28 @@ static constexpr Bitmap bitmap_icon_lora {
 	{ 16, 16 }, bitmap_icon_lora_data
 };
 
+static constexpr uint8_t bitmap_icon_memory_data[] = {
+	0x54, 0x15, 
+	0x54, 0x15, 
+	0xFF, 0x7F, 
+	0xFC, 0x1F, 
+	0xFF, 0x7F, 
+	0xCC, 0x19, 
+	0xAF, 0x7A, 
+	0x6C, 0x1B, 
+	0xEF, 0x7B, 
+	0xEC, 0x1B, 
+	0xFF, 0x7F, 
+	0xFC, 0x1F, 
+	0xFF, 0x7F, 
+	0x54, 0x15, 
+	0x54, 0x15, 
+	0x00, 0x00, 
+};
+static constexpr Bitmap bitmap_icon_memory {
+	{ 16, 16 }, bitmap_icon_memory_data
+};
+
 static constexpr uint8_t bitmap_icon_microphone_data[] = {
 	0xC0, 0x03, 
 	0xE0, 0x07, 
@@ -1043,6 +1087,28 @@ static constexpr Bitmap bitmap_icon_nuoptix {
 	{ 16, 16 }, bitmap_icon_nuoptix_data
 };
 
+static constexpr uint8_t bitmap_icon_peripherals_data[] = {
+	0x54, 0x01, 
+	0x54, 0x01, 
+	0xFF, 0x07, 
+	0x7C, 0x01, 
+	0xBF, 0x07, 
+	0xDC, 0x18, 
+	0x6F, 0x10, 
+	0x2C, 0x21, 
+	0xAF, 0x20, 
+	0x34, 0x20, 
+	0x54, 0x10, 
+	0xC0, 0x38, 
+	0x00, 0x77, 
+	0x00, 0xE0, 
+	0x00, 0xC0, 
+	0x00, 0x00, 
+};
+static constexpr Bitmap bitmap_icon_peripherals {
+	{ 16, 16 }, bitmap_icon_peripherals_data
+};
+
 static constexpr uint8_t bitmap_icon_pocsag_data[] = {
 	0x00, 0x00, 
 	0x00, 0x00, 
@@ -1307,6 +1373,28 @@ static constexpr Bitmap bitmap_icon_sd {
 	{ 16, 16 }, bitmap_icon_sd_data
 };
 
+static constexpr uint8_t bitmap_icon_sdcard_data[] = {
+	0xF0, 0x3F, 
+	0x58, 0x35, 
+	0x5C, 0x35, 
+	0xFC, 0x3F, 
+	0xFC, 0x3F, 
+	0xFC, 0x3F, 
+	0xFC, 0x3F, 
+	0xFC, 0x3F, 
+	0xFC, 0x3F, 
+	0xAC, 0x3A, 
+	0x5C, 0x35, 
+	0xAC, 0x3A, 
+	0x5C, 0x35, 
+	0xAC, 0x3A, 
+	0x5C, 0x35, 
+	0xAC, 0x3A, 
+};
+static constexpr Bitmap bitmap_icon_sdcard {
+	{ 16, 16 }, bitmap_icon_sdcard_data
+};
+
 static constexpr uint8_t bitmap_icon_search_data[] = {
 	0xF8, 0x01, 
 	0xFC, 0x03, 
@@ -1483,6 +1571,28 @@ static constexpr Bitmap bitmap_icon_stealth {
 	{ 16, 16 }, bitmap_icon_stealth_data
 };
 
+static constexpr uint8_t bitmap_icon_temperature_data[] = {
+	0x00, 0x01, 
+	0x80, 0x01, 
+	0x80, 0x05, 
+	0xC0, 0x0D, 
+	0x40, 0x0D, 
+	0xD0, 0x1F, 
+	0x70, 0x15, 
+	0xB0, 0x1A, 
+	0x58, 0x35, 
+	0xB8, 0x3A, 
+	0x58, 0x34, 
+	0x28, 0x28, 
+	0x18, 0x30, 
+	0x30, 0x18, 
+	0x60, 0x0C, 
+	0xC0, 0x07, 
+};
+static constexpr Bitmap bitmap_icon_temperature {
+	{ 16, 16 }, bitmap_icon_temperature_data
+};
+
 static constexpr uint8_t bitmap_icon_tetra_data[] = {
 	0xE0, 0x0F, 
 	0x18, 0x38, 
@@ -2147,115 +2257,6 @@ 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 */
 
diff --git a/firmware/graphics/icon_controls.png b/firmware/graphics/icon_controls.png
new file mode 100644
index 0000000000000000000000000000000000000000..6ae16dc07297c903b63346c5d6e7d9ce4b4920e4
GIT binary patch
literal 144
zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`;hrvzAr}5`gB-aS6gZ0i*KbKQ
zxvA*1F!+gQ+c`_N=%?@GbQwxESjwE<xI!gVhqGd;mWNvmzs9vm-dlfV39V@It9N(2
rx?!&VeV5J2LfQ|jP9E{ADJ^4QUa>+jZ-I6M&<X}mS3j3^P6<r_-=i=d

literal 0
HcmV?d00001

diff --git a/firmware/graphics/icon_memory.png b/firmware/graphics/icon_memory.png
new file mode 100644
index 0000000000000000000000000000000000000000..a38dfbd154574cab56d02de30e678176a131e583
GIT binary patch
literal 168
zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`xt=bLAr}5ygB|%A6nHlOum5tU
zN3~Sxibjmvg11&u8|G>&F)`fnlC$GZaqrr*_T`U92Sfwz8E*Dovtu3es?`Oy(pEE6
z7wXB$Zm>Q&DdfBEv0rRlYwlLvi00}$a7$#4$92mYt}DL(uT@KbCYZ*ayZC^h3;VA?
Rpv4THu6{1-oD!NC7yug`J&FJT

literal 0
HcmV?d00001

diff --git a/firmware/graphics/icon_peripherals.png b/firmware/graphics/icon_peripherals.png
new file mode 100644
index 0000000000000000000000000000000000000000..96d194f5bc3b3daa21669c74dfdb6563aab7e14d
GIT binary patch
literal 198
zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`y`C<PAr}5iCkOI1DDXJH{mb7g
znYiSPn8%lPiv@4*iJY&9%I0ObGwb=QuKP?6UtF=zJ798VuWIA23A#7MVw#>D6koh8
z)gYO7#>aEhFZE>4ttt&<*UmZJ;4axN!o2P#OK3;19@8u96??-A+#936=RJA0+QI0<
xoEFgs*RE7-KD)TVYlq6tzx*O6bep3eia&5%z^V4Eej?Ce44$rjF6*2UngCz{QDOi9

literal 0
HcmV?d00001

diff --git a/firmware/graphics/icon_sdcard.png b/firmware/graphics/icon_sdcard.png
new file mode 100644
index 0000000000000000000000000000000000000000..5653cdbda47e6b8bc796e804d453fece06601171
GIT binary patch
literal 132
zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`UY;(FAr}70DGtp4fuLWnt@r$i
z6DK%?*o6%kF7r%c*;sfnq4x!w!fl_8j473k5&IAG9Dm(9@f}mrq6ynxCR|~i5aXty
eu5_G<A=B@I;N^!dn}Mb>c)I$ztaD0eVgLY#b}knH

literal 0
HcmV?d00001

diff --git a/firmware/graphics/icon_temperature.png b/firmware/graphics/icon_temperature.png
new file mode 100644
index 0000000000000000000000000000000000000000..6800fa675b62df1a694170b96d552d94fcbca111
GIT binary patch
literal 189
zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`O`a}}Ar}5?Cm-Z%FyL^0`rlrv
znbY&_t=_|XDke+|KTyHvpO)s*qP<z(E8tO8ykUXLv<17(8yDY{5~(VeliuLK%b&hU
zK%+!WQc`1L*GJ_8Og)=sx0)O{scm@g*u(|xFSc!zNN~T$aQv6YhK!<JG0E3gy!*d{
n^~`Dei$8>JvM6h<5|8&@Bgk&D^B~YQ44$rjF6*2Univ=WwQ@%)

literal 0
HcmV?d00001

-- 
GitLab