Fix up smartdisplay driver, update readme, update install page

This commit is contained in:
suchmememanyskill
2024-02-08 23:35:31 +01:00
parent 725d76d9c5
commit 2d6c2e8d10
19 changed files with 59 additions and 13 deletions

View File

@@ -112,4 +112,5 @@ build_flags =
# -DCYD_SCREEN_FONT=&lv_font_montserrat_16
# -DCYD_SCREEN_FONT_SMALL=&lv_font_montserrat_12
# -DCYD_SCREEN_SIDEBAR_SIZE_PX=50
# -DCYD_SCREEN_DRIVER_ESP32_SMARTDISPLAY=1
# -DCYD_SCREEN_DRIVER_ESP32_SMARTDISPLAY=1
# -DCYD_SCREEN_DISABLE_TIMEOUT=1

View File

@@ -24,6 +24,7 @@ void set_screen_brightness()
void screen_timer_wake()
{
#ifndef CYD_SCREEN_DISABLE_TIMEOUT
lv_timer_reset(screenSleepTimer);
if (!isScreenInSleep){
@@ -36,16 +37,19 @@ void screen_timer_wake()
// Reset cpu freq
setCpuFrequencyMhz(CPU_FREQ_HIGH);
Serial.printf("CPU Speed: %d MHz\n", ESP.getCpuFreqMHz());
#endif
}
void screen_timer_sleep(lv_timer_t *timer)
{
#ifndef CYD_SCREEN_DISABLE_TIMEOUT
screen_setBrightness(0);
isScreenInSleep = true;
// Screen is off, no need to make the cpu run fast, the user won't notice ;)
setCpuFrequencyMhz(CPU_FREQ_LOW);
Serial.printf("CPU Speed: %d MHz\n", ESP.getCpuFreqMHz());
#endif
}
void screen_timer_setup()

View File

@@ -167,6 +167,7 @@ void settings_panel_init(lv_obj_t* panel){
create_settings_widget("Brightness", dropdown, panel);
#ifndef CYD_SCREEN_DISABLE_TIMEOUT
dropdown = lv_dropdown_create(panel);
lv_dropdown_set_options(dropdown, wake_timeout_options);
lv_obj_add_style(dropdown, get_default_label_style(), 0);
@@ -180,6 +181,7 @@ void settings_panel_init(lv_obj_t* panel){
}
create_settings_widget("Wake Timeout", dropdown, panel);
#endif
toggle = lv_switch_create(panel);
lv_obj_set_width(toggle, CYD_SCREEN_MIN_BUTTON_WIDTH_PX * 2);
@@ -190,6 +192,7 @@ void settings_panel_init(lv_obj_t* panel){
create_settings_widget("Rotate Screen", toggle, panel);
#ifndef CYD_SCREEN_DISABLE_TIMEOUT
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);
@@ -198,4 +201,5 @@ void settings_panel_init(lv_obj_t* panel){
lv_obj_add_state(toggle, LV_STATE_CHECKED);
create_settings_widget("Screen On During Print", toggle, panel);
#endif
}

View File

@@ -14,7 +14,7 @@ A ESP32-2432S028R is required to run this project. You can find out where to buy
### Features
- View printer status
- View print progress
- View print progress and print statistics
- Start a print
- (When the printer is idle) move the printer
- (During a print) set fan speed, flow rate, speed and z offset
@@ -36,11 +36,15 @@ There are no 'over the air' updates. Each update has to be applied manually.
-|-
:-:|:-:
![1](readme/PXL_20231113_142717308.jpg)|![2](readme/PXL_20231113_171701876.jpg)
![3](readme/PXL_20231113_171715809.jpg)|![4](readme/PXL_20231113_171724404.jpg)
![5](readme/PXL_20231113_171751745.jpg)|![6](readme/PXL_20231113_171809315.jpg)
![1](readme/1.jpg)|![2](readme/2.jpg)
![3](readme/3.jpg)|![4](readme/4.jpg)
![5](readme/5.jpg)|![6](readme/6.jpg)
![7](readme/7.jpg)|![8](readme/8.jpg)
![9](readme/9.jpg)|![10](readme/10.jpg)
### Credits
- [xtouch](https://github.com/xperiments-in/xtouch)
- [ESP32-Cheap-Yellow-Display](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display)
- [ESP32-Cheap-Yellow-Display](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display)
- [OperatorB](https://github.com/OperatorB) for the ESP32-3248S035C display driver
- [esp32-smartdisplay](https://github.com/rzeldent/esp32-smartdisplay)

View File

@@ -11,26 +11,59 @@
.main {
width: fit-content;
margin: auto;
max-width: 750px;
}
.main > section > :not(:first-child) {
margin-left: 20px;
}
.main a {
color: #F00;
}
.install .iconify {
color: green;
filter: drop-shadow(0 0 0.75rem lime);
}
</style>
<script type="module" src="https://unpkg.com/esp-web-tools@9/dist/web/install-button.js?module"></script>
<script src="//code.iconify.design/1/1.0.6/iconify.min.js"></script>
<script>
async function fetchChangelog() {
const response = await fetch("https://api.github.com/repos/suchmememanyskill/CYD-Klipper/releases/latest");
const data = await response.json();
document.getElementById("changelog-body").innerText = data.body;
document.getElementById("changelog-header").innerHTML += " " + encodeURI(data.tag_name);
}
fetchChangelog();
</script>
</head>
<body>
<section class="main">
<h2>CYD-Klipper</h2>
<p>An implementation of a Klipper status display on an ESP32 + screen.<br>Uses Moonraker to fetch data.</p>
<img alt="GitHub release (with filter)" src="https://img.shields.io/github/v/release/suchmememanyskill/CYD-Klipper">
<a href="https://github.com/suchmememanyskill/CYD-Klipper"><img alt="GitHub repo" src="https://img.shields.io/badge/Source-Github-blue.svg"></a>
<a href="https://ko-fi.com/suchmememanyskill"><img alt="Donate KoFi" src="https://img.shields.io/badge/Support%2FDonate%20On-Ko%20Fi-red"></a>
<h2>CYD-Klipper <span class="iconify" data-icon="mdi-printer-3d" style="color: orange;"></span></h2>
<p>An implementation of a Klipper status display on an ESP32 + screen.<br>Uses Moonraker to fetch data.<br><a href="https://github.com/suchmememanyskill/CYD-Klipper">Source code is available on GitHub</a></p>
<section class="changelog">
<h3 id="changelog-header"><span class="iconify" data-icon="mdi-hammer-wrench" style="color: grey;"></span> Changelog</h3>
<p id="changelog-body"></p>
</section>
<section class="donate">
<h3><span class="iconify" data-icon="mdi-heart" style="color:orangered; filter: drop-shadow(0 0 0.75rem crimson);"></span> Donate</h3>
<p>If you found this project helpful, please consider a donation to <a href="https://ko-fi.com/suchmememanyskill">my Ko-Fi</a><br>It would help out a lot in the development of this project!<br>Thank you!</p>
</section>
<section class="install">
<h3>Install on ESP32-2432S028 (Resistive)</h3>
<h3><span class="iconify" data-icon="mdi-download"></span> Install on ESP32-2432S028 (2.8" Resistive)</h3>
<p>Note: You may need to hold the 'BOOT' button on the device while pressing install</p>
<esp-web-install-button
manifest="https://suchmememanyskill.github.io/CYD-Klipper/esp32-2432S028R.json"></esp-web-install-button>
</section>
<section class="install">
<h3>Install on ESP32-3248S035 (Capacitive)</h3>
<h3><span class="iconify" data-icon="mdi-download"></span> Install on ESP32-3248S035 (3.5" Capacitive)</h3>
<p>Note: You may need to hold the 'BOOT' button on the device while pressing install</p>
<esp-web-install-button
manifest="https://suchmememanyskill.github.io/CYD-Klipper/esp32-3248S035C.json"></esp-web-install-button>

BIN
readme/1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

BIN
readme/2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
readme/3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
readme/4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 KiB

BIN
readme/5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 KiB

BIN
readme/6.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

BIN
readme/7.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
readme/8.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 890 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 911 KiB