mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-06 07:52:06 +00:00
Undo minor changes (noise)
This commit is contained in:
parent
e00a99f041
commit
57f8d08f01
@ -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:
|
||||
|
@ -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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user