Skip to content

Patternflow v3.10.5

Latest

Choose a tag to compare

@engmung engmung released this 01 Oct 23:26
· 21 commits to main since this release

Every pattern runs faster, patterns that were refused for size now load, and the panel raises its own Wi-Fi when it has none.

Patterns

  • Every pattern is 2.45 ms a frame faster. Copying a finished frame to the panel was the largest fixed cost in the loop: 5.96 ms of every frame, nearly half of Origin's. It is 3.50 ms now and the picture is the same, word for word. Origin goes from 12.1 to 9.6 ms a frame, a 30 ms pattern to 27.6.
  • A pattern's code no longer takes the memory the network runs on. A loaded pattern's code had to fit in the board's internal RAM, the same RAM the console and Wi-Fi live in. It now runs from PSRAM, which has megabytes to spare. On the Audio edition a pattern with 23 or 32 KB of code used to be refused and now loads; one community pattern was failing to load about one time in four for want of 528 bytes and now loads every time. With a pattern running, the console has about 28 KB of internal memory to work in whatever the pattern's size, where a large one used to leave 21-23. Frame times are within about one percent of what they were.
  • A pattern's global constructors can use the host. A pattern that allocated memory or asked for a random number in a namespace-scope initialiser crashed the panel every time it was picked. It runs now.

Nothing to rebuild: installed .pfm files are unchanged and get all of this from the firmware.

When something goes wrong

  • A panel that crashed says where. /api/status used to say panic and nothing else. It now carries a crash object: which pattern was running, which of its calls (setup, update, draw), and the address inside the pattern, as an offset the .pfm's own symbols resolve. Clear it with DELETE /api/crash. It only reports; nothing is skipped or restarted on its account.
  • A pattern that hangs no longer takes the console with it. A pattern stuck in draw() used to freeze the panel and then the console behind it, and the only way out was the power cable. The console now keeps answering, the Status page says the panel is not answering and for how long, and Reboot and /update still work.
  • Five requests that could reboot the panel cannot any more. A form upload cut off part-way, curl -X POST to /api/patterns or /update with no form in it, and a request naming an absurdly long multipart boundary each restarted the board; a quote in a pattern's name made the pattern list unreadable; an abandoned upload could leave storage stuck busy. The request parser is now replayed against 13,953 cut-off, stalled and malformed requests on every change.
  • Lanes keep working past day 25. A panel left running untouched would have stopped answering its microphone or its weather on day 25.

The panel's own network

  • With no known Wi-Fi in reach the panel raises a hotspot, patternflow-a1b2 (password patternflow until you change it), and the whole console is at http://192.168.4.1/ on it - patterns, knobs, updates, and the Wi-Fi page to add the network of wherever you are. It lists the networks it can see so you can tap one instead of typing it.
  • Switching console tabs no longer downloads the page again, and the header is the same on every page.
  • A firmware upload survives a Wi-Fi hitch of up to two minutes, and the radio is back at full transmit power.

Also

  • Two 64x64 modules chained make a 128x64 panel (PANEL_GEOMETRY, the firmware64x2 build).
  • No more stray letters on the panel's own screens, and a deck sent from the community's dock keeps its order.

Editions

Audio v0.6.5 is re-cut on this core. Performance v0.4.0 - the clock, a Weather face and room for 100 sequences - is the image on the shelf and gets this core when its maintainer re-cuts it. Reflashing keeps your patterns, your Wi-Fi and your settings.

On the site

  • A guide you can play along with, in three parts, at patternflow.work/guide - work in progress and marked so.
  • A moderator can take a pattern or deck off the community wall without deleting it, and one press of Publish is one post.

How this was checked. The memory, speed, crash-record and hung-pattern changes were measured or reproduced on two panels - the default image and the Audio edition - before they were merged, with switch soaks of 160 to 400 pattern changes and no reset. The Performance and MIDI images build and pass their checks but were not run on a panel for this release, and none of it has had days in a closed enclosure yet. If something misbehaves, /api/status now has more to say about it: please attach it to the issue.

The full list is in CHANGELOG.md.