53 lines
1.0 KiB
C
53 lines
1.0 KiB
C
// 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"
|
||
|
||
/*<2A>零좋똑離됴令*/
|
||
#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));
|
||
}
|