From 57f8d08f010ecc178712f54514bcb324765c44f2 Mon Sep 17 00:00:00 2001 From: elpekenin Date: Sun, 10 Mar 2024 11:30:09 +0100 Subject: [PATCH] Undo minor changes (noise) --- lib/python/qmk/painter.py | 5 ++--- lib/python/qmk/painter_qgf.py | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/python/qmk/painter.py b/lib/python/qmk/painter.py index f9f4b6d8d5a..512a486ce87 100644 --- a/lib/python/qmk/painter.py +++ b/lib/python/qmk/painter.py @@ -3,7 +3,6 @@ import datetime import math import re -import sys from string import Template from PIL import Image, ImageOps @@ -401,7 +400,7 @@ def compress_bytes_qmk_rle(bytearray): output.extend(r) for n in range(0, len(bytearray) + 1): - end = n == len(bytearray) + end = True if n == len(bytearray) else False if not end: c = bytearray[n] temp.append(c) @@ -423,7 +422,7 @@ def compress_bytes_qmk_rle(bytearray): if len(temp) >= 2 and temp[-1] == temp[-2]: repeat = True if len(temp) > 2: - append_range(temp[:len(temp) - 2]) + append_range(temp[0:(len(temp) - 2)]) temp = [temp[-1], temp[-1]] continue if len(temp) == 128 or end: diff --git a/lib/python/qmk/painter_qgf.py b/lib/python/qmk/painter_qgf.py index ecd4a36530e..67ef0dd2338 100644 --- a/lib/python/qmk/painter_qgf.py +++ b/lib/python/qmk/painter_qgf.py @@ -17,9 +17,8 @@ def o24(i): return o16(i & 0xFFFF) + o8((i & 0xFF0000) >> 16) +# Helper to convert from RGB888 to the QMK "dialect" of HSV888 def rgb888_to_qmk_hsv888(e): - """Helper to convert from RGB888 to the QMK "dialect" of HSV888 - """ hsv = rgb_to_hsv(e[0] / 255.0, e[1] / 255.0, e[2] / 255.0) return (int(hsv[0] * 255.0), int(hsv[1] * 255.0), int(hsv[2] * 255.0))