Two indoor sensors, wind compass, and stop framebuffer cache thrashing
Downstairs and upstairs are now separate readings. The station names them
backwards -- "temperature_4" is downstairs and "inside_temperature" is
upstairs -- so ha_config.h says which is which. Downstairs is the primary:
big number on the card, and it is what the furnace controls on, because it
is where people are and heat rises. Upstairs sits beside it, obviously
subordinate by size, and costs no vertical space in a layout that has none.
The anemometer came back on 2026-08-07, so wind gets its own column: a dial
whose needle points at the direction the wind is coming FROM (weather-vane
convention, matching the cardinal below it), the speed, and a 5-minute trend
arrow.
- The needle does not animate. A spin would look better, but every animated
frame is a redraw, and redrawing is what starves the bounce refill ISR.
- Below 0.5 mph it shows "Calm" and draws no needle. A vane that is not
being pushed reports whatever it last settled on, which on this station
is a steady 0 degrees -- a confident needle pointing due north at zero
wind. The live snapshot caught exactly that.
- The trend is local, not HA's 10-minute average, so the window is ours to
pick: 1-minute buckets over 5 minutes, threshold 1.5 mph.
That last point needed the trend engine to stop assuming one hour. Window,
bucket size, minimum age and threshold are now per-channel in a table, which
also removes the threshold arguments main.c was passing in.
Grid drops to 117px cells to make room, so the sun sub-line is just which
event it is and "RAIN TODAY" is "RAIN" -- both were overrunning.
On the artefacts: bounce mode is NOT a DMA read of the framebuffer. The
refill is a CPU memcpy in an ISR, which is why the driver skips the usual
write-back in draw_bitmap ("the data gets read by the CPU as well"). So the
panel streams 750KB per frame at ~44Hz through the DCache, evicting the
working set of everything else on the chip, continuously -- which is the real
reason this board is so sensitive to WiFi and to any extra rendering.
bb_invalidate_cache frees each chunk after it is copied. The header warns it
"can be dangerous if data is written from other core(s)"; that does not apply
here, because it invalidates the buffer being scanned and by design LVGL only
draws into the other one. Whether it is enough is for the panel to say.
Also gives tools/ha_snapshot.py a --token-file so the token no longer has to
travel through a shell command line to reach it.
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
7a58f9838a
commit
ea1b8b8d15
13 files changed
+435
-155
No files matched your search
@@ -193,6 +193,25 @@ esp_err_t display_alloc(void)
|
||||
},
|
||||
.flags = {
|
||||
.fb_in_psram = true,
|
||||
/*
|
||||
* Free the cache lines the bounce refill just consumed.
|
||||
*
|
||||
* Bounce mode is not a DMA read of the framebuffer -- the refill
|
||||
* is a CPU memcpy in an ISR, which is why the driver skips the
|
||||
* usual write-back in draw_bitmap ("the data gets read by the CPU
|
||||
* as well"). So the panel streams 750KB per frame at ~44Hz
|
||||
* *through the DCache*, evicting the working set of everything
|
||||
* else on the chip continuously. That is the real reason this
|
||||
* board is so sensitive to WiFi activity and to any extra
|
||||
* rendering.
|
||||
*
|
||||
* This flag invalidates each chunk after it has been copied, so
|
||||
* framebuffer traffic stops polluting the cache. The header warns
|
||||
* it "can be dangerous if data is written from other core(s)" --
|
||||
* that does not apply here: it invalidates the buffer being
|
||||
* scanned, and by design LVGL only ever draws into the other one.
|
||||
*/
|
||||
.bb_invalidate_cache = true,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user