feat(box3): QR size + dim screen for camera

This commit is contained in:
Claude Worker claude2
2026-06-11 02:43:51 +02:00
parent 859c975654
commit ed336967a1
+9 -4
View File
@@ -25,10 +25,11 @@ esp_err_t stimulus_init(void) {
s_qr_screen = lv_obj_create(NULL);
lv_obj_set_style_bg_color(s_qr_screen, lv_color_white(), 0);
// 220 px QR (BOX-3 LCD is 320x240) — fills the screen height while the
// white background still provides the quiet zone quirc needs.
// 160 px QR on the 320x240 LCD — leaves ~40 px white top/bottom and
// ~80 px sides as the quiet zone quirc needs to lock the finder patterns
// (220 px starved the vertical quiet zone and blocked detection).
s_qr = lv_qrcode_create(s_qr_screen);
lv_qrcode_set_size(s_qr, 220);
lv_qrcode_set_size(s_qr, 160);
lv_qrcode_set_dark_color(s_qr, lv_color_black());
lv_qrcode_set_light_color(s_qr, lv_color_white());
lv_qrcode_update(s_qr, "zacus", 5);
@@ -50,7 +51,11 @@ static void show_qr(const char *text) {
lv_label_set_text(s_qr_caption, text);
lv_screen_load(s_qr_screen); // bring the QR to the front
bsp_display_unlock();
ESP_LOGI(TAG, "QR shown: %s", text);
// Dim the backlight hard: an emissive LCD at full brightness blooms and
// crushes QR contrast for the master's camera. ~35% keeps the modules
// readable while killing the glare halo.
bsp_display_brightness_set(35);
ESP_LOGI(TAG, "QR shown (dimmed): %s", text);
}
// MIDI note -> frequency (A4=69=440 Hz).