fix brightness settings

This commit is contained in:
Light-r4y 2025-06-03 20:17:11 +03:00 committed by GitHub
parent 5702bf6e0d
commit 587e606b59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View File

@ -93,7 +93,16 @@ lv_obj_t * ui____initial_actions0;
///////////////////// FUNCTIONS ////////////////////
void ui_event_mainScreen(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_GESTURE && lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_TOP) {
lv_indev_wait_release(lv_indev_get_act());
upBrightness(e);
}
if(event_code == LV_EVENT_GESTURE && lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_BOTTOM) {
lv_indev_wait_release(lv_indev_get_act());
downBribrightness(e);
}
}
///////////////////// SCREENS ////////////////////

View File

@ -10,7 +10,8 @@
extern "C" {
#endif
void upBrightness(lv_event_t * e);
void downBribrightness(lv_event_t * e);
#ifdef __cplusplus
} /*extern "C"*/