Hello!
I’m working on finishing up V3.19. There’s some new features, bug fixes, and features around stability.
Here’s the full change log:
- Array literals! This will be very handy for initial setup and data sets for sure. Also comes with a new function/method for setting/overwriting many elements an array at once. No GC, so it’s still important to re-use arrays.
-
rgb()
calls with RGBW strips now use the white element, and have HDR support for APA102/SK9822 LEDs (RGBClock looks amazing!) - Fixed redirect in captive portal that was causing some operating systems and/or network setups to have problems.
- Global variable limits are checked, and if you happen to run out (on V3 thats 255 of your own, plus pixelCount) you will get a nice error on that line instead of crashing.
- Fixed a bug that would prevent entering setup mode (and clearing some other nonvolatile memory) if it was already in setup mode. It now works reliably, and the flashing pattern is consistent (always BLINK + 3 flashes).
- Fix discovery flag setting in the recovery.html app
- Added Multi-matrix mapper example
- Command/Control - s will now act like clicking the Save pattern button.
- Fixed some issues and improved responsiveness of the websocket connected indicator.
- Fixed issues with open/unsecured WiFi network configuration. The lock icon shouldn’t show up for open networks, and the validation state handling of the passphrase field has been fixed.
- Resets due to brownout (when detectable) no longer trigger loading fail-safe settings.
- When fail-safe settings are loaded, a popup message will show up warning that this is the case.
- Likewise, when a brownout was detected a popup message will warn about power issues.
If you’ve been having any problems related to these issues and would like to try this beta, please let me know! I’d love to get more eyes on it in the field.
Array literals have to be the most requested feature, and I’m happy to add this! It’s going to be much easier to pull in data sets/tables and that sort of thing.
I also want to add the function that is doing all the work behind the scenes, so that we can update arrays easily as well. Since Pixelblaze’s language doesn’t yet have GC, we can’t create new arrays indefinitely and arrays should be reused instead.
Like other array functions, this will be available as a function that takes an array, and as a method that works on the array directly. The first argument is the index to start replacing values. You can use it to update a subset within an array, or set it to zero to update from the beginning. Any following arguments will then replace/overwrite any previous values. Giving too many values generates runtime errors, just like if you tried to write outside of an array element by element.
What should it be called? If it were named foo
you could use it like this:
var data = [1, 2, 3, 4]
data.foo(0, 5, 6) // data is now [5, 6, 3, 4]
data.foo(2, 7, 8) // data is now [5, 6, 7, 8]
data.foo(0, 1, 2, 3, 4) // data is now [1, 2, 3, 4]
Please give us some good name ideas
As soon as I can get a decent name, I’ll publish the beta for folks to try out, and assuming all goes well, push this as an update soon.