mirror of
https://github.com/78/xiaozhi-esp32.git
synced 2026-07-21 02:05:52 +00:00
* feat: migrate firmware to xiaozhi-fonts 2.0.0 * fix: restart scrolling subtitles on text change * docs: add AGENTS.md for project overview, architecture, rules, and commands - Introduced AGENTS.md to document the XiaoZhi voice-assistant firmware architecture, required rules for development, board configuration process, and validation steps. - Included detailed sections on project structure, commands for building and testing, and authoritative documentation references. * feat: finalize glyph push protocol * fix: remove stale emoji font include * build: use xiaozhi-fonts 2.0.0 * fix: decouple custom fonts from glyph push * refactor: improve wake word invocation handling - Introduced BeginWakeWordInvoke method to streamline the wake word processing flow. - Updated HandleWakeWordDetectedEvent to utilize the new method, ensuring proper state transitions and scheduling. - Enhanced error handling to prevent the device from getting stuck in the connecting state. - Refactored audio channel management to improve responsiveness during wake word detection. --------- Co-authored-by: Xiaoxia <terrence.huang@tenclass.com>
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <lvgl.h>
|
|
|
|
// Wrap around lv_img_dsc_t
|
|
class LvglImage {
|
|
public:
|
|
virtual const lv_img_dsc_t* image_dsc() const = 0;
|
|
virtual bool IsGif() const { return false; }
|
|
virtual ~LvglImage() = default;
|
|
};
|
|
|
|
class LvglRawImage : public LvglImage {
|
|
public:
|
|
LvglRawImage(void* data, size_t size);
|
|
virtual const lv_img_dsc_t* image_dsc() const override { return &image_dsc_; }
|
|
virtual bool IsGif() const;
|
|
|
|
private:
|
|
lv_img_dsc_t image_dsc_;
|
|
};
|
|
|
|
class LvglCBinImage : public LvglImage {
|
|
public:
|
|
LvglCBinImage(void* data);
|
|
virtual ~LvglCBinImage();
|
|
virtual const lv_img_dsc_t* image_dsc() const override { return image_dsc_; }
|
|
|
|
private:
|
|
lv_img_dsc_t* image_dsc_ = nullptr;
|
|
};
|
|
|
|
class LvglAllocatedImage : public LvglImage {
|
|
public:
|
|
LvglAllocatedImage(void* data, size_t size);
|
|
LvglAllocatedImage(void* data, size_t size, int width, int height, int stride,
|
|
int color_format);
|
|
virtual ~LvglAllocatedImage();
|
|
virtual const lv_img_dsc_t* image_dsc() const override { return &image_dsc_; }
|
|
|
|
private:
|
|
lv_img_dsc_t image_dsc_;
|
|
};
|