fastled 1.1.36__tar.gz → 1.1.38__tar.gz
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-1.1.36/src/fastled.egg-info → fastled-1.1.38}/PKG-INFO +78 -14
- fastled-1.1.36/PKG-INFO → fastled-1.1.38/README.md +260 -219
- {fastled-1.1.36 → fastled-1.1.38}/examples/XYMatrix/XYMatrix.ino +2 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/__init__.py +48 -8
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/client_server.py +45 -39
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/compile_server.py +5 -3
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/compile_server_impl.py +29 -22
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/project_init.py +1 -1
- fastled-1.1.38/src/fastled/test/examples.py +31 -0
- fastled-1.1.38/src/fastled/types.py +47 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/web_compile.py +7 -8
- fastled-1.1.36/README.md → fastled-1.1.38/src/fastled.egg-info/PKG-INFO +283 -196
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled.egg-info/SOURCES.txt +1 -1
- fastled-1.1.38/tests/test_api.py +24 -0
- {fastled-1.1.36 → fastled-1.1.38}/tests/test_compile_server.py +2 -2
- {fastled-1.1.36 → fastled-1.1.38}/tests/test_embedded_data.py +4 -4
- {fastled-1.1.36 → fastled-1.1.38}/tests/test_examples.py +2 -2
- fastled-1.1.36/src/fastled/build_mode.py +0 -25
- fastled-1.1.36/src/fastled/test/examples.py +0 -16
- fastled-1.1.36/src/fastled/types.py +0 -25
- {fastled-1.1.36 → fastled-1.1.38}/.aiderignore +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/.github/workflows/build_multi_docker_image.yml +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/.github/workflows/lint.yml +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/.github/workflows/test_macos.yml +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/.github/workflows/test_ubuntu.yml +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/.github/workflows/test_win.yml +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/.gitignore +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/.pylintrc +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/.vscode/launch.json +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/.vscode/settings.json +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/.vscode/tasks.json +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/LICENSE +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/MANIFEST.in +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/clean +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/docs/fastled.js +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/docs/fastled.wasm +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/docs/index.css +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/docs/index.html +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/docs/index.js +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Blink/Blink.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Chromancer/Chromancer.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Chromancer/detail.h +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Chromancer/gary_woos_wled_port/gary_woos_wled_ledmap.h +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Chromancer/gary_woos_wled_port/presets.json +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Chromancer/gary_woos_wled_port/presets.min.json +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Chromancer/gen.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Chromancer/mapping.h +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Chromancer/net.h +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Chromancer/output.json +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Chromancer/ripple.h +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Chromancer/screenmap.json.h +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/ColorPalette/ColorPalette.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/ColorTemperature/ColorTemperature.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Cylon/Cylon.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/DemoReel100/DemoReel100.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Esp32Rmt51/Esp32Rmt51.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/EspI2SDemo/EspI2SDemo.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Fire2012/Fire2012.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Fire2012WithPalette/Fire2012WithPalette.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/FirstLight/FirstLight.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/FxEngine/FxEngine.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Noise/Noise.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/NoisePlayground/NoisePlayground.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/NoisePlusPalette/NoisePlusPalette.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/OctoWS2811/OctoWS2811.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Pacifica/Pacifica.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Pride2015/Pride2015.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/TwinkleFox/TwinkleFox.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Video/Gfx2Video/Gfx2Video.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/WasmScreenCoords/WasmScreenCoords.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/Water/Water.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/examples/wasm/wasm.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/install +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/lint +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/pyproject.toml +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/requirements.testing.txt +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/setup.cfg +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/setup.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/app.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/assets/example.txt +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/cli.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/docker_manager.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/filewatcher.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/keyboard.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/open_browser.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/parse_args.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/paths.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/select_sketch_directory.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/settings.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/sketch.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/spinner.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/string_diff.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled/util.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled.egg-info/dependency_links.txt +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled.egg-info/entry_points.txt +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled.egg-info/requires.txt +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/src/fastled.egg-info/top_level.txt +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/test +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/tests/test_bad_ino.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/tests/test_cli.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/tests/test_docker_linux_on_windows.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/tests/test_filechanger.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/tests/test_ino/bad/bad.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/tests/test_ino/embedded/data/bigdata.dat +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/tests/test_ino/embedded/wasm.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/tests/test_ino/wasm/wasm.ino +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/tests/test_project_init.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/tests/test_server_and_client_seperatly.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/tests/test_webcompile.py +0 -0
- {fastled-1.1.36 → fastled-1.1.38}/upload_package.sh +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: fastled
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.38
|
4
4
|
Summary: FastLED Wasm Compiler
|
5
5
|
Home-page: https://github.com/zackees/fastled-wasm
|
6
6
|
Maintainer: Zachary Vorhies
|
@@ -61,47 +61,109 @@ pip install fastled
|
|
61
61
|
|
62
62
|
**Note that you may need to install x86 docker emulation on Mac-m1 and later, as this is an x86 only image at the prsent.**
|
63
63
|
|
64
|
-
# Use
|
64
|
+
# Command Line Use
|
65
65
|
|
66
66
|
Change to the directory where the sketch lives and run, will run the compilation
|
67
67
|
on the web compiler.
|
68
68
|
|
69
69
|
```bash
|
70
|
+
# This will use the web-compiler, unless you have docker installed in which case a local
|
71
|
+
# server will be instantiated automatically.
|
70
72
|
cd <SKETCH-DIRECTORY>
|
71
73
|
fastled
|
72
74
|
```
|
73
75
|
|
74
|
-
|
76
|
+
Forces the local server to to spawn in order to run to do the compile.
|
75
77
|
|
76
78
|
```bash
|
77
79
|
cd <SKETCH-DIRECTORY>
|
78
|
-
fastled --local
|
80
|
+
fastled --local # if server doesn't already exist, one is created.
|
79
81
|
```
|
80
82
|
|
81
83
|
You can also spawn a server in one process and then access it in another, like this:
|
82
84
|
|
83
85
|
```bash
|
84
|
-
fastled --server
|
86
|
+
fastled --server # server will now run in the background.
|
85
87
|
# now launch the client
|
86
|
-
fastled examples/wasm --local
|
88
|
+
fastled examples/wasm --local # local will find the local server use it do the compile.
|
87
89
|
```
|
88
90
|
|
89
91
|
After compilation a web browser windows will pop up. Changes to the sketch will automatically trigger a recompilation.
|
90
92
|
|
91
|
-
#
|
93
|
+
# Python Api
|
94
|
+
|
95
|
+
**Compiling through the api**
|
96
|
+
```python
|
97
|
+
|
98
|
+
from fastapi import Api, CompileResult
|
99
|
+
|
100
|
+
out: CompileResult = Api.web_compile("path/to/sketch")
|
101
|
+
print(out.success)
|
102
|
+
print(out.stdout)
|
103
|
+
|
104
|
+
```
|
105
|
+
|
106
|
+
**Launching a compile server**
|
107
|
+
```python
|
108
|
+
|
109
|
+
from fastapi import Api, CompileServer
|
110
|
+
|
111
|
+
server: CompileServer = Api.spawn_server()
|
112
|
+
print(f"Local server running at {server.url()}")
|
113
|
+
server.web_compile("path/to/sketch") # output will be "path/to/sketch/fastled_js"
|
114
|
+
server.stop()
|
115
|
+
```
|
116
|
+
|
117
|
+
**Launching a server in a scope**
|
118
|
+
```python
|
119
|
+
|
120
|
+
from fastapi import Api
|
121
|
+
|
122
|
+
# Launching a server in a scope
|
123
|
+
with Api.server() as server:
|
124
|
+
server.web_compile("path/to/sketch")
|
125
|
+
|
126
|
+
```
|
127
|
+
|
128
|
+
**Initializing a project example from the web compiler**
|
129
|
+
```python
|
130
|
+
|
131
|
+
from fastapi import Api
|
132
|
+
|
133
|
+
examples = Api.get_examples()
|
134
|
+
print(f"Print available examples: {examples}")
|
135
|
+
Api.project_init(examples[0])
|
136
|
+
|
137
|
+
|
138
|
+
```
|
139
|
+
|
140
|
+
**Initializing a project example from the CompileServer**
|
141
|
+
```python
|
142
|
+
|
143
|
+
from fastapi import Api
|
144
|
+
|
145
|
+
with Api.server() as server:
|
146
|
+
examples = server.get_examples()
|
147
|
+
server.project_init(examples[0])
|
148
|
+
|
149
|
+
```
|
150
|
+
|
151
|
+
# Features
|
152
|
+
|
153
|
+
## Hot reload by default
|
92
154
|
|
93
155
|
Once launched, the compiler will remain open, listening to changes and recompiling as necessary and hot-reloading the sketch into the current browser.
|
94
156
|
|
95
157
|
This style of development should be familiar to those doing web development.
|
96
158
|
|
97
|
-
|
159
|
+
## Hot Reload fastled/src when working in the FastLED repo
|
98
160
|
|
99
161
|
If you launch `fastled` in the FastLED repo then this tool will automatically detect this and map the src directory into the
|
100
162
|
host container. Whenever there are changes in the source code from the mapped directory, then these will be re-compiled
|
101
163
|
on the next change or if you hit the space bar when prompted. Unlike a sketch folder, a re-compile on the FastLED src
|
102
164
|
can be much longer, for example if you modify a header file.
|
103
165
|
|
104
|
-
|
166
|
+
## Big Data in `/data` directory won't be round-tripped
|
105
167
|
|
106
168
|
Huge blobs of data like video will absolutely kill the compile performance as these blobs would normally have to be shuffled
|
107
169
|
back and forth. Therefore a special directory `data/` is implicitly used to hold this blob data. Any data in this directory
|
@@ -114,7 +176,7 @@ files will be asynchroniously streamed into the running sketch instance during r
|
|
114
176
|
|
115
177
|
For an example of how to use this see `examples/SdCard` which is fully wasm compatible.
|
116
178
|
|
117
|
-
|
179
|
+
## Compile Speed
|
118
180
|
|
119
181
|
The compile speeds for this compiler have been optimized pretty much to the max. There are three compile settings available to the user. The default is `--quick`. Aggressive optimizations are done with `--release` which will aggressively optimize for size. The speed difference between `--release` and `--quick` seems negligable. But `--release` will produce a ~1/3 smaller binary. There is also `--debug`, which will include symbols necessary for debugging and getting the C++ function symbols working correctly in the browser during step through debugging. It works better than expected, but don't expect to have gdb or msvc debugger level of debugging experience.
|
120
182
|
|
@@ -124,22 +186,22 @@ The compilation to wasm will happen under a lock. Removing this lock requires re
|
|
124
186
|
|
125
187
|
Simple syntax errors will be caught by the pre-processing step. This happens without a lock to reduce the single lock bottleneck.
|
126
188
|
|
127
|
-
|
189
|
+
## Sketch Cache
|
128
190
|
|
129
191
|
Sketchs are aggresively finger-printed and stored in a cache. White space, comments, and other superficial data will be stripped out during pre-processing and minimization for fingerprinting. This source file decimation is only used for finger
|
130
192
|
printing while the actual source files are sent to compiler to preserve line numbers and file names.
|
131
193
|
|
132
194
|
This pre-processing done is done via gcc and special regex's and will happen without a lock. This will allow you to have extremely quick recompiles for whitespace and changes in comments even if the compiler is executing under it's lock.
|
133
195
|
|
134
|
-
|
196
|
+
## Local compiles
|
135
197
|
|
136
198
|
If the web-compiler get's congested then it's recommend that you run the compiler locally. This requires docker and will be invoked whenever you pass in `--local`. This will first pull the most recent Docker image of the Fastled compiler, launching a webserver and then connecting to it with the client once it's been up.
|
137
199
|
|
138
|
-
|
200
|
+
## Auto updates
|
139
201
|
|
140
202
|
In server mode the git repository will be cloned as a side repo and then periodically updated and rsync'd to the src directory. This allows a long running instance to stay updated.
|
141
203
|
|
142
|
-
|
204
|
+
## Compatibility with Arduino sketchs
|
143
205
|
|
144
206
|
The compatibility is actually pretty good. Most simple sketchs should compile out of the box. Even some of the avr platform includes are stubbed out to make it work. The familiar `digitalWrite()`, `Serial.println()` and other common functions work. Although `digitalRead()` will always return 0 and `analogRead()` will return random numbers.
|
145
207
|
|
@@ -163,6 +225,8 @@ A: A big chunk of space is being used by unnecessary javascript `emscripten` is
|
|
163
225
|
|
164
226
|
# Revisions
|
165
227
|
|
228
|
+
* 1.1.38 - Cleanup the `fastled.Api` object and streamline for general use.
|
229
|
+
* 1.1.37 - `Test.test_examples()` is now unit tested to work correctly.
|
166
230
|
* 1.1.36 - We now have an api. `from fastled import Api` and `from fastled import Test` for testing.
|
167
231
|
* 1.1.35 - When searching for files cap the limit at a high amount to prevent hang.
|
168
232
|
* 1.1.34 - On windows check to make sure we are in linux container mode, if not try to switch and if that fails then use `--web` compiler.
|