From c067b02cf01f217dcbd3a3b364145f57df9238f6 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sun, 17 Jan 2021 09:19:47 +1100 Subject: [PATCH 1/2] . --- Translations/make_translation.py | 3 --- workspace/TS100/Core/BSP/Miniware/Power.cpp | 1 - workspace/TS100/Core/Drivers/OLED.cpp | 10 ++++++---- workspace/TS100/Core/Threads/GUIThread.cpp | 1 + workspace/TS100/Core/Threads/POWThread.cpp | 3 +-- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Translations/make_translation.py b/Translations/make_translation.py index 2d4135e8c7..38775ae69c 100755 --- a/Translations/make_translation.py +++ b/Translations/make_translation.py @@ -80,9 +80,6 @@ def writeStart(f): """// WARNING: THIS FILE WAS AUTO GENERATED BY make_translation.py. PLEASE DO NOT EDIT. #include "Translation.h" -#ifndef LANG -#define LANG_EN -#endif """ ) ) diff --git a/workspace/TS100/Core/BSP/Miniware/Power.cpp b/workspace/TS100/Core/BSP/Miniware/Power.cpp index 7d3d28eb46..95fc916a82 100644 --- a/workspace/TS100/Core/BSP/Miniware/Power.cpp +++ b/workspace/TS100/Core/BSP/Miniware/Power.cpp @@ -28,7 +28,6 @@ void power_check() { uint8_t usb_pd_detect() { #ifdef POW_PD FUSB302_present = fusb302_detect(); - return FUSB302_present; #endif return false; diff --git a/workspace/TS100/Core/Drivers/OLED.cpp b/workspace/TS100/Core/Drivers/OLED.cpp index 948c248e19..776aa7b5ce 100755 --- a/workspace/TS100/Core/Drivers/OLED.cpp +++ b/workspace/TS100/Core/Drivers/OLED.cpp @@ -391,15 +391,17 @@ void OLED::drawAreaSwapped(int16_t x, int8_t y, uint8_t wide, uint8_t height, co } if (y == 0) { -// Splat first line of data - for (uint8_t xx = visibleStart; xx < visibleEnd; xx ++) { + // Splat first line of data + for (uint8_t xx = visibleStart; xx < visibleEnd; xx += 2) { firstStripPtr[xx + x] = ptr[xx + 1]; + firstStripPtr[xx + x + 1] = ptr[xx]; } } if (y == 8 || height == 16) { -// Splat the second line - for (uint8_t xx = visibleStart; xx < visibleEnd; xx++) { + // Splat the second line + for (uint8_t xx = visibleStart; xx < visibleEnd; xx += 2) { secondStripPtr[x + xx] = ptr[xx + 1 + (height == 16 ? wide : 0)]; + secondStripPtr[x + xx + 1] = ptr[xx + (height == 16 ? wide : 0)]; } } } diff --git a/workspace/TS100/Core/Threads/GUIThread.cpp b/workspace/TS100/Core/Threads/GUIThread.cpp index ac662aa42e..a5fc94e24a 100755 --- a/workspace/TS100/Core/Threads/GUIThread.cpp +++ b/workspace/TS100/Core/Threads/GUIThread.cpp @@ -805,6 +805,7 @@ void startGUITask(void const *argument __unused) { ButtonState buttons = getButtonState(); if (buttons) ticks = xTaskGetTickCount(); // make timeout now so we will exit + OLED::refresh(); GUIDelay(); } diff --git a/workspace/TS100/Core/Threads/POWThread.cpp b/workspace/TS100/Core/Threads/POWThread.cpp index f87fed87ef..7d124d5204 100644 --- a/workspace/TS100/Core/Threads/POWThread.cpp +++ b/workspace/TS100/Core/Threads/POWThread.cpp @@ -16,10 +16,9 @@ // Small worker thread to handle power (mostly QC) related steps - - void startPOWTask(void const *argument __unused) { postRToSInit(); + osDelay(TICKS_100MS); for (;;) { osDelay(TICKS_100MS); // Slow down update rate power_check(); From 308eee40eec6fc5277e975e353f0b3b1c3d0dac1 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sun, 17 Jan 2021 09:27:10 +1100 Subject: [PATCH 2/2] Update POWThread.cpp --- workspace/TS100/Core/Threads/POWThread.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/workspace/TS100/Core/Threads/POWThread.cpp b/workspace/TS100/Core/Threads/POWThread.cpp index 7d124d5204..d48b54e9a3 100644 --- a/workspace/TS100/Core/Threads/POWThread.cpp +++ b/workspace/TS100/Core/Threads/POWThread.cpp @@ -18,7 +18,6 @@ void startPOWTask(void const *argument __unused) { postRToSInit(); - osDelay(TICKS_100MS); for (;;) { osDelay(TICKS_100MS); // Slow down update rate power_check();