Adds a way to capture the live LVGL screen off the device and rebuild it as a PNG on the host, so UI changes can be verified remotely without a camera. A watcher task polls the USB-serial-JTAG RX for a trigger byte and streams the current screen as raw RGB565 straight to the USB FIFO (framed by ###SHOT_BEGIN/END### with a CRC); firmware/tools/device_shot.py and the device-screenshot skill drive it from the host. Writing straight to the USB FIFO bypasses the primary UART console, which at 115200 baud would take ~37s per frame. The whole capability is behind DESKLOCK_DEVMODE (off by default, enable at deploy time with -DDESKLOCK_DEVMODE=ON) so production spends no internal RAM on the watcher and nothing extra runs on the render path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LKPbR6DY2JygHbyLjxm7Uu
62 lines
2.0 KiB
C
62 lines
2.0 KiB
C
/* Shared app types and cross-module hooks. */
|
|
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
typedef enum {
|
|
FACE_BOOT, /* connecting — idle glyphs + status tag */
|
|
FACE_IDLE, /* clock, rare drips */
|
|
FACE_LISTENING, /* mic hot */
|
|
FACE_PENSIVE, /* transcribing / short waits */
|
|
FACE_EFFORT, /* Tatlock working: max rain + orbit + elapsed */
|
|
FACE_SPEAKING, /* mouth sync */
|
|
FACE_RAGE, /* request failed: table flip, auto-returns to idle */
|
|
FACE_ERROR, /* gateway unreachable */
|
|
} face_state_t;
|
|
|
|
/* face.c */
|
|
void face_init(void);
|
|
void face_set(face_state_t state); /* safe from any task */
|
|
face_state_t face_get(void);
|
|
void face_activity(void);
|
|
void face_status(const char *text); /* bottom status line (diag/boot) */ /* reset the power ladder to active */
|
|
void face_screenshot_dump(bool overlay); /* dev: raw RGB565 screen dump over USB */
|
|
|
|
/* audio.c */
|
|
void audio_init(void);
|
|
void audio_play_gong(void);
|
|
void audio_play_chime(void); /* short wake acknowledgement */
|
|
void audio_capture_start(void); /* begin streaming the utterance upstream */
|
|
void audio_capture_stop(void);
|
|
bool audio_capture_active(void);
|
|
void audio_playback_begin(void);
|
|
void audio_playback_feed(const uint8_t *data, size_t len);
|
|
void audio_playback_end(void);
|
|
bool audio_is_playing(void);
|
|
void audio_volume_set(int vol); /* 0..100 */
|
|
int audio_volume_get(void);
|
|
|
|
/* net.c */
|
|
void net_start(void);
|
|
|
|
/* gw_client.c */
|
|
void gw_start(void);
|
|
bool gw_connected(void);
|
|
void gw_send_text(const char *json);
|
|
void gw_send_bin(const uint8_t *data, size_t len);
|
|
|
|
/* wifi_diag.c */
|
|
void wifi_diag_start(void);
|
|
|
|
/* c6_ota.c */
|
|
void c6_ota_start(void);
|
|
|
|
/* desklock_main.c */
|
|
void app_on_touch(void);
|
|
void app_on_wake(void); /* wake word detected (from audio detect_task) */
|
|
void app_on_speech_end(void); /* AFE VAD detected end of utterance */
|
|
void app_on_disconnect(void);
|
|
void app_on_playback_done(void);
|