Skip to content

Commit

Permalink
Process feedback partially
Browse files Browse the repository at this point in the history
  • Loading branch information
suchmememanyskill committed Feb 1, 2024
1 parent 4e7bff9 commit 1ff75d2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
7 changes: 5 additions & 2 deletions CYD-Klipper/src/core/device/ESP32-2432S028R.cpp
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -267,4 +268,6 @@ void screen_setup()
/*Initialize the graphics library */
LV_EVENT_GET_COMP_CHILD = lv_event_register_id();
set_color_scheme();
}
}

#endif // CYD_SCREEN_DRIVER_ESP32_2432S028R
1 change: 0 additions & 1 deletion CYD-Klipper/src/core/device/ESP32-2432S028R.h

This file was deleted.

6 changes: 0 additions & 6 deletions CYD-Klipper/src/core/screen_driver.h
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
4 changes: 4 additions & 0 deletions CYD-Klipper/src/ui/panels/settings_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 1ff75d2

Please sign in to comment.