You've already forked Adafruit_MQTT_Library
mirror of
https://github.com/adafruit/Adafruit_MQTT_Library.git
synced 2025-07-29 02:02:00 +03:00
remove flashstring helper constructors & methods
This commit is contained in:
@ -154,7 +154,6 @@ class Adafruit_MQTT {
|
||||
// error.
|
||||
int8_t connect();
|
||||
int8_t connect(const char *user, const char *pass);
|
||||
int8_t connect(const __FlashStringHelper *user, const __FlashStringHelper *pass);
|
||||
|
||||
// Return a printable string version of the error code returned by
|
||||
// connect(). This returns a __FlashStringHelper*, which points to a
|
||||
@ -172,19 +171,11 @@ class Adafruit_MQTT {
|
||||
// to be called before connect() because it is sent as part of the
|
||||
// connect control packet.
|
||||
bool will(const char *topic, const char *payload, uint8_t qos = 0, uint8_t retain = 0);
|
||||
bool will(const __FlashStringHelper *topic, const char *payload, uint8_t qos = 0, uint8_t retain = 0) {
|
||||
return will((const char *)topic, payload, qos, retain);
|
||||
}
|
||||
|
||||
// Publish a message to a topic using the specified QoS level. Returns true
|
||||
// if the message was published, false otherwise.
|
||||
// The topic must be stored in PROGMEM. It can either be a
|
||||
// char*, or a __FlashStringHelper* (the result of the F() macro).
|
||||
bool publish(const char *topic, const char *payload, uint8_t qos = 0);
|
||||
bool publish(const char *topic, uint8_t *payload, uint16_t bLen, uint8_t qos = 0);
|
||||
bool publish(const __FlashStringHelper *topic, const char *payload, uint8_t qos = 0) {
|
||||
return publish((const char *)topic, payload, qos);
|
||||
}
|
||||
|
||||
// Add a subscription to receive messages for a topic. Returns true if the
|
||||
// subscription could be added or was already present, false otherwise.
|
||||
@ -260,7 +251,6 @@ class Adafruit_MQTT {
|
||||
class Adafruit_MQTT_Publish {
|
||||
public:
|
||||
Adafruit_MQTT_Publish(Adafruit_MQTT *mqttserver, const char *feed, uint8_t qos = 0);
|
||||
Adafruit_MQTT_Publish(Adafruit_MQTT *mqttserver, const __FlashStringHelper *feed, uint8_t qos = 0);
|
||||
|
||||
bool publish(const char *s);
|
||||
bool publish(double f, uint8_t precision=2); // Precision controls the minimum number of digits after decimal.
|
||||
@ -279,7 +269,6 @@ private:
|
||||
class Adafruit_MQTT_Subscribe {
|
||||
public:
|
||||
Adafruit_MQTT_Subscribe(Adafruit_MQTT *mqttserver, const char *feedname, uint8_t q=0);
|
||||
Adafruit_MQTT_Subscribe(Adafruit_MQTT *mqttserver, const __FlashStringHelper *feedname, uint8_t q=0);
|
||||
|
||||
void setCallback(SubscribeCallbackUInt32Type callb);
|
||||
void setCallback(SubscribeCallbackDoubleType callb);
|
||||
|
Reference in New Issue
Block a user