Skip to content

Commit

Permalink
Merge pull request hd-zero#353 from Master92/fan_slider_update
Browse files Browse the repository at this point in the history
Update top fan slider when changing speed from video
  • Loading branch information
ligenxxxx authored Oct 23, 2023
2 parents 3df8182 + 4e8c49e commit 8c2071f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/input_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ void rbtn_click(right_button_t click_type) {
if (click_type == RIGHT_CLICK) {
dvr_cmd(DVR_TOGGLE);
} else if (click_type == RIGHT_LONG_PRESS) {
pthread_mutex_lock(&lvgl_mutex);
step_topfan();
pthread_mutex_unlock(&lvgl_mutex);
} else if (click_type == RIGHT_DOUBLE_CLICK) {
ht_set_center_position();
}
Expand Down
4 changes: 4 additions & 0 deletions src/ui/page_fans.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ void step_topfan() {

fans_top_setspeed(g_setting.fans.top_speed);
ini_putl("fans", "top_speed", g_setting.fans.top_speed, SETTING_INI);

lv_slider_set_value(slider_group[0].slider, g_setting.fans.top_speed, LV_ANIM_OFF);
sprintf(str, "%d", g_setting.fans.top_speed);
lv_label_set_text(slider_group[0].label, str);
}

///////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 8c2071f

Please sign in to comment.