diff options
| author | Luke Hoersten <[email protected]> | 2026-07-17 18:56:03 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2026-07-17 18:56:03 -0500 |
| commit | 9d94f710f7b00d109bf6f6ee57996f43bce5c67f (patch) | |
| tree | b86320353884536d2d1b342efa27600b19c845de /main/display.h | |
| parent | 866015678918560a0d0519be8a2549e4fc23b2cd (diff) | |
main: code-review fixes — brightness units, OTA stall cap, stats + locking
- display: s_last_pwm cached the raw 0-100 percentage at init but
display_wake writes it straight to REG_PWM (0-255 duty) — first wake
ran visibly dim until a /config brightness change. Shared pct_to_duty
helper now converts in both paths.
- http_api: cap consecutive OTA recv timeouts (a stalled client spun
forever holding s_ota_in_progress, wedging OTA until reboot); cap
viewport name at 54 chars so viewport-<name> fits the 63-byte mDNS
label; log mdns_service_refresh failures; /state builds JSON from a
snapshot instead of holding the state lock across ~25 cJSON allocs;
respond_400 delegates to respond_status.
- stream_server: bytes_in_window now counts painted frames only (frames
discarded while asleep inflated the first post-wake window's MB/s,
avg-jpeg and chunk/wire averages; recv_bytes folded in); so_rcvbuf
carried into the stats snapshot under the mux; drop dead HEADER_BYTES;
merge read_body_instrumented into read_n.
- state_machine: transition mutex serializes concurrent wake/sleep
(display side-effects ran after the state lock dropped, so racing
callers could leave the backlight contradicting st->state); wake-path
placeholder paint now takes the decoder lock like the stream path
(concurrent esp_lcd_panel_draw_bitmap from two tasks isn't safe).
- local_screens: overlay paint takes the decoder lock too; check the
overlay timer create; panel dims from viewport_state.h.
- jpeg_decoder: try_lock before init returns busy instead of passing a
NULL semaphore to xSemaphoreTake.
- net_eth: clear cached IP string on link down (stale /state + info).
- dead code: display_present_bgr888, TOUCH_FT5426_ADDR, touch s_task,
JPEG_DECODER_MAX_OUTPUT_BYTES; doc drift in nvs_config.h /
jpeg_decoder.h / app_main flag legend.
Diffstat (limited to 'main/display.h')
| -rw-r--r-- | main/display.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/main/display.h b/main/display.h index 679a408..1a0e0a0 100644 --- a/main/display.h +++ b/main/display.h @@ -38,16 +38,6 @@ esp_err_t display_present_rgb565(const uint16_t *src, uint16_t src_w, uint16_t src_h); -// Zero-copy hot path. Source is already 800x480 with bytes in [B, G, R] -// memory order (i.e. the format the panel pipeline natively wants); -// hand it straight to esp_lcd_panel_draw_bitmap. No CPU pixel work, no -// format conversion, no rotation — Scrypted is responsible for sending -// the buffer pre-rotated and pre-scaled to panel-native dimensions. -// If the buffer happens to be one of the panel's own framebuffers -// (see display_back_buffer / display_flip_back_buffer below), the IDF -// driver skips the memcpy entirely; otherwise it copies via CPU. -esp_err_t display_present_bgr888(const void *bgr888); - // Framebuffer accessors for the zero-memcpy frame path. The DPI panel // owns three BGR888 framebuffers (triple buffering): one scanning out, // one pending display at the next frame boundary, one free. |
