Skip to content

Commit e6b5d17

Browse files
Merge pull request #164 from suchmememanyskill/dev
v2.1.0
2 parents 8f46b99 + d8a9b13 commit e6b5d17

23 files changed

+603
-125
lines changed

.github/workflows/compile.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: windows-latest
2121

2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424
with:
2525
fetch-depth: 0
2626

@@ -31,7 +31,7 @@ jobs:
3131
# ~/.platformio/.cache
3232
# key: ${{ runner.os }}-pio-cyd-klipper
3333

34-
- uses: actions/setup-python@v4
34+
- uses: actions/setup-python@v5
3535
with:
3636
python-version: '3.9'
3737

@@ -43,13 +43,13 @@ jobs:
4343
python3 ci.py
4444
4545
- name: Upload artifact
46-
uses: actions/upload-artifact@v3
46+
uses: actions/upload-artifact@v4
4747
with:
4848
name: firmware
4949
path: ./out
5050

5151
- name: Upload GitHub Page Artifact
52-
uses: actions/upload-pages-artifact@v2
52+
uses: actions/upload-pages-artifact@v3
5353

5454
deploy:
5555
environment:
@@ -65,5 +65,5 @@ jobs:
6565
6666
- name: Deploy to GitHub Pages
6767
id: deployment
68-
uses: actions/deploy-pages@v2
68+
uses: actions/deploy-pages@v4
6969

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"ldscript": "esp32_out.ld"
5+
},
6+
"core": "esp32",
7+
"extra_flags": [
8+
"'-D ARDUINO_ESP32_DEV'",
9+
"'-D ESP32_2432S022C'",
10+
"'-D LCD_WIDTH=240'",
11+
"'-D LCD_HEIGHT=320'",
12+
"'-D LVGL_BUFFER_PIXELS=(LCD_WIDTH*LCD_HEIGHT/8)'",
13+
"'-D LVGL_BUFFER_MALLOC_FLAGS=(MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT)'",
14+
"'-D GPIO_BCKL=0'",
15+
"'-D LCD_ST7789_I80'",
16+
"'-D ST7789_I80_BUS_CONFIG_CLK_SRC=LCD_CLK_SRC_PLL160M'",
17+
"'-D ST7789_I80_BUS_CONFIG_DC=16'",
18+
"'-D ST7789_I80_BUS_CONFIG_WR=4'",
19+
"'-D ST7789_I80_BUS_CONFIG_DATA_GPIO_D8=15'",
20+
"'-D ST7789_I80_BUS_CONFIG_DATA_GPIO_D9=13'",
21+
"'-D ST7789_I80_BUS_CONFIG_DATA_GPIO_D10=12'",
22+
"'-D ST7789_I80_BUS_CONFIG_DATA_GPIO_D11=14'",
23+
"'-D ST7789_I80_BUS_CONFIG_DATA_GPIO_D12=27'",
24+
"'-D ST7789_I80_BUS_CONFIG_DATA_GPIO_D13=25'",
25+
"'-D ST7789_I80_BUS_CONFIG_DATA_GPIO_D14=33'",
26+
"'-D ST7789_I80_BUS_CONFIG_DATA_GPIO_D15=32'",
27+
"'-D ST7789_I80_BUS_CONFIG_BUS_WIDTH=8'",
28+
"'-D ST7789_I80_BUS_CONFIG_MAX_TRANSFER_BYTES=(LVGL_BUFFER_PIXELS * sizeof(lv_color_t))'",
29+
"'-D ST7789_I80_BUS_CONFIG_PSRAM_TRANS_ALIGN=64'",
30+
"'-D ST7789_I80_BUS_CONFIG_SRAM_TRANS_ALIGN=4'",
31+
"'-D ST7789_IO_I80_CONFIG_CS_GPIO_NUM=17'",
32+
"'-D ST7789_IO_I80_CONFIG_PCLK_HZ=12000000'",
33+
"'-D ST7789_IO_I80_CONFIG_TRANS_QUEUE_DEPTH=10'",
34+
"'-D ST7789_IO_I80_CONFIG_LCD_CMD_BITS=8'",
35+
"'-D ST7789_IO_I80_CONFIG_LCD_PARAM_BITS=8'",
36+
"'-D ST7789_IO_I80_CONFIG_DC_LEVELS_DC_IDLE_LEVEL=0'",
37+
"'-D ST7789_IO_I80_CONFIG_DC_LEVELS_DC_CMD_LEVEL=0'",
38+
"'-D ST7789_IO_I80_CONFIG_DC_LEVELS_DC_DUMMY_LEVEL=0'",
39+
"'-D ST7789_IO_I80_CONFIG_DC_LEVELS_DC_DATA_LEVEL=1'",
40+
"'-D ST7789_IO_I80_CONFIG_FLAGS_CS_ACTIVE_HIGH=0'",
41+
"'-D ST7789_IO_I80_CONFIG_FLAGS_REVERSE_COLOR_BITS=0'",
42+
"'-D ST7789_IO_I80_CONFIG_FLAGS_SWAP_COLOR_BYTES=0'",
43+
"'-D ST7789_IO_I80_CONFIG_FLAGS_PCLK_ACTIVE_NEG=0'",
44+
"'-D ST7789_IO_I80_CONFIG_FLAGS_PCLK_IDLE_LOW=0'",
45+
"'-D ST7789_DEV_CONFIG_RESET_GPIO_NUM=GPIO_NUM_NC'",
46+
"'-D ST7789_DEV_CONFIG_COLOR_SPACE=ESP_LCD_COLOR_SPACE_RGB'",
47+
"'-D ST7789_DEV_CONFIG_BITS_PER_PIXEL=16'",
48+
"'-D ST7789_DEV_CONFIG_FLAGS_RESET_ACTIVE_HIGH=false'",
49+
"'-D ST7789_DEV_CONFIG_VENDOR_CONFIG=NULL'",
50+
"'-D ST7789_RD_GPIO=2'",
51+
"'-D LCD_SWAP_XY=false'",
52+
"'-D LCD_MIRROR_X=false'",
53+
"'-D LCD_MIRROR_Y=false'",
54+
"'-D BOARD_HAS_TOUCH'",
55+
"'-D TOUCH_CST816S_I2C'",
56+
"'-D CST816S_I2C_HOST=I2C_NUM_0'",
57+
"'-D CST816S_I2C_CONFIG_SDA_IO_NUM=21'",
58+
"'-D CST816S_I2C_CONFIG_SCL_IO_NUM=22'",
59+
"'-D CST816S_I2C_CONFIG_SDA_PULLUP_EN=GPIO_PULLUP_ENABLE'",
60+
"'-D CST816S_I2C_CONFIG_SCL_PULLUP_EN=GPIO_PULLUP_ENABLE'",
61+
"'-D CST816S_I2C_CONFIG_MASTER_CLK_SPEED=400000'",
62+
"'-D CST816S_I2C_CONFIG_CLK_FLAGS=0'",
63+
"'-D CST816S_IO_I2C_CONFIG_DEV_ADDR=ESP_LCD_TOUCH_IO_I2C_CST816S_ADDRESS'",
64+
"'-D CST816S_IO_I2C_CONFIG_CONTROL_PHASE_BYTES=1'",
65+
"'-D CST816S_IO_I2C_CONFIG_DC_BIT_OFFSET=0'",
66+
"'-D CST816S_IO_I2C_CONFIG_LCD_CMD_BITS=8'",
67+
"'-D CST816S_IO_I2C_CONFIG_LCD_PARAM_BITS=0'",
68+
"'-D CST816S_IO_I2C_CONFIG_FLAGS_DC_LOW_ON_DATA=false'",
69+
"'-D CST816S_IO_I2C_CONFIG_FLAGS_DISABLE_CONTROL_PHASE=true'",
70+
"'-D CST816S_TOUCH_CONFIG_X_MAX=LCD_WIDTH'",
71+
"'-D CST816S_TOUCH_CONFIG_Y_MAX=LCD_HEIGHT'",
72+
"'-D CST816S_TOUCH_CONFIG_RST_GPIO_NUM=GPIO_NUM_NC'",
73+
"'-D CST816S_TOUCH_CONFIG_INT_GPIO_NUM=GPIO_NUM_NC'",
74+
"'-D CST816S_TOUCH_CONFIG_LEVELS_RESET=0'",
75+
"'-D CST816S_TOUCH_CONFIG_LEVELS_INTERRUPT=0'",
76+
"'-D TOUCH_SWAP_XY=false'",
77+
"'-D TOUCH_SWAP_X=false'",
78+
"'-D TOUCH_SWAP_Y=false'",
79+
"'-D BOARD_HAS_TF'",
80+
"'-D TF_CS=5'",
81+
"'-D TF_SPI_MOSI=23'",
82+
"'-D TF_SPI_SCLK=18'",
83+
"'-D TF_SPI_MISO=19'",
84+
"'-D BOARD_HAS_SPEAK'",
85+
"'-D SPEAK=26'",
86+
87+
"-DCYD_SCREEN_GAP_PX=8",
88+
"-DCYD_SCREEN_MIN_BUTTON_HEIGHT_PX=35",
89+
"-DCYD_SCREEN_MIN_BUTTON_WIDTH_PX=35",
90+
"-DCYD_SCREEN_VERTICAL=1",
91+
"-DCYD_SCREEN_FONT=lv_font_montserrat_14",
92+
"-DCYD_SCREEN_FONT_SMALL=lv_font_montserrat_10",
93+
"-DCYD_SCREEN_SIDEBAR_SIZE_PX=40",
94+
"-DCYD_SCREEN_DRIVER_ESP32_SMARTDISPLAY=1",
95+
"-DCYD_SCREEN_DISABLE_TOUCH_CALIBRATION=1",
96+
"-DCYD_SCREEN_DISABLE_INVERT_COLORS=1"
97+
],
98+
"f_cpu": "240000000L",
99+
"f_flash": "40000000L",
100+
"flash_mode": "dio",
101+
"mcu": "esp32",
102+
"variant": "esp32"
103+
},
104+
"connectivity": [
105+
"wifi",
106+
"bluetooth",
107+
"ethernet",
108+
"can"
109+
],
110+
"debug": {
111+
"openocd_board": "esp-wroom-32.cfg"
112+
},
113+
"frameworks": [
114+
"arduino",
115+
"espidf"
116+
],
117+
"name": "esp32-2432S022C-V",
118+
"upload": {
119+
"flash_size": "4MB",
120+
"maximum_ram_size": 327680,
121+
"maximum_size": 4194304,
122+
"require_upload_port": true,
123+
"speed": 460800
124+
},
125+
"url": "https://www.aliexpress.com/item/1005006284154750.html",
126+
"vendor": "Sunton"
127+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"ldscript": "esp32s3_out.ld",
5+
"partitions": "default_16MB.csv",
6+
"memory_type": "qio_opi"
7+
},
8+
"core": "esp32",
9+
"extra_flags": [
10+
"-DCYD_SCREEN_HEIGHT_PX=320",
11+
"-DCYD_SCREEN_WIDTH_PX=480",
12+
"-DCYD_SCREEN_GAP_PX=10",
13+
"-DCYD_SCREEN_MIN_BUTTON_HEIGHT_PX=45",
14+
"-DCYD_SCREEN_MIN_BUTTON_WIDTH_PX=45",
15+
"-DCYD_SCREEN_FONT=lv_font_montserrat_16",
16+
"-DCYD_SCREEN_FONT_SMALL=lv_font_montserrat_12",
17+
"-DCYD_SCREEN_SIDEBAR_SIZE_PX=50",
18+
"-DCYD_SCREEN_DRIVER_ESP32_CROWPANEL_35C=1",
19+
"-DCYD_SCREEN_DISABLE_TOUCH_CALIBRATION=1"
20+
],
21+
"f_cpu": "240000000L",
22+
"f_flash": "80000000L",
23+
"flash_mode": "qio",
24+
"hwids": [
25+
[
26+
"0x303A",
27+
"0x1001"
28+
]
29+
],
30+
"mcu": "esp32s3",
31+
"variant": "esp32s3"
32+
},
33+
"connectivity": [
34+
"wifi"
35+
],
36+
"debug": {
37+
"openocd_target": "esp32s3.cfg"
38+
},
39+
"frameworks": [
40+
"arduino",
41+
"espidf"
42+
],
43+
"name": "esp32-8048S043C-SD",
44+
"upload": {
45+
"flash_size": "16MB",
46+
"maximum_ram_size": 327680,
47+
"maximum_size": 16777216,
48+
"use_1200bps_touch": true,
49+
"wait_for_upload_port": true,
50+
"require_upload_port": true,
51+
"speed": 460800
52+
},
53+
"url": "https://www.elecrow.com/esp-terminal-with-esp32-3-5-inch-parallel-480x320-tft-capacitive-touch-display-rgb-by-chip-ili9488.html",
54+
"vendor": "CROWPANEL"
55+
}

CYD-Klipper/platformio.ini

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,17 @@ board = esp32-3248S035C-smartdisplay
8484
board = esp32-4827S043C-smartdisplay
8585

8686
[env:esp32-4827S043R-SD]
87-
board = esp32-4827S043C-smartdisplay
87+
board = esp32-4827S043R-smartdisplay
8888

8989
[env:esp32-8048S043C-SD]
9090
board = esp32-8048S043C-smartdisplay
9191

9292
[env:esp32-8048S043C-SD-alt]
9393
board = esp32-8048S043C-smartdisplay-alt
9494

95+
[env:esp32-2432S022C-SD-V]
96+
board = esp32-2432S022C-vertical
97+
9598
[env:esp32-CROWPANEL-28R]
9699
board = esp32-CROWPANEL-28R
97100
lib_deps =
@@ -102,3 +105,15 @@ lib_deps =
102105
plageoj/UrlEncode@^1.0.1
103106
knolleary/PubSubClient@^2.8
104107
WiFiClientSecure
108+
109+
[env:esp32-CROWPANEL-35C]
110+
board = esp32-CROWPANEL-35C
111+
lib_deps =
112+
SPI
113+
https://github.com/suchmememanyskill/lvgl
114+
https://github.com/lovyan03/[email protected]
115+
bblanchon/ArduinoJson@^7.0.0
116+
plageoj/UrlEncode@^1.0.1
117+
knolleary/PubSubClient@^2.8
118+
WiFiClientSecure
119+

CYD-Klipper/src/conf/global_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ typedef struct {
8383
bool sort_macros : 1;
8484
bool show_estop : 1;
8585
bool full_filenames : 1;
86+
bool double_size_gcode_img : 1;
8687
};
8788
};
8889

CYD-Klipper/src/core/current_printer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "data_setup.h"
21
#include "current_printer.h"
2+
#include "semaphore.h"
33

44
bool current_printer_move_printer(const char* axis, float amount, bool relative)
55
{

CYD-Klipper/src/core/data_setup.cpp

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
#include "data_setup.h"
3+
#include "semaphore.h"
34
#include <esp_task_wdt.h>
45
#include <UrlEncode.h>
56
#include "printer_integration.hpp"
@@ -8,32 +9,8 @@
89
#include "bambu/bambu_printer_integration.hpp"
910
#include "octoprint/octoprint_printer_integration.hpp"
1011

11-
SemaphoreHandle_t freezeRenderThreadSemaphore, freezeRequestThreadSemaphore;
1212
const long data_update_interval = 780;
1313

14-
void semaphore_init(){
15-
freezeRenderThreadSemaphore = xSemaphoreCreateMutex();
16-
freezeRequestThreadSemaphore = xSemaphoreCreateMutex();
17-
xSemaphoreGive(freezeRenderThreadSemaphore);
18-
xSemaphoreGive(freezeRequestThreadSemaphore);
19-
}
20-
21-
void freeze_request_thread(){
22-
xSemaphoreTake(freezeRequestThreadSemaphore, portMAX_DELAY);
23-
}
24-
25-
void unfreeze_request_thread(){
26-
xSemaphoreGive(freezeRequestThreadSemaphore);
27-
}
28-
29-
void freeze_render_thread(){
30-
xSemaphoreTake(freezeRenderThreadSemaphore, portMAX_DELAY);
31-
}
32-
33-
void unfreeze_render_thread(){
34-
xSemaphoreGive(freezeRenderThreadSemaphore);
35-
}
36-
3714
void fetch_printer_data()
3815
{
3916
freeze_request_thread();

CYD-Klipper/src/core/data_setup.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
#pragma once
22

33
void data_loop();
4-
void data_setup();
5-
6-
void freeze_request_thread();
7-
void unfreeze_request_thread();
4+
void data_setup();

0 commit comments

Comments
 (0)