fastled 1.1.22__py2.py3-none-any.whl → 1.1.24__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fastled/__init__.py +1 -1
- fastled/app.py +51 -36
- fastled/client_server.py +7 -6
- fastled/docker_manager.py +532 -526
- fastled/keyboard.py +8 -6
- fastled/select_sketch_directory.py +1 -1
- fastled/spinner.py +34 -0
- {fastled-1.1.22.dist-info → fastled-1.1.24.dist-info}/METADATA +5 -2
- {fastled-1.1.22.dist-info → fastled-1.1.24.dist-info}/RECORD +13 -12
- {fastled-1.1.22.dist-info → fastled-1.1.24.dist-info}/LICENSE +0 -0
- {fastled-1.1.22.dist-info → fastled-1.1.24.dist-info}/WHEEL +0 -0
- {fastled-1.1.22.dist-info → fastled-1.1.24.dist-info}/entry_points.txt +0 -0
- {fastled-1.1.22.dist-info → fastled-1.1.24.dist-info}/top_level.txt +0 -0
fastled/keyboard.py
CHANGED
@@ -2,8 +2,8 @@ import os
|
|
2
2
|
import select
|
3
3
|
import sys
|
4
4
|
import time
|
5
|
-
from
|
6
|
-
from
|
5
|
+
from queue import Empty, Queue
|
6
|
+
from threading import Thread
|
7
7
|
|
8
8
|
_WHITE_SPACE = [" ", "\r", "\n"]
|
9
9
|
|
@@ -27,7 +27,7 @@ class SpaceBarWatcher:
|
|
27
27
|
def __init__(self) -> None:
|
28
28
|
self.queue: Queue = Queue()
|
29
29
|
self.queue_cancel: Queue = Queue()
|
30
|
-
self.process =
|
30
|
+
self.process = Thread(target=self._watch_for_space, daemon=True)
|
31
31
|
self.process.start()
|
32
32
|
|
33
33
|
def _watch_for_space(self) -> None:
|
@@ -81,16 +81,14 @@ class SpaceBarWatcher:
|
|
81
81
|
key = self.queue.get(block=False, timeout=0.1)
|
82
82
|
if key == ord(" "):
|
83
83
|
found = True
|
84
|
+
self.queue.task_done()
|
84
85
|
except Empty:
|
85
86
|
break
|
86
87
|
return found
|
87
88
|
|
88
89
|
def stop(self) -> None:
|
89
90
|
self.queue_cancel.put(True)
|
90
|
-
self.process.terminate()
|
91
91
|
self.process.join()
|
92
|
-
self.queue.close()
|
93
|
-
self.queue.join_thread()
|
94
92
|
|
95
93
|
|
96
94
|
def main() -> None:
|
@@ -98,10 +96,14 @@ def main() -> None:
|
|
98
96
|
try:
|
99
97
|
while True:
|
100
98
|
if watcher.space_bar_pressed():
|
99
|
+
print("Space bar hit!")
|
101
100
|
break
|
102
101
|
time.sleep(1)
|
103
102
|
finally:
|
103
|
+
print("Stopping watcher.")
|
104
104
|
watcher.stop()
|
105
|
+
print("Watcher stopped.")
|
106
|
+
return
|
105
107
|
|
106
108
|
|
107
109
|
if __name__ == "__main__":
|
@@ -20,7 +20,7 @@ def select_sketch_directory(
|
|
20
20
|
print("\nMultiple Directories found, choose one:")
|
21
21
|
for i, sketch_dir in enumerate(sketch_directories):
|
22
22
|
print(f" [{i+1}]: {sketch_dir}")
|
23
|
-
which = input("\nPlease specify a sketch directory: ")
|
23
|
+
which = input("\nPlease specify a sketch directory: ").strip()
|
24
24
|
try:
|
25
25
|
index = int(which) - 1
|
26
26
|
return str(sketch_directories[index])
|
fastled/spinner.py
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
import _thread
|
2
|
+
import threading
|
3
|
+
import time
|
4
|
+
import warnings
|
5
|
+
|
6
|
+
from progress.spinner import Spinner as SpinnerImpl
|
7
|
+
|
8
|
+
|
9
|
+
class Spinner:
|
10
|
+
def __init__(self, message: str = ""):
|
11
|
+
self.spinner = SpinnerImpl(message)
|
12
|
+
self.event = threading.Event()
|
13
|
+
self.thread = threading.Thread(target=self._spin, daemon=True)
|
14
|
+
self.thread.start()
|
15
|
+
|
16
|
+
def _spin(self) -> None:
|
17
|
+
try:
|
18
|
+
while not self.event.is_set():
|
19
|
+
self.spinner.next()
|
20
|
+
time.sleep(0.1)
|
21
|
+
except KeyboardInterrupt:
|
22
|
+
_thread.interrupt_main()
|
23
|
+
except Exception as e:
|
24
|
+
warnings.warn(f"Spinner thread failed: {e}")
|
25
|
+
|
26
|
+
def stop(self) -> None:
|
27
|
+
self.event.set()
|
28
|
+
self.thread.join()
|
29
|
+
|
30
|
+
def __enter__(self):
|
31
|
+
return self
|
32
|
+
|
33
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
34
|
+
self.stop()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: fastled
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.24
|
4
4
|
Summary: FastLED Wasm Compiler
|
5
5
|
Home-page: https://github.com/zackees/fastled-wasm
|
6
6
|
Maintainer: Zachary Vorhies
|
@@ -19,6 +19,7 @@ Requires-Dist: filelock
|
|
19
19
|
Requires-Dist: disklru>=2.0.1
|
20
20
|
Requires-Dist: appdirs
|
21
21
|
Requires-Dist: rapidfuzz
|
22
|
+
Requires-Dist: progress
|
22
23
|
|
23
24
|
# FastLED Wasm compiler
|
24
25
|
|
@@ -32,6 +33,7 @@ Compiles an Arduino/Platformio sketch into a wasm binary that can be run directl
|
|
32
33
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_win.yml)
|
33
34
|
|
34
35
|
|
36
|
+
|
35
37
|
# About
|
36
38
|
|
37
39
|
This python app will compile your FastLED style sketches into html/js/wasm output that runs directly in the browser.
|
@@ -159,9 +161,10 @@ A: `delay()` will block `loop()` which blocks the main thread of the browser. Th
|
|
159
161
|
Q: How can I get the compiled size of my FastLED sketch smaller?
|
160
162
|
A: A big chunk of space is being used by unnecessary javascript `emscripten` is bundling. This can be tweeked by the wasm_compiler_settings.py file in the FastLED repo.
|
161
163
|
|
162
|
-
|
163
164
|
# Revisions
|
164
165
|
|
166
|
+
* 1.1.24 - Adds progress spinning bar for pulling images, which take a long time.
|
167
|
+
* 1.1.23 - Various fixes for MacOS
|
165
168
|
* 1.1.22 - Selecting sketch now allows strings and narrowing down paths if ambiguity
|
166
169
|
* 1.1.21 - Now always watches for space/enter key events to trigger a recompile.
|
167
170
|
* 1.1.20 - Fixed a regression for 1.1.16 involving docker throwing an exception before DockerManager.is_running() could be called so it can be launched.
|
@@ -1,25 +1,26 @@
|
|
1
|
-
fastled/__init__.py,sha256=
|
2
|
-
fastled/app.py,sha256=
|
1
|
+
fastled/__init__.py,sha256=KmpV56lsAg31rlm1PyvbeZuohDl5DpIlQpi9SDuldc4,64
|
2
|
+
fastled/app.py,sha256=VZP65zT1qLQLcOXA8oElPdZiladIAMvW9MVnqy5QTRM,6806
|
3
3
|
fastled/build_mode.py,sha256=joMwsV4K1y_LijT4gEAcjx69RZBoe_KmFmHZdPYbL_4,631
|
4
4
|
fastled/cli.py,sha256=CNR_pQR0sNVPNuv8e_nmm-0PI8sU-eUBUgnWgWkzW9c,237
|
5
|
-
fastled/client_server.py,sha256=
|
5
|
+
fastled/client_server.py,sha256=CBgicRyunn96tVeAHQOuo4q2gkDFAtLEPxhTf2EnQ_0,11113
|
6
6
|
fastled/compile_server.py,sha256=aBdpILSRrDsCJ5e9g5uwIqt9bcqE_8FrSddCV2ygtrI,5401
|
7
|
-
fastled/docker_manager.py,sha256=
|
7
|
+
fastled/docker_manager.py,sha256=awQCAB0XfHMy6y1jfdEZx1qyzXTtYBmAwVyuQjxwuf0,20157
|
8
8
|
fastled/env.py,sha256=8wctQwl5qE4CI8NBugHtgMmUfEfHZ869JX5lGdSOJxc,304
|
9
9
|
fastled/filewatcher.py,sha256=5dVmjEG23kMeJa29tRVm5XKSr9sTD4ME2boo-CFDuUM,6910
|
10
|
-
fastled/keyboard.py,sha256=
|
10
|
+
fastled/keyboard.py,sha256=Zz_ggxOUTX2XQEy6K6kAoorVlUev4wEk9Awpvv9aStA,3241
|
11
11
|
fastled/open_browser.py,sha256=RRHcsZ5Vzsw1AuZUEYuSfjKmf_9j3NGMDUR-FndHmqs,1483
|
12
12
|
fastled/paths.py,sha256=VsPmgu0lNSCFOoEC0BsTYzDygXqy15AHUfN-tTuzDZA,99
|
13
|
-
fastled/select_sketch_directory.py,sha256=
|
13
|
+
fastled/select_sketch_directory.py,sha256=ih8Voua8ecMIZ9m0ZEBp_EuuBzz8xGfMxC_UhAKuoA0,1312
|
14
14
|
fastled/sketch.py,sha256=5nRjg281lMH8Bo9wKjbcpTQCfEP574ZCG-lukvFmyQ8,2656
|
15
|
+
fastled/spinner.py,sha256=ZGFXona3SJxmuHIzMGa6tqB0IVDSRr8W_dju09Z1Hwg,901
|
15
16
|
fastled/string_diff.py,sha256=svtaQFGp4a6r2Qjx-Gxhna94wK-d8LKV4OCpKMXiHso,1164
|
16
17
|
fastled/types.py,sha256=dDIsGHJkHNJ7B61wNp6X0JSLs_nrHiq7RlNqNWbwFec,194
|
17
18
|
fastled/util.py,sha256=t4M3NFMhnCzfYbLvIyJi0RdFssZqbTN_vVIaej1WV-U,265
|
18
19
|
fastled/web_compile.py,sha256=KuvKGdX6SSUUqC7YgX4T9SMSP5wdcPUhpg9-K9zPoTI,10378
|
19
20
|
fastled/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
|
20
|
-
fastled-1.1.
|
21
|
-
fastled-1.1.
|
22
|
-
fastled-1.1.
|
23
|
-
fastled-1.1.
|
24
|
-
fastled-1.1.
|
25
|
-
fastled-1.1.
|
21
|
+
fastled-1.1.24.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
|
22
|
+
fastled-1.1.24.dist-info/METADATA,sha256=tiMyoOLRhVYmwuoqohRRk5xxTBD9M41cqyL_g1cE24o,14160
|
23
|
+
fastled-1.1.24.dist-info/WHEEL,sha256=0VNUDWQJzfRahYI3neAhz2UVbRCtztpN5dPHAGvmGXc,109
|
24
|
+
fastled-1.1.24.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
|
25
|
+
fastled-1.1.24.dist-info/top_level.txt,sha256=xfG6Z_ol9V5YmBROkZq2QTRwjbS2ouCUxaTJsOwfkOo,14
|
26
|
+
fastled-1.1.24.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|