diff --git a/components/chsc6x/include/chsc6x.hpp b/components/chsc6x/include/chsc6x.hpp index 48509c825..d1028f9e3 100644 --- a/components/chsc6x/include/chsc6x.hpp +++ b/components/chsc6x/include/chsc6x.hpp @@ -45,7 +45,7 @@ class Chsc6x : public BasePeripheral<> { x_ = 0; y_ = 0; num_touch_points_ = 0; - return false; + return true; } x_ = data[2]; y_ = data[4]; diff --git a/components/esp-box/example/sdkconfig.defaults b/components/esp-box/example/sdkconfig.defaults index 81e7ff2c5..be4a2ecad 100644 --- a/components/esp-box/example/sdkconfig.defaults +++ b/components/esp-box/example/sdkconfig.defaults @@ -25,10 +25,12 @@ CONFIG_ESP_TIMER_TASK_STACK_SIZE=6144 # set the functions into IRAM CONFIG_SPI_MASTER_IN_IRAM=y +CONFIG_LV_DEF_REFR_PERIOD=16 + # # LVGL configuration - # Themes # CONFIG_LV_USE_THEME_DEFAULT=y CONFIG_LV_THEME_DEFAULT_DARK=y CONFIG_LV_THEME_DEFAULT_GROW=y -CONFIG_LV_THEME_DEFAULT_TRANSITION_TIME=80 +CONFIG_LV_THEME_DEFAULT_TRANSITION_TIME=30 diff --git a/components/matouch-rotary-display/example/sdkconfig.defaults b/components/matouch-rotary-display/example/sdkconfig.defaults index 81e7ff2c5..be4a2ecad 100644 --- a/components/matouch-rotary-display/example/sdkconfig.defaults +++ b/components/matouch-rotary-display/example/sdkconfig.defaults @@ -25,10 +25,12 @@ CONFIG_ESP_TIMER_TASK_STACK_SIZE=6144 # set the functions into IRAM CONFIG_SPI_MASTER_IN_IRAM=y +CONFIG_LV_DEF_REFR_PERIOD=16 + # # LVGL configuration - # Themes # CONFIG_LV_USE_THEME_DEFAULT=y CONFIG_LV_THEME_DEFAULT_DARK=y CONFIG_LV_THEME_DEFAULT_GROW=y -CONFIG_LV_THEME_DEFAULT_TRANSITION_TIME=80 +CONFIG_LV_THEME_DEFAULT_TRANSITION_TIME=30 diff --git a/components/seeed-studio-round-display/example/main/seeed_studio_round_display_example.cpp b/components/seeed-studio-round-display/example/main/seeed_studio_round_display_example.cpp index d784beaae..22f16b9c7 100644 --- a/components/seeed-studio-round-display/example/main/seeed_studio_round_display_example.cpp +++ b/components/seeed-studio-round-display/example/main/seeed_studio_round_display_example.cpp @@ -141,8 +141,8 @@ extern "C" void app_main(void) { } static void on_rotate_pressed(lv_event_t *event) { - std::lock_guard lock(lvgl_mutex); clear_circles(); + std::lock_guard lock(lvgl_mutex); static auto rotation = LV_DISPLAY_ROTATION_0; rotation = static_cast((static_cast(rotation) + 1) % 4); lv_display_t *disp = _lv_refr_get_disp_refreshing(); diff --git a/components/seeed-studio-round-display/example/sdkconfig.defaults b/components/seeed-studio-round-display/example/sdkconfig.defaults index a032b70ec..65e28dce3 100644 --- a/components/seeed-studio-round-display/example/sdkconfig.defaults +++ b/components/seeed-studio-round-display/example/sdkconfig.defaults @@ -25,10 +25,11 @@ CONFIG_ESP_TIMER_TASK_STACK_SIZE=6144 # set the functions into IRAM CONFIG_SPI_MASTER_IN_IRAM=y +CONFIG_LV_DEF_REFR_PERIOD=16 # # LVGL configuration - # Themes # CONFIG_LV_USE_THEME_DEFAULT=y CONFIG_LV_THEME_DEFAULT_DARK=y CONFIG_LV_THEME_DEFAULT_GROW=y -CONFIG_LV_THEME_DEFAULT_TRANSITION_TIME=80 +CONFIG_LV_THEME_DEFAULT_TRANSITION_TIME=30 diff --git a/components/seeed-studio-round-display/include/seeed-studio-round-display.hpp b/components/seeed-studio-round-display/include/seeed-studio-round-display.hpp index f64a5f5c3..ad2c2dc72 100644 --- a/components/seeed-studio-round-display/include/seeed-studio-round-display.hpp +++ b/components/seeed-studio-round-display/include/seeed-studio-round-display.hpp @@ -258,6 +258,7 @@ class SsRoundDisplay : public espp::BaseComponent { protected: SsRoundDisplay(); + void touch_interrupt_handler(const espp::Interrupt::Event &event); bool update_touch(); void lcd_wait_lines(); diff --git a/components/seeed-studio-round-display/src/seeed-studio-round-display.cpp b/components/seeed-studio-round-display/src/seeed-studio-round-display.cpp index 1801c63e1..6485eb74d 100644 --- a/components/seeed-studio-round-display/src/seeed-studio-round-display.cpp +++ b/components/seeed-studio-round-display/src/seeed-studio-round-display.cpp @@ -14,13 +14,7 @@ SsRoundDisplay::SsRoundDisplay() , touch_interrupt_pin_({ .gpio_num = pin_config_.touch_interrupt, .callback = - [this](const auto &event) { - if (update_touch()) { - if (touch_callback_) { - touch_callback_(touchpad_data()); - } - } - }, + std::bind(&SsRoundDisplay::touch_interrupt_handler, this, std::placeholders::_1), .active_level = touch_interrupt_level, .interrupt_type = espp::Interrupt::Type::FALLING_EDGE, }) { @@ -75,6 +69,14 @@ bool SsRoundDisplay::initialize_touch(const SsRoundDisplay::touch_callback_t &ca return true; } +void SsRoundDisplay::touch_interrupt_handler(const espp::Interrupt::Event &event) { + if (update_touch()) { + if (touch_callback_) { + touch_callback_(touchpad_data()); + } + } +} + bool SsRoundDisplay::update_touch() { // ensure the touch is initialized if (!touch_) { diff --git a/components/t-deck/example/sdkconfig.defaults b/components/t-deck/example/sdkconfig.defaults index 7a52b0f9d..be4a2ecad 100644 --- a/components/t-deck/example/sdkconfig.defaults +++ b/components/t-deck/example/sdkconfig.defaults @@ -33,4 +33,4 @@ CONFIG_LV_DEF_REFR_PERIOD=16 CONFIG_LV_USE_THEME_DEFAULT=y CONFIG_LV_THEME_DEFAULT_DARK=y CONFIG_LV_THEME_DEFAULT_GROW=y -CONFIG_LV_THEME_DEFAULT_TRANSITION_TIME=80 +CONFIG_LV_THEME_DEFAULT_TRANSITION_TIME=30