-
Notifications
You must be signed in to change notification settings - Fork 238
Closed
Description
基本信息
- 这个问题满足提问指南
- 我阅读了开发文档
- 我使用了最新的库及APP进行测试,但是问题仍然存在
- 我搜索过类似问题的解决方法但是仍然无法解决
- 有设备端的LOG信息
- 有编译报错信息
- 我已填写基本信息
设备信息
- 硬件: [esp32s3]
- 接入方式: [WIFI]
- package版本: [arduino-esp32 2.0.13]
- blinker库版本: [arduino 0.3.10]
- 开发环境: [Arduino]
- 操作系统: [Fedora Workstation 38]
问题描述
起因
- 3月8日,Completely inline the helper pure abstract __FlashStringHelper class espressif/arduino-esp32#7941 改动了
F(str)
宏 - 4月20日,arduino-esp32@2.0.8 发布
变动
- 5月3日,update lib version to v0.3.10 #599 增加了对于ESP32的检测判定,以兼容上游改动
- 5月3日,blinker-library@0.3.10 发布
blinker-library/src/modules/mqtt/Adafruit_MQTT.h
Lines 174 to 182 in c20e2e2
// Return a printable string version of the error code returned by | |
// connect(). This returns a __FlashStringHelper*, which points to a | |
// string stored in flash, but can be directly passed to e.g. | |
// Serial.println without any further processing. | |
#if defined(ESP32) | |
const char* connectErrorString(int8_t code); | |
#else | |
const __FlashStringHelper* connectErrorString(int8_t code); | |
#endif |
回调
- 5月4日,Revert FlashStringHelper Macros espressif/arduino-esp32#8147 回调了
F(str)
宏 - 5月4日,arduino-esp32@2.0.9 发布
现状
看完我的描述,你就明白,blinker-library@0.3.10 只能兼容 arudino-esp32@2.0.8
arduino-esp32 | blinker-library | 结果 |
---|---|---|
2.0.8 | 其他版本 | 无法编译 |
2.0.8 | 0.3.10 | 兼容 |
其他版本 | 0.3.10 | 无法编译 |
其他版本 | 其他版本 | 兼容 |
以这家公司的按需开源习惯,目前只能等他们的程序员哪天想起来上号发PR,普通用户自己回退版本吧
上游项目 Adafruit_MQTT_Library 并未跟随此次改动,不受影响
代码
#define BLINKER_MQTT
#define DBLINKER_ESP_SMARTCONFIG
#include <Blinker.h>
const char *authKey = "abcd1234";
void setup()
{
Blinker.begin(authKey);
}
void loop()
{
}
LOG信息
无
编译信息
In file included from /home/laxtiz/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:176,
from .pio/libdeps/debug/Blinker/src/modules/mqtt/Adafruit_MQTT.h:25,
from .pio/libdeps/debug/Blinker/src/modules/mqtt/Adafruit_MQTT.cpp:22:
.pio/libdeps/debug/Blinker/src/modules/mqtt/Adafruit_MQTT.cpp: In member function 'const char* Adafruit_MQTT::connectErrorString(int8_t)':
/home/laxtiz/.platformio/packages/framework-arduinoespressif32/cores/esp32/WString.h:38:55: error: cannot convert 'const __FlashStringHelper*' to 'const char*' in return
#define F(string_literal) (FPSTR(PSTR(string_literal)))
^
.pio/libdeps/debug/Blinker/src/modules/mqtt/Adafruit_MQTT.cpp:279:22: note: in expansion of macro 'F'
case 1: return F("The Server does not support the level of the MQTT protocol requested");
^
/home/laxtiz/.platformio/packages/framework-arduinoespressif32/cores/esp32/WString.h:38:55: error: cannot convert 'const __FlashStringHelper*' to 'const char*' in return
#define F(string_literal) (FPSTR(PSTR(string_literal)))
^
.pio/libdeps/debug/Blinker/src/modules/mqtt/Adafruit_MQTT.cpp:280:22: note: in expansion of macro 'F'
case 2: return F("The Client identifier is correct UTF-8 but not allowed by the Server");
^
/home/laxtiz/.platformio/packages/framework-arduinoespressif32/cores/esp32/WString.h:38:55: error: cannot convert 'const __FlashStringHelper*' to 'const char*' in return
#define F(string_literal) (FPSTR(PSTR(string_literal)))
^
.pio/libdeps/debug/Blinker/src/modules/mqtt/Adafruit_MQTT.cpp:281:22: note: in expansion of macro 'F'
case 3: return F("The MQTT service is unavailable");
^
/home/laxtiz/.platformio/packages/framework-arduinoespressif32/cores/esp32/WString.h:38:55: error: cannot convert 'const __FlashStringHelper*' to 'const char*' in return
#define F(string_literal) (FPSTR(PSTR(string_literal)))
^
.pio/libdeps/debug/Blinker/src/modules/mqtt/Adafruit_MQTT.cpp:282:22: note: in expansion of macro 'F'
case 4: return F("The data in the user name or password is malformed");
^
/home/laxtiz/.platformio/packages/framework-arduinoespressif32/cores/esp32/WString.h:38:55: error: cannot convert 'const __FlashStringHelper*' to 'const char*' in return
#define F(string_literal) (FPSTR(PSTR(string_literal)))
^
.pio/libdeps/debug/Blinker/src/modules/mqtt/Adafruit_MQTT.cpp:283:22: note: in expansion of macro 'F'
case 5: return F("Not authorized to connect");
^
/home/laxtiz/.platformio/packages/framework-arduinoespressif32/cores/esp32/WString.h:38:55: error: cannot convert 'const __FlashStringHelper*' to 'const char*' in return
#define F(string_literal) (FPSTR(PSTR(string_literal)))
^
.pio/libdeps/debug/Blinker/src/modules/mqtt/Adafruit_MQTT.cpp:284:22: note: in expansion of macro 'F'
case 6: return F("Exceeded reconnect rate limit. Please try again later.");
^
/home/laxtiz/.platformio/packages/framework-arduinoespressif32/cores/esp32/WString.h:38:55: error: cannot convert 'const __FlashStringHelper*' to 'const char*' in return
#define F(string_literal) (FPSTR(PSTR(string_literal)))
^
.pio/libdeps/debug/Blinker/src/modules/mqtt/Adafruit_MQTT.cpp:285:22: note: in expansion of macro 'F'
case 7: return F("You have been banned from connecting. Please contact the MQTT server administrator for more details.");
^
/home/laxtiz/.platformio/packages/framework-arduinoespressif32/cores/esp32/WString.h:38:55: error: cannot convert 'const __FlashStringHelper*' to 'const char*' in return
#define F(string_literal) (FPSTR(PSTR(string_literal)))
^
.pio/libdeps/debug/Blinker/src/modules/mqtt/Adafruit_MQTT.cpp:286:23: note: in expansion of macro 'F'
case -1: return F("Connection failed");
^
/home/laxtiz/.platformio/packages/framework-arduinoespressif32/cores/esp32/WString.h:38:55: error: cannot convert 'const __FlashStringHelper*' to 'const char*' in return
#define F(string_literal) (FPSTR(PSTR(string_literal)))
^
.pio/libdeps/debug/Blinker/src/modules/mqtt/Adafruit_MQTT.cpp:287:23: note: in expansion of macro 'F'
case -2: return F("Failed to subscribe");
^
/home/laxtiz/.platformio/packages/framework-arduinoespressif32/cores/esp32/WString.h:38:55: error: cannot convert 'const __FlashStringHelper*' to 'const char*' in return
#define F(string_literal) (FPSTR(PSTR(string_literal)))
^
.pio/libdeps/debug/Blinker/src/modules/mqtt/Adafruit_MQTT.cpp:288:23: note: in expansion of macro 'F'
default: return F("Unknown error");
^
Metadata
Metadata
Assignees
Labels
No labels