feat: cam and slience detect sleep
This commit is contained in:
@ -1206,6 +1206,14 @@ void LcdDisplay::SetEmotion(const char* emotion) {
|
||||
|
||||
DisplayLockGuard lock(this);
|
||||
bool use_full_screen_center = strcmp(emotion, "neutral") == 0;
|
||||
if (use_full_screen_center && preview_image_ != nullptr) {
|
||||
esp_timer_stop(preview_timer_);
|
||||
if (emoji_box_ != nullptr) {
|
||||
lv_obj_remove_flag(emoji_box_, LV_OBJ_FLAG_HIDDEN);
|
||||
}
|
||||
lv_obj_add_flag(preview_image_, LV_OBJ_FLAG_HIDDEN);
|
||||
preview_image_cached_.reset();
|
||||
}
|
||||
lv_coord_t top_reserved = use_full_screen_center ? 0 : ObjectHeight(top_bar_);
|
||||
lv_coord_t bottom_reserved = use_full_screen_center ? 0 : ObjectHeight(status_bar_) + ObjectHeight(bottom_bar_);
|
||||
auto apply_emoji_layout = [this, top_reserved, bottom_reserved](const lv_image_dsc_t* image_dsc) {
|
||||
|
||||
Reference in New Issue
Block a user