Public Access
Fix shifted pictures: non-blocking Nano drawing, frame check, refresh settings
The Nano's periodic full redraw blocked for ~0.8 s. A frame that arrived meanwhile overflowed its 64-byte serial buffer; lost bytes in a bitmap shift the rest of the image (picture moved up), and diff frames never repaired it. - Nano: all drawing (frames, effects, the dot refresh) runs from update() in ~1 ms slices; the refresh pauses while a frame is received or shown - New commands: C (reply with the image checksum) and I (refresh minutes, EEPROM) - ESP32: NanoMonitor asks for the checksum after frames and sends the whole image again on a mismatch, missing answer or Nano restart; counts ERR replies. Periodic whole-image resync. - Settings: "Dot refresh" and "Image resync" intervals (settings v5, v4 records are migrated) - System tab: loop timing, free memory, frame check counts - test_driver: the real driver against a simulated panel Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
58a7cb03c2
commit
090c2bf8ae
45 files changed
+1265
-157
No files matched your search
@@ -20,7 +20,13 @@
|
||||
3. **Home Assistant**: switches, dropdowns and sensors over MQTT, see
|
||||
[Home Assistant](home-assistant.md).
|
||||
4. **Nano.** The Nano reads commands from the serial line and updates its frame buffer.
|
||||
On `D` it flips only the dots that changed. Every 2 minutes it redraws the whole screen
|
||||
to fix dots that did not flip.
|
||||
On `D` it flips only the dots that changed, in small steps so it never stops reading
|
||||
the serial port. Every 2 minutes (Settings, "Dot refresh") it flips every dot once
|
||||
more to fix dots that did not flip.
|
||||
5. **Frame check.** After a frame the ESP asks the Nano for a checksum of its image and
|
||||
compares it with what it sent. When they differ (lost bytes can shift the picture),
|
||||
the Nano doesn't answer, or it restarted, the ESP sends the whole image again. It also
|
||||
does that every 10 minutes (Settings, "Image resync"); only dots that differ flip, so
|
||||
normally nothing changes. The counts are on the System tab.
|
||||
|
||||
The serial protocol is described in [src/nano/README.md](../src/nano/README.md).
|
||||
+9
-1
@@ -88,7 +88,9 @@ The display schedule (on/off, when the display is on, the late-evening quarter-h
|
||||
when it switches off); the "No WiFi" screen; the flip time, the pause after each pulse,
|
||||
pulses per dot and the refresh effect (instant, sparkle, wipe, rain, from the middle out,
|
||||
diagonal, spiral, flip all then reveal, push, random; optionally only for small changes
|
||||
like the clock's minutes); test patterns; the status LED.
|
||||
like the clock's minutes); how often every dot is flipped again ("Dot refresh", default
|
||||
2 min) and how often the whole image is sent again ("Image resync", default 10 min; 0
|
||||
switches either off); test patterns; the status LED.
|
||||
|
||||

|
||||
|
||||
@@ -104,6 +106,12 @@ pages and the rules (REST API, plain http; empty URL: `http://<broker>:8123`). S
|
||||
## System
|
||||
|
||||
Firmware status, uptime, WiFi, storage; restart; start the [recovery app](recovery.md).
|
||||
**Loop:** how busy the ESP32 is: `loop()` passes per second and the average and longest
|
||||
pass over the last 10 s (and the longest since boot; a Home Assistant request can take a
|
||||
few seconds). `loop()` never sleeps, so a CPU percentage would always say 100 %.
|
||||
**Frame check:** how many checks of the Nano's image matched, differed or got no answer,
|
||||
how often the image was repaired, Nano restarts and `ERR` replies (with the last one).
|
||||
**Memory:** free heap now and the lowest since boot.
|
||||
|
||||
**Backup:** export everything (settings, the schedule and rules, your bitmaps, pages and
|
||||
fonts; the MQTT password and HA token only when ticked) to one JSON file, and import a
|
||||
|
||||
Reference in new issue
Block a user