Default to qos = 0 in Adafruit_MQTT::publish()

This was already the case for the Adafruit_MQTT_Publish constructor, so
this makes things a bit more consistent when using the publish() method
directly.
This commit is contained in:
Matthijs Kooijman 2015-07-27 22:42:15 +02:00
parent 5d101b8a7b
commit 3a1bef8318
1 changed files with 2 additions and 2 deletions

View File

@ -128,8 +128,8 @@ class Adafruit_MQTT {
// 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);
bool publish(const __FlashStringHelper *topic, const char *payload, uint8_t qos) {
bool publish(const char *topic, const char *payload, uint8_t qos = 0);
bool publish(const __FlashStringHelper *topic, const char *payload, uint8_t qos = 0) {
return publish((const char *)topic, payload, qos);
}