mirror of
https://github.com/suchmememanyskill/CYD-Klipper.git
synced 2026-03-21 05:33:24 +00:00
Process feedback partially
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
#include "ESP32-2432S028R.h"
|
#ifdef CYD_SCREEN_DRIVER_ESP32_2432S028R
|
||||||
|
#include "../screen_driver.h"
|
||||||
|
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
#include <TFT_eSPI.h>
|
#include <TFT_eSPI.h>
|
||||||
@@ -267,4 +268,6 @@ void screen_setup()
|
|||||||
/*Initialize the graphics library */
|
/*Initialize the graphics library */
|
||||||
LV_EVENT_GET_COMP_CHILD = lv_event_register_id();
|
LV_EVENT_GET_COMP_CHILD = lv_event_register_id();
|
||||||
set_color_scheme();
|
set_color_scheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // CYD_SCREEN_DRIVER_ESP32_2432S028R
|
||||||
@@ -1 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
@@ -1,12 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
// Adapted from https://github.com/xperiments-in/xtouch/blob/main/src/devices/2.8/screen.h
|
// Adapted from https://github.com/xperiments-in/xtouch/blob/main/src/devices/2.8/screen.h
|
||||||
|
|
||||||
#ifdef CYD_SCREEN_DRIVER_ESP32_2432S028R
|
|
||||||
#include "device/ESP32-2432S028R.h"
|
|
||||||
#else
|
|
||||||
#error "No screen driver defined"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void touchscreen_calibrate(bool force = false);
|
void touchscreen_calibrate(bool force = false);
|
||||||
void screen_setBrightness(unsigned char brightness);
|
void screen_setBrightness(unsigned char brightness);
|
||||||
void screen_timer_setup();
|
void screen_timer_setup();
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ void settings_panel_init(lv_obj_t* panel){
|
|||||||
create_settings_widget("Calibrate Touch", btn, panel);
|
create_settings_widget("Calibrate Touch", btn, panel);
|
||||||
|
|
||||||
lv_obj_t * toggle = lv_switch_create(panel);
|
lv_obj_t * toggle = lv_switch_create(panel);
|
||||||
|
lv_obj_set_width(toggle, CYD_SCREEN_MIN_BUTTON_WIDTH_PX * 2);
|
||||||
lv_obj_add_event_cb(toggle, invert_color_switch, LV_EVENT_VALUE_CHANGED, NULL);
|
lv_obj_add_event_cb(toggle, invert_color_switch, LV_EVENT_VALUE_CHANGED, NULL);
|
||||||
|
|
||||||
if (global_config.invertColors)
|
if (global_config.invertColors)
|
||||||
@@ -135,6 +136,7 @@ void settings_panel_init(lv_obj_t* panel){
|
|||||||
|
|
||||||
|
|
||||||
toggle = lv_switch_create(panel);
|
toggle = lv_switch_create(panel);
|
||||||
|
lv_obj_set_width(toggle, CYD_SCREEN_MIN_BUTTON_WIDTH_PX * 2);
|
||||||
lv_obj_add_event_cb(toggle, light_mode_switch, LV_EVENT_VALUE_CHANGED, NULL);
|
lv_obj_add_event_cb(toggle, light_mode_switch, LV_EVENT_VALUE_CHANGED, NULL);
|
||||||
|
|
||||||
if (global_config.lightMode)
|
if (global_config.lightMode)
|
||||||
@@ -176,6 +178,7 @@ void settings_panel_init(lv_obj_t* panel){
|
|||||||
create_settings_widget("Wake Timeout", dropdown, panel);
|
create_settings_widget("Wake Timeout", dropdown, panel);
|
||||||
|
|
||||||
toggle = lv_switch_create(panel);
|
toggle = lv_switch_create(panel);
|
||||||
|
lv_obj_set_width(toggle, CYD_SCREEN_MIN_BUTTON_WIDTH_PX * 2);
|
||||||
lv_obj_add_event_cb(toggle, rotate_screen_switch, LV_EVENT_VALUE_CHANGED, NULL);
|
lv_obj_add_event_cb(toggle, rotate_screen_switch, LV_EVENT_VALUE_CHANGED, NULL);
|
||||||
|
|
||||||
if (global_config.rotateScreen)
|
if (global_config.rotateScreen)
|
||||||
@@ -184,6 +187,7 @@ void settings_panel_init(lv_obj_t* panel){
|
|||||||
create_settings_widget("Rotate Screen", toggle, panel);
|
create_settings_widget("Rotate Screen", toggle, panel);
|
||||||
|
|
||||||
toggle = lv_switch_create(panel);
|
toggle = lv_switch_create(panel);
|
||||||
|
lv_obj_set_width(toggle, CYD_SCREEN_MIN_BUTTON_WIDTH_PX * 2);
|
||||||
lv_obj_add_event_cb(toggle, on_during_print_switch, LV_EVENT_VALUE_CHANGED, NULL);
|
lv_obj_add_event_cb(toggle, on_during_print_switch, LV_EVENT_VALUE_CHANGED, NULL);
|
||||||
|
|
||||||
if (global_config.onDuringPrint)
|
if (global_config.onDuringPrint)
|
||||||
|
|||||||
Reference in New Issue
Block a user