fastled 1.0.15__tar.gz → 1.1.0__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.
Files changed (102) hide show
  1. {fastled-1.0.15 → fastled-1.1.0}/.github/workflows/build_multi_docker_image.yml +0 -5
  2. {fastled-1.0.15 → fastled-1.1.0}/.gitignore +0 -1
  3. fastled-1.1.0/PKG-INFO +113 -0
  4. fastled-1.1.0/README.md +94 -0
  5. {fastled-1.0.15 → fastled-1.1.0}/examples/SdCard/SdCard.ino +24 -17
  6. {fastled-1.0.15 → fastled-1.1.0}/examples/wasm/wasm.ino +9 -7
  7. {fastled-1.0.15 → fastled-1.1.0}/pyproject.toml +54 -58
  8. {fastled-1.0.15 → fastled-1.1.0}/setup.py +0 -1
  9. {fastled-1.0.15 → fastled-1.1.0}/src/fastled/app.py +82 -160
  10. fastled-1.1.0/src/fastled/check_cpp_syntax.py +34 -0
  11. {fastled-1.0.15 → fastled-1.1.0}/src/fastled/compile_server.py +207 -221
  12. {fastled-1.0.15 → fastled-1.1.0}/src/fastled/docker_manager.py +7 -11
  13. {fastled-1.0.15 → fastled-1.1.0}/src/fastled/filewatcher.py +146 -196
  14. {fastled-1.0.15 → fastled-1.1.0}/src/fastled/open_browser.py +1 -5
  15. fastled-1.1.0/src/fastled/web_compile.py +173 -0
  16. fastled-1.1.0/src/fastled.egg-info/PKG-INFO +113 -0
  17. {fastled-1.0.15 → fastled-1.1.0}/src/fastled.egg-info/SOURCES.txt +1 -8
  18. {fastled-1.0.15 → fastled-1.1.0}/test +1 -1
  19. {fastled-1.0.15 → fastled-1.1.0}/tests/test_compile_server.py +1 -1
  20. fastled-1.1.0/tests/test_filechanger.py +51 -0
  21. {fastled-1.0.15 → fastled-1.1.0}/tests/test_webcompile.py +1 -1
  22. fastled-1.0.15/PKG-INFO +0 -196
  23. fastled-1.0.15/README.md +0 -177
  24. fastled-1.0.15/examples/SdCard/screenmap.json.h +0 -4
  25. fastled-1.0.15/src/fastled/__init__.py +0 -3
  26. fastled-1.0.15/src/fastled/keyboard.py +0 -91
  27. fastled-1.0.15/src/fastled/sketch.py +0 -55
  28. fastled-1.0.15/src/fastled/util.py +0 -10
  29. fastled-1.0.15/src/fastled/web_compile.py +0 -291
  30. fastled-1.0.15/src/fastled.egg-info/PKG-INFO +0 -196
  31. fastled-1.0.15/tests/test_embedded_data.py +0 -65
  32. fastled-1.0.15/tests/test_filechanger.py +0 -54
  33. fastled-1.0.15/tests/test_ino/wasm/wasm.ino +0 -134
  34. fastled-1.0.15/tests/test_server_and_client_seperatly.py +0 -42
  35. {fastled-1.0.15 → fastled-1.1.0}/.aiderignore +0 -0
  36. {fastled-1.0.15 → fastled-1.1.0}/.github/workflows/lint.yml +0 -0
  37. {fastled-1.0.15 → fastled-1.1.0}/.github/workflows/test_macos.yml +0 -0
  38. {fastled-1.0.15 → fastled-1.1.0}/.github/workflows/test_ubuntu.yml +0 -0
  39. {fastled-1.0.15 → fastled-1.1.0}/.github/workflows/test_win.yml +0 -0
  40. {fastled-1.0.15 → fastled-1.1.0}/.pylintrc +0 -0
  41. {fastled-1.0.15 → fastled-1.1.0}/.vscode/launch.json +0 -0
  42. {fastled-1.0.15 → fastled-1.1.0}/.vscode/settings.json +0 -0
  43. {fastled-1.0.15 → fastled-1.1.0}/.vscode/tasks.json +0 -0
  44. {fastled-1.0.15 → fastled-1.1.0}/LICENSE +0 -0
  45. {fastled-1.0.15 → fastled-1.1.0}/MANIFEST.in +0 -0
  46. {fastled-1.0.15 → fastled-1.1.0}/clean +0 -0
  47. {fastled-1.0.15 → fastled-1.1.0}/docs/fastled.js +0 -0
  48. {fastled-1.0.15 → fastled-1.1.0}/docs/fastled.wasm +0 -0
  49. {fastled-1.0.15 → fastled-1.1.0}/docs/index.css +0 -0
  50. {fastled-1.0.15 → fastled-1.1.0}/docs/index.html +0 -0
  51. {fastled-1.0.15 → fastled-1.1.0}/docs/index.js +0 -0
  52. {fastled-1.0.15 → fastled-1.1.0}/examples/Blink/Blink.ino +0 -0
  53. {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/Chromancer.ino +0 -0
  54. {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/detail.h +0 -0
  55. {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/gary_woos_wled_port/gary_woos_wled_ledmap.h +0 -0
  56. {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/gary_woos_wled_port/presets.json +0 -0
  57. {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/gary_woos_wled_port/presets.min.json +0 -0
  58. {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/gen.py +0 -0
  59. {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/mapping.h +0 -0
  60. {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/net.h +0 -0
  61. {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/output.json +0 -0
  62. {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/ripple.h +0 -0
  63. {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/screenmap.json.h +0 -0
  64. {fastled-1.0.15 → fastled-1.1.0}/examples/ColorPalette/ColorPalette.ino +0 -0
  65. {fastled-1.0.15 → fastled-1.1.0}/examples/ColorTemperature/ColorTemperature.ino +0 -0
  66. {fastled-1.0.15 → fastled-1.1.0}/examples/Cylon/Cylon.ino +0 -0
  67. {fastled-1.0.15 → fastled-1.1.0}/examples/DemoReel100/DemoReel100.ino +0 -0
  68. {fastled-1.0.15 → fastled-1.1.0}/examples/Esp32Rmt51/Esp32Rmt51.ino +0 -0
  69. {fastled-1.0.15 → fastled-1.1.0}/examples/EspI2SDemo/EspI2SDemo.ino +0 -0
  70. {fastled-1.0.15 → fastled-1.1.0}/examples/Fire2012/Fire2012.ino +0 -0
  71. {fastled-1.0.15 → fastled-1.1.0}/examples/Fire2012WithPalette/Fire2012WithPalette.ino +0 -0
  72. {fastled-1.0.15 → fastled-1.1.0}/examples/FirstLight/FirstLight.ino +0 -0
  73. {fastled-1.0.15 → fastled-1.1.0}/examples/FxEngine/FxEngine.ino +0 -0
  74. {fastled-1.0.15 → fastled-1.1.0}/examples/Noise/Noise.ino +0 -0
  75. {fastled-1.0.15 → fastled-1.1.0}/examples/NoisePlayground/NoisePlayground.ino +0 -0
  76. {fastled-1.0.15 → fastled-1.1.0}/examples/NoisePlusPalette/NoisePlusPalette.ino +0 -0
  77. {fastled-1.0.15 → fastled-1.1.0}/examples/OctoWS2811/OctoWS2811.ino +0 -0
  78. {fastled-1.0.15 → fastled-1.1.0}/examples/Pacifica/Pacifica.ino +0 -0
  79. {fastled-1.0.15 → fastled-1.1.0}/examples/Pride2015/Pride2015.ino +0 -0
  80. {fastled-1.0.15 → fastled-1.1.0}/examples/TwinkleFox/TwinkleFox.ino +0 -0
  81. {fastled-1.0.15 → fastled-1.1.0}/examples/Video/Gfx2Video/Gfx2Video.ino +0 -0
  82. {fastled-1.0.15 → fastled-1.1.0}/examples/WasmScreenCoords/WasmScreenCoords.ino +0 -0
  83. {fastled-1.0.15 → fastled-1.1.0}/examples/Water/Water.ino +0 -0
  84. {fastled-1.0.15 → fastled-1.1.0}/examples/XYMatrix/XYMatrix.ino +0 -0
  85. {fastled-1.0.15 → fastled-1.1.0}/install +0 -0
  86. {fastled-1.0.15 → fastled-1.1.0}/lint +0 -0
  87. {fastled-1.0.15 → fastled-1.1.0}/requirements.testing.txt +0 -0
  88. {fastled-1.0.15 → fastled-1.1.0}/setup.cfg +0 -0
  89. /fastled-1.0.15/tests/test_ino/embedded/data/bigdata.dat → /fastled-1.1.0/src/fastled/__init__.py +0 -0
  90. {fastled-1.0.15 → fastled-1.1.0}/src/fastled/assets/example.txt +0 -0
  91. {fastled-1.0.15 → fastled-1.1.0}/src/fastled/build_mode.py +0 -0
  92. {fastled-1.0.15 → fastled-1.1.0}/src/fastled/cli.py +0 -0
  93. {fastled-1.0.15 → fastled-1.1.0}/src/fastled/paths.py +0 -0
  94. {fastled-1.0.15 → fastled-1.1.0}/src/fastled.egg-info/dependency_links.txt +0 -0
  95. {fastled-1.0.15 → fastled-1.1.0}/src/fastled.egg-info/entry_points.txt +0 -0
  96. {fastled-1.0.15 → fastled-1.1.0}/src/fastled.egg-info/requires.txt +0 -0
  97. {fastled-1.0.15 → fastled-1.1.0}/src/fastled.egg-info/top_level.txt +0 -0
  98. {fastled-1.0.15 → fastled-1.1.0}/tests/test_bad_ino.py +0 -0
  99. {fastled-1.0.15 → fastled-1.1.0}/tests/test_cli.py +0 -0
  100. {fastled-1.0.15 → fastled-1.1.0}/tests/test_ino/bad/bad.ino +0 -0
  101. {fastled-1.0.15/tests/test_ino/embedded → fastled-1.1.0/tests/test_ino/wasm}/wasm.ino +0 -0
  102. {fastled-1.0.15 → fastled-1.1.0}/upload_package.sh +0 -0
@@ -100,8 +100,3 @@ jobs:
100
100
  - name: Inspect image
101
101
  run: |
102
102
  docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
103
-
104
- - name: Redeploy FastLED web service
105
- run: |
106
- curl ${{ secrets.FASTLED_REDEPLOY_URL }}
107
-
@@ -14,7 +14,6 @@ __pycache__/
14
14
  .Python
15
15
  prod_env/
16
16
  data/
17
- !tests/test_ino/embedded/data
18
17
  build/
19
18
  develop-eggs/
20
19
  dist/
fastled-1.1.0/PKG-INFO ADDED
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.1
2
+ Name: fastled
3
+ Version: 1.1.0
4
+ Summary: FastLED Wasm Compiler
5
+ Home-page: https://github.com/zackees/fastled-wasm
6
+ Maintainer: Zachary Vorhies
7
+ License: BSD 3-Clause License
8
+ Keywords: template-python-cmd
9
+ Classifier: Programming Language :: Python :: 3
10
+ Requires-Python: >=3.7
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: docker
14
+ Requires-Dist: httpx
15
+ Requires-Dist: watchdog
16
+ Requires-Dist: livereload
17
+ Requires-Dist: download
18
+ Requires-Dist: filelock
19
+
20
+ # FastLED wasm compiler
21
+
22
+ Compiles an Arduino/Platformio sketch into a wasm binary that can be run directly in the web browser.
23
+
24
+ [![Linting](https://github.com/zackees/fastled-wasm/actions/workflows/lint.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/lint.yml)
25
+ [![Build and Push Multi Docker Image](https://github.com/zackees/fastled-wasm/actions/workflows/build_multi_docker_image.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/build_multi_docker_image.yml)
26
+ [![MacOS_Tests](https://github.com/zackees/fastled-wasm/actions/workflows/test_macos.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_macos.yml)
27
+ [![Ubuntu_Tests](https://github.com/zackees/fastled-wasm/actions/workflows/test_ubuntu.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_ubuntu.yml)
28
+ [![Win_Tests](https://github.com/zackees/fastled-wasm/actions/workflows/test_win.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_win.yml)
29
+
30
+
31
+
32
+ # About
33
+
34
+ This python app will compile your FastLED style sketches into html/js/wasm output that runs directly in the browser.
35
+
36
+ Compile times are extremely fast - I've seen as low as 5 seconds but 8-15 seconds is typical.
37
+
38
+ This works on Windows/Linux/Mac(arm/x64).
39
+
40
+ Docker is required.
41
+
42
+ https://github.com/user-attachments/assets/64ae0e6c-5f8b-4830-ab87-dcc25bc61218
43
+
44
+ # Demo
45
+
46
+ https://zackees.github.io/fastled-wasm/
47
+
48
+
49
+
50
+ # Install
51
+
52
+ ```bash
53
+ pip install fastled-wasm
54
+ ```
55
+
56
+ **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.**
57
+
58
+ # Use
59
+
60
+ Change to the directory where the sketch lives and run
61
+
62
+ ```bash
63
+ cd <SKETCH-DIRECTORY>
64
+ fastled-wasm
65
+ ```
66
+
67
+ Or if you don't have docker then use our web compiler
68
+
69
+ ```bash
70
+ cd <SKETCH-DIRECTORY>
71
+ fastled-wasm --web
72
+ ```
73
+
74
+ After compilation a web browser windows will pop up.
75
+
76
+ # Hot reload by default
77
+
78
+ Once launched, the compiler will remain open, listening to changes and recompiling as necessary and hot-reloading the sketch into the current browser.
79
+
80
+ This style of development should be familiar to those doing web development.
81
+
82
+ # Data
83
+
84
+ If you want to embed data, then do so in the `data/` directory at the project root. The files will appear in the `data/` director of any spawned FileSystem or SDCard.
85
+
86
+
87
+ ### About the compilation.
88
+
89
+ Pre-processing is done to your source files. A fake Arduino.h will be inserted into your source files that will
90
+ provide shims for most of the common api points.
91
+
92
+
93
+ # Revisions
94
+
95
+ * 1.1.0 - Use `fastled` as the command for the wasm compiler.
96
+ * 1.0.17 - Pulls updates when necessary. Removed dependency on keyring.
97
+ * 1.0.16 - `fastled-wasm` package name has been changed to `fled`
98
+ * 1.0.15 - `fled` is an alias of `fastled-wasm` and will eventually replace it. `--web-host` was folded into `--web`, which if unspecified will attempt to run a local docker server and fallback to the cloud server if that fails. Specifying `--web` with no arguments will default to the cloud server while an argument (like `localhost`) will cause it to bind to that already running server for compilation.
99
+ * 1.0.14 - For non significant changes (comments, whitespace) in C++/ino/*.h files, compilation is skipped. This significantly reduces load on the server and prevents unnecessary local client browser refreshes.
100
+ * 1.0.13 - Increase speed of local compiles by running the server version of the compiler so it can keep it's cache and not have to pay docker startup costs because now it's a persistant server until exit.
101
+ * 1.0.12 - Added suppport for compile modes. Pass in `--release`, `--quick`, `--debug` for different compile options. We also support `--profile` to profile the build process.
102
+ * 1.0.11 - `--web` compile will automatically be enabled if the local build using docker fails.
103
+ * 1.0.10 - Watching files is now available for `--web`
104
+ * 1.0.9 - Enabled web compile. Access it with `--web` or `--web-host`
105
+ * 1.0.8 - Allow more than one fastled-wasm browser instances to co-exist by searching for unused ports after 8081.
106
+ * 1.0.7 - Docker multi image build implemented, tool now points to new docker image compile.
107
+ * 1.0.6 - Removed `--no-open` and `--watch`, `--watch` is now assumed unless `--just-compile` is used.
108
+ * 1.0.5 - Implemented `--update` to update the compiler image from the docker registry.
109
+ * 1.0.4 - Implemented `--watch` which will watch for changes and then re-launch the compilation step.
110
+ * 1.0.3 - Integrated `live-server` to launch when available.
111
+ * 1.0.2 - Small bug with new installs.
112
+ * 1.0.1 - Re-use is no longer the default, due to problems.
113
+ * 1.0.0 - Initial release.
@@ -0,0 +1,94 @@
1
+ # FastLED wasm compiler
2
+
3
+ Compiles an Arduino/Platformio sketch into a wasm binary that can be run directly in the web browser.
4
+
5
+ [![Linting](https://github.com/zackees/fastled-wasm/actions/workflows/lint.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/lint.yml)
6
+ [![Build and Push Multi Docker Image](https://github.com/zackees/fastled-wasm/actions/workflows/build_multi_docker_image.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/build_multi_docker_image.yml)
7
+ [![MacOS_Tests](https://github.com/zackees/fastled-wasm/actions/workflows/test_macos.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_macos.yml)
8
+ [![Ubuntu_Tests](https://github.com/zackees/fastled-wasm/actions/workflows/test_ubuntu.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_ubuntu.yml)
9
+ [![Win_Tests](https://github.com/zackees/fastled-wasm/actions/workflows/test_win.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/test_win.yml)
10
+
11
+
12
+
13
+ # About
14
+
15
+ This python app will compile your FastLED style sketches into html/js/wasm output that runs directly in the browser.
16
+
17
+ Compile times are extremely fast - I've seen as low as 5 seconds but 8-15 seconds is typical.
18
+
19
+ This works on Windows/Linux/Mac(arm/x64).
20
+
21
+ Docker is required.
22
+
23
+ https://github.com/user-attachments/assets/64ae0e6c-5f8b-4830-ab87-dcc25bc61218
24
+
25
+ # Demo
26
+
27
+ https://zackees.github.io/fastled-wasm/
28
+
29
+
30
+
31
+ # Install
32
+
33
+ ```bash
34
+ pip install fastled-wasm
35
+ ```
36
+
37
+ **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.**
38
+
39
+ # Use
40
+
41
+ Change to the directory where the sketch lives and run
42
+
43
+ ```bash
44
+ cd <SKETCH-DIRECTORY>
45
+ fastled-wasm
46
+ ```
47
+
48
+ Or if you don't have docker then use our web compiler
49
+
50
+ ```bash
51
+ cd <SKETCH-DIRECTORY>
52
+ fastled-wasm --web
53
+ ```
54
+
55
+ After compilation a web browser windows will pop up.
56
+
57
+ # Hot reload by default
58
+
59
+ Once launched, the compiler will remain open, listening to changes and recompiling as necessary and hot-reloading the sketch into the current browser.
60
+
61
+ This style of development should be familiar to those doing web development.
62
+
63
+ # Data
64
+
65
+ If you want to embed data, then do so in the `data/` directory at the project root. The files will appear in the `data/` director of any spawned FileSystem or SDCard.
66
+
67
+
68
+ ### About the compilation.
69
+
70
+ Pre-processing is done to your source files. A fake Arduino.h will be inserted into your source files that will
71
+ provide shims for most of the common api points.
72
+
73
+
74
+ # Revisions
75
+
76
+ * 1.1.0 - Use `fastled` as the command for the wasm compiler.
77
+ * 1.0.17 - Pulls updates when necessary. Removed dependency on keyring.
78
+ * 1.0.16 - `fastled-wasm` package name has been changed to `fled`
79
+ * 1.0.15 - `fled` is an alias of `fastled-wasm` and will eventually replace it. `--web-host` was folded into `--web`, which if unspecified will attempt to run a local docker server and fallback to the cloud server if that fails. Specifying `--web` with no arguments will default to the cloud server while an argument (like `localhost`) will cause it to bind to that already running server for compilation.
80
+ * 1.0.14 - For non significant changes (comments, whitespace) in C++/ino/*.h files, compilation is skipped. This significantly reduces load on the server and prevents unnecessary local client browser refreshes.
81
+ * 1.0.13 - Increase speed of local compiles by running the server version of the compiler so it can keep it's cache and not have to pay docker startup costs because now it's a persistant server until exit.
82
+ * 1.0.12 - Added suppport for compile modes. Pass in `--release`, `--quick`, `--debug` for different compile options. We also support `--profile` to profile the build process.
83
+ * 1.0.11 - `--web` compile will automatically be enabled if the local build using docker fails.
84
+ * 1.0.10 - Watching files is now available for `--web`
85
+ * 1.0.9 - Enabled web compile. Access it with `--web` or `--web-host`
86
+ * 1.0.8 - Allow more than one fastled-wasm browser instances to co-exist by searching for unused ports after 8081.
87
+ * 1.0.7 - Docker multi image build implemented, tool now points to new docker image compile.
88
+ * 1.0.6 - Removed `--no-open` and `--watch`, `--watch` is now assumed unless `--just-compile` is used.
89
+ * 1.0.5 - Implemented `--update` to update the compiler image from the docker registry.
90
+ * 1.0.4 - Implemented `--watch` which will watch for changes and then re-launch the compilation step.
91
+ * 1.0.3 - Integrated `live-server` to launch when available.
92
+ * 1.0.2 - Small bug with new installs.
93
+ * 1.0.1 - Re-use is no longer the default, due to problems.
94
+ * 1.0.0 - Initial release.
@@ -21,12 +21,8 @@ void loop() {
21
21
  #include "fx/video.h"
22
22
  #include "file_system.h"
23
23
  #include "ui.h"
24
- #include "screenmap.h"
25
- #include "file_system.h"
26
-
27
-
28
- #include "screenmap.json.h" // const char JSON_SCREEN_MAP[] = { ... }
29
24
 
25
+ #include "file_system.h"
30
26
 
31
27
  #define LED_PIN 2
32
28
  #define LED_TYPE WS2811
@@ -42,13 +38,8 @@ void loop() {
42
38
  #define NUM_LEDS (MATRIX_WIDTH * MATRIX_HEIGHT)
43
39
  #define IS_SERPINTINE true
44
40
 
45
-
46
- Title title("SDCard Demo - Mapped Video");
47
- Description description("Video data is streamed off of a SD card and displayed on a LED strip. The video data is mapped to the LED strip using a ScreenMap.");
48
-
49
-
50
41
  CRGB leds[NUM_LEDS];
51
- ScreenMap screenMap;
42
+ XYMap xyMap(MATRIX_WIDTH, MATRIX_HEIGHT, IS_SERPINTINE); // No serpentine
52
43
 
53
44
  FileSystem filesystem;
54
45
  Video video;
@@ -60,14 +51,9 @@ void setup() {
60
51
  if (!filesystem.beginSd(CHIP_SELECT_PIN)) {
61
52
  Serial.println("Failed to initialize file system.");
62
53
  }
63
- // JSON_SCREEN_MAP
64
- FixedMap<Str, ScreenMap, 16> screenMaps;
65
- ScreenMap::ParseJson(JSON_SCREEN_MAP, &screenMaps);
66
- ScreenMap screenMap = screenMaps["strip1"];
67
-
68
54
  FastLED.addLeds<LED_TYPE, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS)
69
55
  .setCorrection(TypicalLEDStrip)
70
- .setScreenMap(screenMap);
56
+ .setScreenMap(xyMap);
71
57
  FastLED.setBrightness(96);
72
58
  //fxEngine.addFx(animartrix);
73
59
  video = filesystem.openVideo("data/video.dat", NUM_LEDS, FPS);
@@ -78,7 +64,28 @@ void setup() {
78
64
 
79
65
  void loop() {
80
66
  uint32_t now = millis();
67
+
68
+ // fxEngine.draw(millis(), leds);
81
69
  video.draw(now, leds);
70
+
71
+ EVERY_N_SECONDS(1){
72
+ Serial.println("Drawing");
73
+ for (int i = 0; i < NUM_LEDS;) {
74
+ int nleft = MIN(8, NUM_LEDS - i);
75
+ for (int j = 0; j < nleft; j++) {
76
+ CRGB c = leds[i + j];
77
+ Serial.print("(");
78
+ Serial.print(c.r);
79
+ Serial.print(", ");
80
+ Serial.print(c.g);
81
+ Serial.print(", ");
82
+ Serial.print(c.b);
83
+ Serial.print(") ");
84
+ }
85
+ Serial.println();
86
+ i += nleft;
87
+ }
88
+ }
82
89
  FastLED.show();
83
90
  }
84
91
 
@@ -14,8 +14,9 @@
14
14
  #include "fx/fx_engine.h"
15
15
 
16
16
  #include "fx/2d/animartrix.hpp"
17
- #include "ui.h"
17
+ #include "platforms/wasm/js.h"
18
18
 
19
+ #include "ui.h"
19
20
 
20
21
  #define LED_PIN 3
21
22
  #define BRIGHTNESS 96
@@ -68,9 +69,6 @@ CRGB leds[NUM_LEDS];
68
69
  XYMap xyMap = XYMap::constructRectangularGrid(MATRIX_WIDTH, MATRIX_HEIGHT);
69
70
  NoisePalette noisePalette = NoisePalette(xyMap);
70
71
 
71
- Title title("FastLED Wasm Demo");
72
- Description description("This example combines two features of FastLED to produce a remarkable range of effects from a relatively small amount of code. This example combines FastLED's color palette lookup functions with FastLED's Perlin noise generator, and the combination is extremely powerful.");
73
-
74
72
  Slider brightness("Brightness", 255, 0, 255);
75
73
  Checkbox isOff("Off", false);
76
74
  Slider speed("Noise - Speed", 15, 1, 50);
@@ -79,13 +77,12 @@ Slider changePalletTime("Noise - Time until next random Palette", 5, 1, 100);
79
77
  Slider scale( "Noise - Scale", 20, 1, 100);
80
78
  Button changePalette("Noise - Next Palette");
81
79
  Button changeFx("Switch between Noise & Animartrix");
82
- NumberField fxIndex("Animartrix - iex", 0, 0, NUM_ANIMATIONS);
80
+ NumberField fxIndex("Animartrix - index", 0, 0, NUM_ANIMATIONS);
81
+
83
82
 
84
83
  Animartrix animartrix(xyMap, POLAR_WAVES);
85
84
  FxEngine fxEngine(NUM_LEDS);
86
85
 
87
-
88
-
89
86
  void setup() {
90
87
  FastLED.addLeds<WS2811, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS)
91
88
  .setCorrection(TypicalLEDStrip)
@@ -122,6 +119,11 @@ void loop() {
122
119
  animartrix.fxSet(fxIndex);
123
120
  }
124
121
 
122
+ EVERY_N_MILLISECONDS(1000) {
123
+ printf("fastled running\r\n");
124
+ printf("Numberfield: %f\r\n", fxIndex.value());
125
+ }
126
+
125
127
 
126
128
  fxEngine.draw(millis(), leds);
127
129
  FastLED.show();
@@ -1,58 +1,54 @@
1
- [build-system]
2
- requires = ["setuptools>=65.5.1", "setuptools-scm", "wheel"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "fastled"
7
- readme = "README.md"
8
- description = "FastLED Wasm Compiler"
9
- requires-python = ">=3.7"
10
- keywords = ["template-python-cmd"]
11
- license = { text = "BSD 3-Clause License" }
12
- classifiers = ["Programming Language :: Python :: 3"]
13
- dependencies = [
14
- "docker",
15
- "httpx",
16
- "watchdog",
17
- "livereload",
18
- "download",
19
- "filelock",
20
- ]
21
-
22
- dynamic = ["version"]
23
-
24
-
25
- [tool.setuptools]
26
- package-dir = {"" = "src"}
27
-
28
- [tool.setuptools.dynamic]
29
- version = { attr = "fastled.__version__" }
30
-
31
- [tool.ruff]
32
- line-length = 200
33
-
34
- [tool.pylint."MESSAGES CONTROL"]
35
- good-names = [
36
- "c",
37
- "i",
38
- "ok",
39
- "id",
40
- "e",
41
- "f"
42
- ]
43
- disable = [
44
- "missing-function-docstring",
45
- "missing-module-docstring"
46
- ]
47
-
48
- [tool.isort]
49
- profile = "black"
50
-
51
- [tool.mypy]
52
- ignore_missing_imports = true
53
- disable_error_code = ["import-untyped"]
54
-
55
- [project.scripts]
56
- fastled-wasm = "fastled.cli:main"
57
- fled = "fastled.cli:main"
58
- fastled = "fastled.cli:main"
1
+ [build-system]
2
+ requires = ["setuptools>=65.5.1", "setuptools-scm", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "fastled"
7
+ readme = "README.md"
8
+ description = "FastLED Wasm Compiler"
9
+ requires-python = ">=3.7"
10
+ keywords = ["template-python-cmd"]
11
+ license = { text = "BSD 3-Clause License" }
12
+ classifiers = ["Programming Language :: Python :: 3"]
13
+ dependencies = [
14
+ "docker",
15
+ "httpx",
16
+ "watchdog",
17
+ "livereload",
18
+ "download",
19
+ "filelock",
20
+ ]
21
+ # Change this with the version number bump.
22
+ version = "1.1.0"
23
+
24
+ [tool.setuptools]
25
+ package-dir = {"" = "src"}
26
+
27
+ [tool.ruff]
28
+ line-length = 200
29
+
30
+ [tool.pylint."MESSAGES CONTROL"]
31
+ good-names = [
32
+ "c",
33
+ "i",
34
+ "ok",
35
+ "id",
36
+ "e",
37
+ "f"
38
+ ]
39
+ disable = [
40
+ "missing-function-docstring",
41
+ "missing-module-docstring"
42
+ ]
43
+
44
+ [tool.isort]
45
+ profile = "black"
46
+
47
+ [tool.mypy]
48
+ ignore_missing_imports = true
49
+ disable_error_code = ["import-untyped"]
50
+
51
+ [project.scripts]
52
+ fastled-wasm = "fastled.cli:main"
53
+ fled = "fastled.cli:main"
54
+ fastled = "fastled.cli:main"
@@ -4,7 +4,6 @@ Setup file.
4
4
 
5
5
  import os
6
6
  import re
7
- from pathlib import Path
8
7
 
9
8
  from setuptools import setup
10
9