# SPDX-License-Identifier: LGPL-3.0-or-later # Copyright (C) 2020 Daniel Thompson """Logo demo for PineTime ~~~~~~~~~~~~~~~~~~~~~~~~~ This demo is simply an alternating sweep of the Pine64 and MicroPython logos. It cycles through a variety of colours and swaps between the logos every 5 images (so if you change anything make sure len(colors) is not a multiple of 5). .. figure:: res/DemoApp.png :width: 179 The demo also includes code to keep the devie awake making it suitable to run as an always-on application to demonstrate wasp-os at conferences and shows. .. note:: Due to it's niche purpose and relatively large size this app is not included by default in the flash images. It must be separately installed and enabled. """ import wasp import icons # 2-bit RLE, generated from res/demo_icon.png, 292 bytes demo_icon = ( b'\x02' b'`@' b'.\xc1?\x1f\xc3?\x1d\xc5?\x1b\xc7?\x19\xc9?\x17' b'\xcb?\x16\xcc?\x10\xc1\x06\xc8\x06\xc1?\n\xc4\x06\xc4' b'\x06\xc3?\n\xc6\x0c\xc6?\x08\xc9\x08\xc8?\x08\xc7\x0c' b'\xc7?\x06\xc6\x06\xc4\x06\xc5?\x06\xc4\x05\xc9\x06\xc3?' b'\x06\xc1\x06\xce\x05\xc2?\n\xd2?\x0c\xd7?\x08\xdc?' b'\x05\xdc\x05\xc18\xc3\x05\xd7\x06\xc38\xc5\x06\xd2\x05\xc6' b'8\xc7\x06\xce\x05\xc88\xca\x05\xc9\x06\xca8\xcc\x06\xc4' b'\x06\xcc8\xce\x0b\xcf8\xd0\x08\xd08\xce\x0b\xcf8\xcc' b'\x06\xc4\x06\xcc8\xc9\x06\xc9\x06\xca8\xc7\x06\xcd\x06\xc8' b'8\xc5\x06\xd2\x06\xc58\xc3\x05\xd7\x06\xc3>\xdb\x06\xc1' b'<\xe08\xc2\x06\xdf\x07\xc12\xc3\x06\xdb\x06\xc42\xc6' b'\x06\xd6\x06\xc54\xc7\x06\xd1\x06\xc84\xca\x05\xcd\x06\xc9' b'6\xcb\x06\xc8\x05\xcc6\xcd\x06\xc3\x06\xcd7\xd0\n\xcf' b'8\xd0\x08\xd08\xce\x05\xc1\x06\xcd:\xca\x06\xc5\x06\xcb' b':\xc8\x06\xca\x05\xc8<\xc5\x05\xcf\x06\xc5<\xc3\x05\xd3' b'\x06\xc2?\x04\xd8?\x07\xdc?\x05\xdb?\x08\xd7?\r' b'\xd2?\x11\xce?\x15\xc9?\x1a\xc5?\x1d\xc3?\x1e\xc3' b'?\x1e\xc3?\x1e\xc3?\x1e\xc3?\x1e\xc3?\x1e\xc3?' b'Q' ) colors = ( 0xffff, 0xf800, # red 0xffff, 0xffe0, # yellow 0xffff, 0x07e0, # green 0xffff, 0x07ff, # cyan 0xffff, 0x001f, # blue 0xffff, 0xf81f, # magenta ) class Hack: """wasptool uses class (starting in column 0) as a clue for chunk at a time transmission. Hence we use fake classes to demark places it is safe to split an evaluation. """ pass # 1-bit RLE, generated from res/pine64.png, 961 bytes pine64 = ( 240, 240, b'x\x01\xee\x03\xec\x05\xea\x07\xe8\t\xe6\x0b\xe4\r\xe2\x0f' b'\xe0\x11\xde\x13\xdc\x15\xda\x17\xd8\x19\xd6\x1b\xd4\x1d\xd2\x1f' b"\xd1 \xcf!\xce#\xcc%\xca'\xc8)\xc6+\xc4-" b"\xc3-\xc6'\xcb#\xd0\x1d\xb6\x02\x1d\x19\x1b\x03\x99\x05" b'\x1e\x13\x1c\x05\x99\x08\x1d\x0f\x1c\x08\x98\n\x1e\t\x1d\n' b'\x97\r\x1e\x05\x1c\r\x97\x10:\x10\x96\x126\x12\x95\x15' b'1\x15\x95\x17-\x18\x93\x1b(\x1a\x93\x1d$\x1c\x93\x1e' b'!\x1f\x91\x1d%\x1d\x91\x1b*\x1a\x91\x19.\x19\x8f\x17' b'\x19\x01\x19\x17\x8f\x15\x19\x05\x19\x15\x8f\x13\x19\t\x1a\x13' b'\x8d\x12\x19\r\x1a\x11\x8d\x10\x18\x12\x1a\x10\x8c\r\x19\x17' b'\x19\x0e\x8b\x0c\x19\x1b\x19\x0c\x8b\n\x19\x1f\x1a\n\x89\t' b'\x18$\x1a\x08\x89\x07\x18)\x19\x06\x89\x04\x19-\x19\x05' b'\x87\x03\x191\x19\x03\x87\x01\x186\x19\x01\x9e;\xb3?' b'\xafC\xabG\xa6L\xa2Q\x9dU\x98Z\x94^\x90c' b'\x8bg\x87k\x85kn\x01\x18f\x1a\x01V\x03\x19a' b'\x1a\x03V\x05\x19]\x1a\x05V\x07\x19Y\x19\x08V\n' b'\x18T\x1a\nV\x0c\x19O\x1a\x0cV\x0e\x19K\x19\x0f' b'V\x11\x18G\x19\x11V\x13\x18B\x1a\x13V\x16\x18=' b'\x19\x16V\x18\x189\x19\x18V\x1a\x185\x19\x1aV\x1c' b"\x181\x19\x1cV\x1f\x18+\x19\x1fV!\x18'\x19!" b'V#\x18#\x19#V%\x18\x1f\x18&V(\x17\x1a' b'\x19(V*\x18\x15\x19*V,\x18\x11\x18-V/' b'\x17\r\x18/V1\x17\x08\x191V4\x17\x03\x184' b'V6.6V8*8V:&:V= =' b'V<"\x06' b'\x1cm\x1d\x06?\x08\x1ch\x1c\x08@\n\x1cd\x1c\n' b'A\x0c\x1b_\x1c\x0cB\x0e\x1b[\x1c\x0eB\x11\x1bV' b'\x1b\x11C\x12\x1bR\x1b\x12D\x14\x1bM\x1c\x14E\x16' b'\x1aI\x1b\x16F\x18\x1aE\x1b\x18G\x1a\x1a?\x1b\x1a' b'H\x1c\x1a;\x1b\x1cI\x1e\x197\x1a\x1eJ \x193' b'\x1a J"\x1a-\x1b!L$\x19)\x1a$L&' b"\x19%\x1a&M(\x18!\x1a'N*\x19\x1c\x19*" b'O+\x19\x18\x19+P.\x18\x13\x19.Q/\x18\x0f' b'\x19/R2\x18\n\x182S3\x18\x05\x193T5' b'\x18\x01\x195T8,8U9(9V<"<' b'W< = len(colors): self._color = 0