Replies: 8 comments 1 reply
-
hi, this seems to be the issue: lcd.drawPngFile("SD_MMC","/staticmap.png", 100, 40); try this instead: lcd.drawPngFile(SD_MMC,"/staticmap.png", 100, 40); |
Beta Was this translation helpful? Give feedback.
-
Thanks for the response, but it is not working, get a bunch of errors.
|
Beta Was this translation helpful? Give feedback.
-
Hello
Have you tried using the SD.h SD card library instead. I have used this
with latest LovyGFX library without any issues so far.
…On Thu, Jan 16, 2025, 11:41 AM powersoft ***@***.***> wrote:
Thanks for the response, but it is not working, get a bunch of errors.
`/Users/jankromhout/Documents/Arduino/drawBmp/drawBmp.ino: In function
'void setup()':
/Users/jankromhout/Documents/Arduino/drawBmp/drawBmp.ino:32:52: error: no
matching function for call to 'LGFX::drawPngFile(fs::SDMMCFS*, const char
[15], int, int)'
lcd.drawPngFile(&SD_MMC,"/staticmap.png", 100, 40);
^
In file included from
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1_init.hpp:24,
from
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/LovyanGFX.hpp:25,
from /Users/jankromhout/Documents/Arduino/drawBmp/drawBmp.ino:10:
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/lgfx_filesystem_support.hpp:85:29:
note: candidate: 'template bool
lgfx::v1::LGFX_FILESYSTEM_Support::drawPngFile(T&, fs::File*, int32_t,
int32_t, int32_t, int32_t, int32_t, int32_t, float, float,
lgfx::v1::datum::datum_t) [with T = T; Base = lgfx::v1::LGFXBase]'
LGFX_FUNCTION_GENERATOR(drawPng, draw_png)
^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/lgfx_filesystem_support.hpp:65:17:
note: in definition of macro 'LGFX_FUNCTION_GENERATOR'
inline bool drawImg##File(T &fs, fs::File
*file, int32_t x=0, int32_t y=0, int32_t maxWidth=0, int32_t maxHeight=0,
int32_t offX=0, int32_t offY=0, float scale_x = 1.0f, float scale_y = 0.0f,
datum_t datum = datum_t::top_left) ^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/lgfx_filesystem_support.hpp:85:29:
note: template argument deduction/substitution failed:
LGFX_FUNCTION_GENERATOR(drawPng, draw_png) ^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/lgfx_filesystem_support.hpp:65:17:
note: in definition of macro 'LGFX_FUNCTION_GENERATOR' inline bool
drawImg##File(T &fs, fs::File file, int32_t x=0, int32_t y=0, int32_t
maxWidth=0, int32_t maxHeight=0, int32_t offX=0, int32_t offY=0, float
scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
^~~~~~~ /Users/jankromhout/Documents/Arduino/drawBmp/drawBmp.ino:32:27:
note: cannot convert '"/staticmap.png"' (type 'const char [15]') to type
'fs::File' lcd.drawPngFile(&SD_MMC,"/staticmap.png", 100, 40);
^~~~~~~~~~~~~~~~ In file included from
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1_init.hpp:24,
from
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/LovyanGFX.hpp:25,
from /Users/jankromhout/Documents/Arduino/drawBmp/drawBmp.ino:10:
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/lgfx_filesystem_support.hpp:85:29:
note: candidate: 'bool lgfx::v1::LGFX_FILESYSTEM_Support::drawPngFile(T&,
const String&, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, float,
float, lgfx::v1::datum::datum_t) [with T = fs::SDMMCFS*; Base =
lgfx::v1::LGFXBase; int32_t = int; lgfx::v1::datum::datum_t =
lgfx::v1::textdatum::textdatum_t]'
LGFX_FUNCTION_GENERATOR(drawPng, draw_png)
^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/lgfx_filesystem_support.hpp:78:17:
note: in definition of macro 'LGFX_FUNCTION_GENERATOR'
inline bool drawImg##File(T &fs, const String& path, int32_t x = 0,
int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX =
0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t
datum = datum_t::top_left)
^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/lgfx_filesystem_support.hpp:85:29:
note: conversion of argument 1 would be ill-formed:
LGFX_FUNCTION_GENERATOR(drawPng, draw_png)
^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/lgfx_filesystem_support.hpp:78:17:
note: in definition of macro 'LGFX_FUNCTION_GENERATOR'
inline bool drawImg##File(T &fs, const String& path, int32_t x = 0,
int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX =
0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t
datum = datum_t::top_left)
^~~~~~~
/Users/jankromhout/Documents/Arduino/drawBmp/drawBmp.ino:32:19: error:
cannot bind non-const lvalue reference of type 'fs::SDMMCFS*&' to an rvalue
of type 'fs::SDMMCFS*'
lcd.drawPngFile(&SD_MMC,"/staticmap.png", 100, 40);
^~~~~~~
In file included from
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1_init.hpp:25,
from
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/LovyanGFX.hpp:25,
from /Users/jankromhout/Documents/Arduino/drawBmp/drawBmp.ino:10:
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/LGFXBase.hpp:957:29:
note: candidate: 'bool lgfx::v1::LGFXBase::drawPngFile(T&, const char*,
int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, float, float,
lgfx::v1::datum::datum_t) [with T = fs::SDMMCFS*; int32_t = int;
lgfx::v1::datum::datum_t = lgfx::v1::textdatum::textdatum_t]'
LGFX_FUNCTION_GENERATOR(drawPng, draw_png)
^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/LGFXBase.hpp:947:17:
note: in definition of macro 'LGFX_FUNCTION_GENERATOR'
inline bool drawImg##File(T &fs, const char
*path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t
maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f,
float scale_y = 0.0f, datum_t datum = datum_t::top_left) ^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/LGFXBase.hpp:957:29:
note: conversion of argument 1 would be ill-formed:
LGFX_FUNCTION_GENERATOR(drawPng, draw_png) ^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/LGFXBase.hpp:947:17:
note: in definition of macro 'LGFX_FUNCTION_GENERATOR' inline bool
drawImg##File(T &fs, const char path, int32_t x = 0, int32_t y = 0, int32_t
maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0,
float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum =
datum_t::top_left) ^~~~~~~
/Users/jankromhout/Documents/Arduino/drawBmp/drawBmp.ino:32:19: error:
cannot bind non-const lvalue reference of type 'fs::SDMMCFS&' to an rvalue
of type 'fs::SDMMCFS*'
lcd.drawPngFile(&SD_MMC,"/staticmap.png", 100, 40);
^~~~~~~
In file included from
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1_init.hpp:25,
from
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/LovyanGFX.hpp:25,
from /Users/jankromhout/Documents/Arduino/drawBmp/drawBmp.ino:10:
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/LGFXBase.hpp:957:29:
note: candidate: 'bool lgfx::v1::LGFXBase::drawPngFile(const char*,
int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, float, float,
lgfx::v1::datum::datum_t)'
LGFX_FUNCTION_GENERATOR(drawPng, draw_png)
^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/LGFXBase.hpp:939:17:
note: in definition of macro 'LGFX_FUNCTION_GENERATOR'
inline bool drawImg##File(const char
*path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t
maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f,
float scale_y = 0.0f, datum_t datum = datum_t::top_left) ^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/LGFXBase.hpp:957:29:
note: no known conversion for argument 1 from 'fs::SDMMCFS*' to 'const
char*'
LGFX_FUNCTION_GENERATOR(drawPng, draw_png)
^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/LGFXBase.hpp:939:17:
note: in definition of macro 'LGFX_FUNCTION_GENERATOR'
inline bool drawImg##File(const char
*path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t
maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f,
float scale_y = 0.0f, datum_t datum = datum_t::top_left) ^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/LGFXBase.hpp:957:29:
note: candidate: 'bool
lgfx::v1::LGFXBase::drawPngFile(lgfx::v1::DataWrapper*, const char*,
int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, float, float,
lgfx::v1::datum::datum_t)'
LGFX_FUNCTION_GENERATOR(drawPng, draw_png)
^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/LGFXBase.hpp:926:10:
note: in definition of macro 'LGFX_FUNCTION_GENERATOR'
bool drawImg##File(DataWrapper* file, const char
*path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t
maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f,
float scale_y = 0.0f, datum_t datum = datum_t::top_left) ^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/LGFXBase.hpp:957:29:
note: no known conversion for argument 1 from 'fs::SDMMCFS*' to
'lgfx::v1::DataWrapper*'
LGFX_FUNCTION_GENERATOR(drawPng, draw_png)
^~~~~~~
/Users/jankromhout/Documents/Arduino/libraries/LovyanGFX/src/lgfx/v1/LGFXBase.hpp:926:10:
note: in definition of macro 'LGFX_FUNCTION_GENERATOR'
bool drawImg##File(DataWrapper* file, const char *path, int32_t x = 0,
int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX =
0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t
datum = datum_t::top_left)
^~~~~~~
exit status 1
Compilation error: no matching function for call to
'LGFX::drawPngFile(fs::SDMMCFS*, const char [15], int, int)'`
—
Reply to this email directly, view it on GitHub
<#668 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQZPPRF55MIVBP5D52I4FFL2K7VMJAVCNFSM6AAAAABVJZWUOKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBVG43DQMI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
not |
Beta Was this translation helpful? Give feedback.
-
Thanks, |
Beta Was this translation helpful? Give feedback.
-
You are my lifesaver. It is an elegant solution!! And it works perfect. |
Beta Was this translation helpful? Give feedback.
-
I'm using platformio:
and it doesn't compile:
every help is appreciated. |
Beta Was this translation helpful? Give feedback.
-
No suggestio for those errors:
|
Beta Was this translation helpful? Give feedback.
-
I have updated my system to the latest esp32 version, and LovyanGFX version. I'm running a esp32s3 with a makersfab 7" lcd. For a while ago included program was working fine, but I think from version 2.017 ESP32 and 1.1.9 LovyanGFX the program is not running any more.
Got the message
with my program:
The rest is working perfect. Any idee to get these thing running.
Thanks for any help.
Cheers
Jan
Beta Was this translation helpful? Give feedback.
All reactions