Process feedback partially

This commit is contained in:
suchmememanyskill
2024-02-01 18:10:40 +01:00
parent 4e7bff92c9
commit 1ff75d2aa5
4 changed files with 9 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
#include "ESP32-2432S028R.h"
#ifdef CYD_SCREEN_DRIVER_ESP32_2432S028R
#include "../screen_driver.h"
#include <SPI.h>
#include <TFT_eSPI.h>
@@ -268,3 +269,5 @@ void screen_setup()
LV_EVENT_GET_COMP_CHILD = lv_event_register_id();
set_color_scheme();
}
#endif // CYD_SCREEN_DRIVER_ESP32_2432S028R

View File

@@ -1 +0,0 @@
#pragma once

View File

@@ -1,12 +1,6 @@
#pragma once
// 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 screen_setBrightness(unsigned char brightness);
void screen_timer_setup();

View File

@@ -126,6 +126,7 @@ void settings_panel_init(lv_obj_t* panel){
create_settings_widget("Calibrate Touch", btn, 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);
if (global_config.invertColors)
@@ -135,6 +136,7 @@ void settings_panel_init(lv_obj_t* 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);
if (global_config.lightMode)
@@ -176,6 +178,7 @@ void settings_panel_init(lv_obj_t* panel){
create_settings_widget("Wake Timeout", dropdown, 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);
if (global_config.rotateScreen)
@@ -184,6 +187,7 @@ void settings_panel_init(lv_obj_t* panel){
create_settings_widget("Rotate Screen", toggle, 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);
if (global_config.onDuringPrint)