diff --git a/tools/themer.py b/tools/themer.py index 622142f..9eee132 100755 --- a/tools/themer.py +++ b/tools/themer.py @@ -25,7 +25,7 @@ class DefaultTheme(): def serialize(self) -> bytes: """Serializes the theme for use in wasp-os""" def split_bytes(x: int) -> Tuple[int, int]: - return (x & 0xFF, (x >> 8) & 0xFF) + return ((x >> 8) & 0xFF, x & 0xFF) theme_bytes = bytes([ *split_bytes(self.BLE_COLOR), *split_bytes(self.SCROLL_INDICATOR_COLOR), diff --git a/wasp/wasp.py b/wasp/wasp.py index 2422cfd..488f92f 100644 --- a/wasp/wasp.py +++ b/wasp/wasp.py @@ -117,7 +117,17 @@ class Manager(): self.musicstate = {} self.musicinfo = {} - self._theme = b'\xef{\xef{\xef{<\xe7\xef{\xb6\xb5\xb6\xbd\xff\xff\xff9' + self._theme = ( + b'\x7b\xef' # ble + b'\x7b\xef' # scroll-indicator + b'\x7b\xef' # battery + b'\xe7\x3c' # status-clock + b'\x7b\xef' # notify-icon + b'\xb5\xb6' # accent-mid + b'\xbd\xb6' # accent-lo + b'\xff\xff' # accent-hi + b'\x39\xff' # slider-default + ) self.blank_after = 15 @@ -539,6 +549,6 @@ class Manager(): if theme_part not in theme_parts: raise IndexError('Theme part {} does not exist'.format(theme_part)) idx = theme_parts.index(theme_part) * 2 - return self._theme[idx] | (self._theme[idx+1] << 8) + return (self._theme[idx] << 8) | self._theme[idx+1] system = Manager()