From 3a1bef83188c3dcc8b8f06fb63232fe68a51f74b Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 27 Jul 2015 22:42:15 +0200 Subject: [PATCH] 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. --- Adafruit_MQTT.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Adafruit_MQTT.h b/Adafruit_MQTT.h index d06ce7a..e18110e 100644 --- a/Adafruit_MQTT.h +++ b/Adafruit_MQTT.h @@ -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); }