From f1499b484a985d95f51557e49a9e9136608c45a0 Mon Sep 17 00:00:00 2001 From: Todd Treece Date: Mon, 5 Oct 2015 14:57:44 -0400 Subject: [PATCH] rearrange child classes to match new constructor --- Adafruit_MQTT_CC3000.h | 10 +++++++--- Adafruit_MQTT_Client.h | 11 +++++++---- Adafruit_MQTT_FONA.h | 10 +++++++--- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Adafruit_MQTT_CC3000.h b/Adafruit_MQTT_CC3000.h index f064f0c..e7e8eba 100644 --- a/Adafruit_MQTT_CC3000.h +++ b/Adafruit_MQTT_CC3000.h @@ -37,9 +37,13 @@ // in the compilation of the library). class Adafruit_MQTT_CC3000 : public Adafruit_MQTT { public: - Adafruit_MQTT_CC3000(Adafruit_CC3000 *cc3k, const char *server, uint16_t port, - const char *cid, const char *user, const char *pass): - Adafruit_MQTT(server, port, cid, user, pass), + Adafruit_MQTT_CC3000(Adafruit_CC3000 *cc3k, + const char *server = "io.adafruit.com", + uint16_t port = 1883, + const char *user = "", + const char *pass = "", + const char *cid = ""): + Adafruit_MQTT(server, port, user, pass, cid), cc3000(cc3k) {} diff --git a/Adafruit_MQTT_Client.h b/Adafruit_MQTT_Client.h index 416aef2..20d704f 100644 --- a/Adafruit_MQTT_Client.h +++ b/Adafruit_MQTT_Client.h @@ -35,10 +35,13 @@ // and even other platforms like ESP8266. class Adafruit_MQTT_Client : public Adafruit_MQTT { public: - Adafruit_MQTT_Client(Client *client, const char *server, uint16_t port, - const char *cid, const char *user, - const char *pass): - Adafruit_MQTT(server, port, cid, user, pass), + Adafruit_MQTT_Client(Client *client, + const char *server = "io.adafruit.com", + uint16_t port = 1883, + const char *user = "", + const char *pass = "", + const char *cid = ""): + Adafruit_MQTT(server, port, user, pass, cid), client(client) {} diff --git a/Adafruit_MQTT_FONA.h b/Adafruit_MQTT_FONA.h index 204d10f..ec308f9 100644 --- a/Adafruit_MQTT_FONA.h +++ b/Adafruit_MQTT_FONA.h @@ -35,9 +35,13 @@ // in the compilation of the library). class Adafruit_MQTT_FONA : public Adafruit_MQTT { public: - Adafruit_MQTT_FONA(Adafruit_FONA *f, const char *server, uint16_t port, - const char *cid, const char *user, const char *pass): - Adafruit_MQTT(server, port, cid, user, pass), + Adafruit_MQTT_FONA(Adafruit_FONA *f, + const char *server = "io.adafruit.com", + uint16_t port = 1883, + const char *user = "", + const char *pass = "", + const char *cid = ""): + Adafruit_MQTT(server, port, user, pass, cid), fona(f) {}