Skip to content

Commit 60fd510

Browse files
committed
ugfx: vfx: fix fps issue
1 parent 8c4399b commit 60fd510

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

components/ugfx/gfxconf.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@
7070
#define GFX_USE_GDISP TRUE
7171

7272
// #define GDISP_NEED_AUTOFLUSH TRUE
73-
#ifdef CONFIG_VFX_OUTPUT_CUBE0414
74-
#define GDISP_NEED_TIMERFLUSH 8
75-
#else
76-
#define GDISP_NEED_TIMERFLUSH 16
77-
#endif
73+
#define GDISP_NEED_TIMERFLUSH CONFIG_VFX_OUTPUT_FLUSH_PERIOD
7874
// #define GDISP_NEED_VALIDATION TRUE
7975
// #define GDISP_NEED_CLIP TRUE
8076
// #define GDISP_NEED_CIRCLE TRUE

main/Kconfig.projbuild

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ config VFX_OUTPUT_ST7789
167167
bool "ST7789 135x240 LCD Panel"
168168
endchoice
169169

170+
config VFX_OUTPUT_FLUSH_PERIOD
171+
int
172+
default 4 if VFX_OUTPUT_CUBE0414
173+
default 16 if !VFX_OUTPUT_CUBE0414
174+
170175
choice SCREEN_PANEL_OUTPUT
171176
prompt "Screen Panel Output Mode"
172177
default SCREEN_PANEL_OUTPUT_VFX

main/src/user/vfx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static void vfx_task(void *pvParameter)
5858
vfx_disp_width = gdispGGetWidth(vfx_gdisp);
5959
vfx_disp_height = gdispGGetHeight(vfx_gdisp);
6060

61-
ESP_LOGI(TAG, "started.");
61+
ESP_LOGI(TAG, "started, fps: %.1f", 1000.0 / GDISP_NEED_TIMERFLUSH);
6262

6363
while (1) {
6464
switch (vfx.mode) {

0 commit comments

Comments
 (0)