Show a spinner while a screen starts and while a camera loads, bring a camera's first picture sooner, and round the alert's camera picture (0.2.87)
Starting screen: until the first layout, render() keeps the status text
("Connecting to Home Assistant", "Waiting for ESP Screens") and a spinner
as one block in the middle of the page; the first layout deletes both.
The room label stays empty meanwhile, and ROOM_NAME defaults to "".
Camera: the full screen shows a spinner instead of "Loading image". The
screen asks when the camera opens and loads a link as soon as it comes
(camera_load, never under a finger) instead of waiting for the 250 ms
tick twice, and online_image reads 16 KB per loop instead of 4 KB. On the
bench Guition with the EZVIZ camera: cold 5.8 -> 4.55 s, warm 3.4 -> 2.06 s.
Alert picture: the image takes the frame's radius (18, the alert card's);
LVGL's software renderer clips it row by row, without a layer.
One spinner_create() makes the busy sheet's, the starting screen's and the
camera's spinner; theme role CAMERA_TRACK colours the camera's ring. The
README gets a row of camera pictures; docs/CAMERA.md, RELEASING.md and
TEST_RESULTS_0287.md describe the measurements.
Checked with tools/check.sh (473 Python tests, 19/19 C++, editor) and
--firmware: CYD 1,678,816 B (91.5 %, +1,312 B), Guition 2,055,280 B
(25.3 %). Host renders of both boards in both looks; four OTA builds on
the bench Guition Wallbox, which runs this firmware.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -371,9 +371,11 @@ api:
|
||||
|
||||
# Camera images (firmware 0.2.57+): ESP Screen Manager serves each image already sized for this screen, as an uncompressed
|
||||
# BMP on its own port on the LAN (screen_manager/app/camera_feed.py). ESPHome decodes a BMP piece by piece as it arrives,
|
||||
# 4 KB per loop, where a JPEG of the full screen held the loop for 0.6 s; touch and drawing keep their turn. One image full
|
||||
# screen and one in an alert's frame; runtime_tiles.h decides when they load and frees them when they close. Plain HTTP
|
||||
# on the LAN, no certificates.
|
||||
# one `buffer_size` per loop, where a JPEG of the full screen held the loop for 0.6 s; touch and drawing keep their turn.
|
||||
# 16 KB a loop (firmware 0.2.73+): the full picture came in 1.8 s instead of 2.8 s with 4 KB. Without Wi-Fi power save no
|
||||
# loop waited over 50 ms for it (with power save now and then 0.1 s, against 65 ms with 4 KB); 32 KB saved 0.3 s more but
|
||||
# held a loop 0.1 s even without power save (docs/TEST_RESULTS_0287.md). One image full screen and one in an alert's
|
||||
# frame; runtime_tiles.h decides when they load and frees them when they close. Plain HTTP on the LAN, no certificates.
|
||||
http_request:
|
||||
timeout: 4s
|
||||
verify_ssl: false
|
||||
@@ -385,7 +387,7 @@ online_image:
|
||||
url: "http://127.0.0.1/camera.bmp" # set when a camera opens
|
||||
format: BMP
|
||||
type: RGB565
|
||||
buffer_size: 4096
|
||||
buffer_size: 16384
|
||||
on_download_finished:
|
||||
- lambda: 'runtime_tiles::camera_loaded(false, cached);'
|
||||
on_error:
|
||||
@@ -394,7 +396,7 @@ online_image:
|
||||
url: "http://127.0.0.1/camera.bmp" # set when an alert brings an image
|
||||
format: BMP
|
||||
type: RGB565
|
||||
buffer_size: 4096
|
||||
buffer_size: 16384
|
||||
on_download_finished:
|
||||
- lambda: 'runtime_tiles::camera_loaded(true, cached);'
|
||||
on_error:
|
||||
@@ -574,6 +576,7 @@ lvgl:
|
||||
widgets:
|
||||
# The alert's camera image (firmware 0.2.57+) across the top of the card, shown when the app announced
|
||||
# one; a tap opens the camera full screen over the alert. runtime_tiles.h puts the image in it.
|
||||
# Rounded like the alert card itself (firmware 0.2.73+); the image takes this radius (camera_loaded).
|
||||
- obj:
|
||||
id: alert_image_frame
|
||||
x: ${ALERT_IMAGE_INSET}
|
||||
@@ -583,7 +586,7 @@ lvgl:
|
||||
hidden: true
|
||||
styles: paint_camera
|
||||
bg_opa: COVER
|
||||
radius: 0
|
||||
radius: 18
|
||||
border_width: 0
|
||||
shadow_width: 0
|
||||
pad_all: 0
|
||||
|
||||
Reference in New Issue
Block a user