- firmware boots to a rendered LVGL face in 1.57s (eyes + smile + tag) - sdkconfig: CONFIG_IDF_EXPERIMENTAL_FEATURES=y unlocks SPIRAM 200MHz (silently degraded to 20MHz before -> MIPI-DSI underrun -> LVGL lock starvation -> task watchdog); mirrors official 08_lvgl_demo_v9 config - architecture.md: power management section (user prime concern) — active/ambient/dormant/night ladder, levers, hard edges, <=300ms wake - AGENTS/CLAUDE: replace stale bring-up warnings with verified commands Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
61 lines
1.8 KiB
C
61 lines
1.8 KiB
C
/*
|
|
* DeskLock — living-room face and voice for the Tatlock butler.
|
|
*
|
|
* Boot sequence (planned):
|
|
* 1. BSP init: display + LVGL, touch, audio codec (ES8311/ES7210)
|
|
* 2. Wi-Fi up via ESP32-C6 (ESP-Hosted over SDIO)
|
|
* 3. WebSocket connection to the DeskLock gateway
|
|
* 4. Face state machine: idle / listening / thinking / speaking
|
|
*
|
|
* Current stage: bring-up — display + a placeholder face.
|
|
*/
|
|
|
|
#include "esp_log.h"
|
|
#include "bsp/esp-bsp.h"
|
|
#include "lvgl.h"
|
|
|
|
static const char *TAG = "desklock";
|
|
|
|
static void show_placeholder_face(void)
|
|
{
|
|
bsp_display_lock(0);
|
|
|
|
lv_obj_t *scr = lv_screen_active();
|
|
lv_obj_set_style_bg_color(scr, lv_color_black(), 0);
|
|
|
|
lv_obj_t *eyes = lv_label_create(scr);
|
|
lv_label_set_text(eyes, "- -");
|
|
lv_obj_set_style_text_color(eyes, lv_color_hex(0xADFFC8), 0);
|
|
lv_obj_set_style_text_font(eyes, &lv_font_montserrat_48, 0);
|
|
lv_obj_align(eyes, LV_ALIGN_CENTER, 0, -80);
|
|
|
|
lv_obj_t *mouth = lv_label_create(scr);
|
|
lv_label_set_text(mouth, "\\_/");
|
|
lv_obj_set_style_text_color(mouth, lv_color_hex(0xADFFC8), 0);
|
|
lv_obj_set_style_text_font(mouth, &lv_font_montserrat_48, 0);
|
|
lv_obj_align(mouth, LV_ALIGN_CENTER, 0, 40);
|
|
|
|
lv_obj_t *tag = lv_label_create(scr);
|
|
lv_label_set_text(tag, "DESKLOCK");
|
|
lv_obj_set_style_text_color(tag, lv_color_hex(0x2F7A4B), 0);
|
|
lv_obj_align(tag, LV_ALIGN_CENTER, 0, 160);
|
|
|
|
bsp_display_unlock();
|
|
}
|
|
|
|
void app_main(void)
|
|
{
|
|
ESP_LOGI(TAG, "DeskLock starting");
|
|
|
|
bsp_display_start();
|
|
bsp_display_backlight_on();
|
|
show_placeholder_face();
|
|
|
|
ESP_LOGI(TAG, "DeskLock up (placeholder face)");
|
|
|
|
/* TODO(face): full LVGL face state machine per docs/architecture.md
|
|
* TODO(net): Wi-Fi via ESP-Hosted (C6), WebSocket to gateway
|
|
* TODO(voice): ES7210 capture upstream, ES8311 playback downstream
|
|
*/
|
|
}
|