moononournation / RGB565_video

142 stars 33 forks source link

ST7735屏幕编译报错 #7

Closed Myzhazha closed 3 years ago

Myzhazha commented 3 years ago

在使用ST7735屏幕时编译报错

引脚: Arduino_GFX *gfx = new Arduino_ST7735(bus, 33 /* RST */, 0 /* rotation */, false /* IPS */, 128 /* width */, 160 /* height */, 2 /* col offset 1 */, 1 /* row offset 1 */, 2 /* col offset 2 */, 1 /* row offset 2 */, false /* BGR */);

报错内容: ` C:\Users\shuai\Downloads\Compressed\ESP-32_GC9A01_JPG-main\Video_Demo\SD_MJPEG_video\SD_MJPEG_video.ino: In function 'void setup()': SD_MJPEG_video:80:48: error: invalid conversion from 'Arduino_GFX' to 'Arduino_TFT' [-fpermissive] mjpeg.setup(vFile, mjpeg_buf, gfx, true); ^

In file included from C:\Users\shuai\Downloads\Compressed\ESP-32_GC9A01_JPG-main\Video_Demo\SD_MJPEG_video\SD_MJPEG_video.ino:31:0: sketch\MjpegClass.h:16:8: note: initializing argument 3 of 'bool MjpegClass::setup(fs::File, uint8_t, Arduino_TFT, bool)' bool setup(File input, uint8_t mjpeg_buf, Arduino_TFT tft, bool multiTask) ^

SD_MJPEG_video:107:8: error: 'class Arduino_GFX' has no member named 'displayOff' gfx->displayOff(); ^

exit status 1 invalid conversion from 'Arduino_GFX' to 'Arduino_TFT' [-fpermissive] `

moononournation commented 3 years ago

simply replace Arduino_GFX *gfx = new ... to Arduino_TFT *gfx = new ... will be ok.

Myzhazha commented 3 years ago

搞定了,谢谢