Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Конфликтует с библиотекой TFT_eSPI.h #64

Open
M0rrb opened this issue Jan 14, 2024 · 1 comment
Open

Конфликтует с библиотекой TFT_eSPI.h #64

M0rrb opened this issue Jan 14, 2024 · 1 comment

Comments

@M0rrb
Copy link

M0rrb commented Jan 14, 2024

Если в декларации библиотек #include <TFT_eSPI.h> стоит перед #include <FastBot.h>
то компилятор выдает ошибку:

In file included from C:\Temp.arduinoIDE-unsaved2024014-9364-1vnyn07.ae0z\demo\demo.ino:15:
c:\Arduino\libraries\FastBot\src/FastBot.h:808:22: error: 'File' has not been declared
uint8_t sendFile(File &file, FB_FileType type, const String& name, const String& id) {
^~~~
c:\Arduino\libraries\FastBot\src/FastBot.h:811:22: error: 'File' has not been declared
uint8_t sendFile(File &file, FB_FileType type, const String& name) {
^~~~
c:\Arduino\libraries\FastBot\src/FastBot.h:824:22: error: 'File' has not been declared
uint8_t editFile(File &file, FB_FileType type, const String& name, int32_t msgid, const String& id) {
^~~~
c:\Arduino\libraries\FastBot\src/FastBot.h:827:22: error: 'File' has not been declared
uint8_t editFile(File &file, FB_FileType type, const String& name, int32_t msgid) {
^~~~
c:\Arduino\libraries\FastBot\src/FastBot.h:835:23: error: 'File' has not been declared
bool downloadFile(File &f, const String& url) {
^~~~
In file included from C:\Temp.arduinoIDE-unsaved2024014-9364-1vnyn07.ae0z\demo\demo.ino:15:
c:\Arduino\libraries\FastBot\src/FastBot.h:980:53: error: 'File' has not been declared
void _sendFileRoutine(FB_SECURE_CLIENT& client, File &file) {
^~~~
c:\Arduino\libraries\FastBot\src/FastBot.h:1018:23: error: 'File' has not been declared
uint8_t _sendFile(File &file, FB_FileType type, const String& name, const String& id) {
^~~~
c:\Arduino\libraries\FastBot\src/FastBot.h:1037:23: error: 'File' has not been declared
uint8_t _editFile(File& file, FB_FileType type, const String& name, int32_t msgid, const String& id) {
^~~~
In file included from C:\Temp.arduinoIDE-unsaved2024014-9364-1vnyn07.ae0z\demo\demo.ino:15:
c:\Arduino\libraries\FastBot\src/FastBot.h: In member function 'bool FastBot::downloadFile(int&, const String&)':
c:\Arduino\libraries\FastBot\src/FastBot.h:848:40: error: no matching function for call to 'HTTPClient::writeToStream(int*)'
if (_http->writeToStream(&f)) stat = 1;
^
In file included from c:\Arduino\libraries\FastBot\src/FastBot.h:147,
from C:\Temp.arduinoIDE-unsaved2024014-9364-1vnyn07.ae0z\demo\demo.ino:15:
C:\Arduino15\packages\esp32\hardware\esp32\2.0.11\libraries\HTTPClient\src/HTTPClient.h:240:9: note: candidate: 'int HTTPClient::writeToStream(Stream*)'
int writeToStream(Stream* stream);
^~~~~~~~~~~~~
C:\Arduino15\packages\esp32\hardware\esp32\2.0.11\libraries\HTTPClient\src/HTTPClient.h:240:9: note: no known conversion for argument 1 from 'int*' to 'Stream*'
In file included from C:\Temp.arduinoIDE-unsaved2024014-9364-1vnyn07.ae0z\demo\demo.ino:15:
c:\Arduino\libraries\FastBot\src/FastBot.h:851:11: error: request for member 'close' in 'f', which is of non-class type 'int'
f.close();
^~~~~
In file included from C:\Temp.arduinoIDE-unsaved2024014-9364-1vnyn07.ae0z\demo\demo.ino:15:
c:\Arduino\libraries\FastBot\src/FastBot.h: In member function 'void FastBot::_sendFileRoutine(WiFiClientSecure&, int&)':
c:\Arduino\libraries\FastBot\src/FastBot.h:982:28: error: request for member 'size' in 'file', which is of non-class type 'int'
uint32_t sz = file.size();
^~~~
c:\Arduino\libraries\FastBot\src/FastBot.h:985:18: error: request for member 'read' in 'file', which is of non-class type 'int'
file.read(buf, len);
^~~~
c:\Arduino\libraries\FastBot\src/FastBot.h: In member function 'uint8_t FastBot::_sendFile(int&, FB_FileType, const String&, const String&)':
c:\Arduino\libraries\FastBot\src/FastBot.h:1020:42: error: request for member 'size' in 'file', which is of non-class type 'int'
if (!_multipartSend(client, file.size(), type, name, id)) return 4;
^~~~
c:\Arduino\libraries\FastBot\src/FastBot.h: In member function 'uint8_t FastBot::_editFile(int&, FB_FileType, const String&, int32_t, const String&)':
c:\Arduino\libraries\FastBot\src/FastBot.h:1039:42: error: request for member 'size' in 'file', which is of non-class type 'int'
if (!_multipartEdit(client, file.size(), type, name, msgid, id)) return 4;
^~~~

exit status 1

если порядок библиотек идет наоборот:
#include <FastBot.h>
#include <TFT_eSPI.h>
, то все ок

@GyverLibs
Copy link
Owner

Да, espi ломает библиотеку работы с файлами

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants