// This file was generated by SquareLine Studio // SquareLine Studio version: SquareLine Studio 1.5.1 // LVGL version: 8.3.6 // Project name: ESP32S3_UI #include "ui.h" #include "driver/ledc.h" #include "esp_err.h" #include "esp_log.h" /*包含Modbus操作接口*/ #include "FluxMod.h" /*设置亮度最低值*/ #define LOWERST_LIGHT_LEVEL (7222) void ReadSdCallFunc(lv_event_t * e) { // Your code here } void F1callbackFunc(lv_event_t * e) { // Your code here } void F2callbackFunc(lv_event_t * e) { // Your code here } void F3callbackFunc(lv_event_t * e) { // Your code here } void lightSliderCallback(lv_event_t * e) { // Your code here // Your code here uint32_t value = 8192-lv_slider_get_value(e->target); //ESP_LOGI("lightSliderCallback", "value = %u", value); if (value>LOWERST_LIGHT_LEVEL) { value = LOWERST_LIGHT_LEVEL; } ESP_ERROR_CHECK(ledc_set_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0, value)); // Update duty to apply the new value ESP_ERROR_CHECK(ledc_update_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0)); } void DeviceDropDownValueChanged(lv_event_t * e) { char buf[32]={}; lv_dropdown_get_selected_str(e->target,buf,32); lv_label_set_text(ui_Home_HeaderDeviceType, buf); }