From c0095bd98f2597a68260c78b9c5f77aa6e02ff5c Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 8 Jan 2022 16:55:40 +0100 Subject: [PATCH 1/3] removed flipped DisconnecetedTip hex code --- source/Core/Drivers/Font.h | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/source/Core/Drivers/Font.h b/source/Core/Drivers/Font.h index 38ae386c..5b5180d7 100644 --- a/source/Core/Drivers/Font.h +++ b/source/Core/Drivers/Font.h @@ -134,18 +134,12 @@ const uint8_t idleScreenBG[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0xba, 0x83, 0x80, 0x8e, 0xaa, 0x8e, 0x80, 0x80, 0xbf, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x22, 0x4a, 0x46, 0x8a, 0xa6, 0x8a, 0xa6, 0x8a, 0xa6, 0x8a, 0xa6, 0x8e, 0xa6, 0x8e, 0xa6, 0x8e, 0xa6, 0x8e, 0xbe, 0x80, 0xae, 0x94, 0x8c, 0x94, 0x88, 0x8a, 0x89, 0x80, 0x40, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00}; -const uint8_t disconnectedTipIcon[] = { +const uint8_t disconnectedTip[] = { // // 41 x 16 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0xc0, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xcc, 0x9c, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x20, 0x70, 0x38, 0x1c, 0xcc, 0x40, 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0x60, 0xe0, 0x01, 0x01, 0x01, 0x02, 0x01, 0x02, 0x05, 0x00, 0x07, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x31, 0x38, 0x1c, 0x0e, 0x04, 0x01, 0x03, 0x07, 0x0e, 0x1c, 0x39, 0x30, 0x01, 0x03, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x09, 0x0f}; -const uint8_t disconnectedTipIconFlip[] = { - // - // 41 x 16 - 0xe0, 0x60, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x40, 0xcc, 0x1c, 0x38, 0x70, 0x20, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x9c, 0xcc, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x0f, 0x09, 0x04, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x03, 0x01, 0x30, - 0x39, 0x1c, 0x0e, 0x07, 0x03, 0x01, 0x04, 0x0e, 0x1c, 0x38, 0x31, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x07, 0x00, 0x05, 0x02, 0x01, 0x02, 0x01, 0x01, 0x01}; #endif #if defined(MODEL_TS80) + defined(MODEL_TS80P) >= 1 @@ -158,18 +152,12 @@ const uint8_t idleScreenBG[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0xba, 0x83, 0x80, 0x8e, 0xaa, 0x8e, 0x80, 0x80, 0xbf, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x44, 0x4c, 0x94, 0x8c, 0x94, 0x8c, 0x94, 0x8c, 0x94, 0x8c, 0x94, 0x80, 0x9c, 0x8a, 0xa6, 0x8a, 0xa6, 0x8e, 0xa6, 0x9c, 0x81, 0x94, 0x88, 0x88, 0x8a, 0x81, 0x80, 0x40, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00}; -const uint8_t disconnectedTipIcon[] = { +const uint8_t disconnectedTip[] = { // // 41 x 16 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0x40, 0xc0, 0x40, 0x80, 0x00, 0x80, 0x80, 0x8c, 0x9c, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x20, 0x70, 0x38, 0x9c, 0x8c, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0x40, 0xe0, 0x60, 0xe0, 0x01, 0x01, 0x01, 0x02, 0x00, 0x03, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x03, 0x00, 0x02, 0x01, 0x32, 0x39, 0x1c, 0x0e, 0x04, 0x01, 0x03, 0x07, 0x0e, 0x1c, 0x38, 0x31, 0x02, 0x01, 0x02, 0x00, 0x02, 0x01, 0x04, 0x01, 0x04, 0x01, 0x0a, 0x01, 0x0f}; -const uint8_t disconnectedTipIconFlip[] = { - // - // 41 x 16 - 0xe0, 0x60, 0xe0, 0x40, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x8c, 0x9c, 0x38, 0x70, 0x20, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x9c, 0x8c, 0x80, 0x80, 0x00, - 0x80, 0x40, 0xc0, 0x40, 0xc0, 0xc0, 0xc0, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x0a, 0x01, 0x04, 0x01, 0x04, 0x01, 0x02, 0x00, 0x02, 0x01, 0x02, 0x31, 0x38, - 0x1c, 0x0e, 0x07, 0x03, 0x01, 0x04, 0x0e, 0x1c, 0x39, 0x32, 0x01, 0x02, 0x00, 0x03, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x03, 0x00, 0x02, 0x01, 0x01, 0x01}; #endif #ifdef MODEL_MHP30 @@ -182,18 +170,12 @@ const uint8_t idleScreenBG[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0xba, 0x83, 0x80, 0x8e, 0xaa, 0x8e, 0x80, 0x80, 0xbf, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x40, 0x40, 0x86, 0x89, 0x85, 0x91, 0x8b, 0x93, 0x8b, 0xa3, 0x97, 0xa7, 0x97, 0xa7, 0x8f, 0xaf, 0x87, 0x97, 0xa5, 0x86, 0x93, 0x8b, 0x93, 0x83, 0x89, 0xa5, 0x89, 0x46, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00}; -const uint8_t disconnectedTipIcon[] = { +const uint8_t disconnectedTip[] = { // // 41 x 16 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0xa0, 0x30, 0x70, 0x70, 0x60, 0x4c, 0x9c, 0x38, 0x70, 0xe4, 0xcc, 0x88, 0x20, 0x70, 0x38, 0x9c, 0x4c, 0x60, 0x70, 0x60, 0x20, 0xa0, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x29, 0x10, 0x22, 0x01, 0x32, 0x38, 0x1c, 0x0e, 0x04, 0x01, 0x03, 0x07, 0x0e, 0x1c, 0x38, 0x30, 0x01, 0x12, 0x29, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -const uint8_t disconnectedTipIconFlip[] = { - // - // 41 x 16 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0xa0, 0x20, 0x60, 0x70, 0x60, 0x4c, 0x9c, 0x38, 0x70, 0x20, 0x88, 0xcc, 0xe4, 0x70, 0x38, 0x9c, 0x4c, 0x60, 0x70, - 0x70, 0x30, 0xa0, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x29, 0x12, 0x01, 0x30, - 0x38, 0x1c, 0x0e, 0x07, 0x03, 0x01, 0x04, 0x0e, 0x1c, 0x38, 0x32, 0x01, 0x22, 0x10, 0x29, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; #endif // 16 x 16 From 4989a030d59048fe4663447dc3c3ca7f287dad93 Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 8 Jan 2022 16:56:52 +0100 Subject: [PATCH 2/3] flipped DisconnecetedTip Icon gets now generated --- source/Core/Threads/GUIThread.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index c2f3d689..a6f8efef 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -832,6 +832,7 @@ void showWarnings() { } uint8_t idleScreenBGF[sizeof(idleScreenBG)]; +uint8_t disconnectedTipF[sizeof(disconnectedTip)]; /* StartGUITask function */ void startGUITask(void const *argument) { (void)argument; @@ -854,6 +855,11 @@ void startGUITask(void const *argument) { idleScreenBGF[(row * 84) + x] = idleScreenBG[(row * 84) + (83 - x)]; } } + for (int row = 0; row < 2; row++) { + for (int x = 0; x < 41; x++) { + disconnectedTipF[(row * 41) + x] = disconnectedTip[(row * 41) + (40 - x)]; + } + } } getTipRawTemp(1); // reset filter OLED::setRotation(getSettingValue(SettingsOptions::OrientationMode) & 1); @@ -963,9 +969,9 @@ void startGUITask(void const *argument) { if (OLED::getRotation()) { #endif // in right handed mode we want to draw over the first part - OLED::drawArea(55, 0, 41, 16, disconnectedTipIconFlip); + OLED::drawArea(55, 0, 41, 16, disconnectedTipF); } else { - OLED::drawArea(0, 0, 41, 16, disconnectedTipIcon); + OLED::drawArea(0, 0, 41, 16, disconnectedTip); } #ifdef OLED_FLIP if (!OLED::getRotation()) { @@ -1076,9 +1082,9 @@ void startGUITask(void const *argument) { if (OLED::getRotation()) { #endif // in right handed mode we want to draw over the first part - OLED::drawArea(55, 0, 41, 16, disconnectedTipIconFlip); + OLED::drawArea(55, 0, 41, 16, disconnectedTipF); } else { - OLED::drawArea(0, 0, 41, 16, disconnectedTipIcon); + OLED::drawArea(0, 0, 41, 16, disconnectedTip); } } } From 7db7a117870bd8fab5e80e1b058df56fe4848baa Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Sat, 8 Jan 2022 17:38:38 +0100 Subject: [PATCH 3/3] even a bit less code --- source/Core/Threads/GUIThread.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index a6f8efef..b452d5d0 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -854,8 +854,6 @@ void startGUITask(void const *argument) { for (int x = 0; x < 84; x++) { idleScreenBGF[(row * 84) + x] = idleScreenBG[(row * 84) + (83 - x)]; } - } - for (int row = 0; row < 2; row++) { for (int x = 0; x < 41; x++) { disconnectedTipF[(row * 41) + x] = disconnectedTip[(row * 41) + (40 - x)]; }