bump lib to 0.17.0

This commit is contained in:
Todd Treece 2016-12-29 16:09:07 -05:00
parent ae18e8a6c4
commit 3553074d45
3 changed files with 12 additions and 12 deletions

View File

@ -437,7 +437,7 @@ void Adafruit_MQTT::processPackets(int16_t timeout) {
else if (sub->callback_io != NULL) { else if (sub->callback_io != NULL) {
// huh lets do the callback in io mode // huh lets do the callback in io mode
//Serial.print("*** calling io instance callback with : "); Serial.println((char *)sub->lastread); //Serial.print("*** calling io instance callback with : "); Serial.println((char *)sub->lastread);
((sub->io_feed)->*(sub->callback_io))((char *)sub->lastread, sub->datalen); ((sub->io_mqtt)->*(sub->callback_io))((char *)sub->lastread, sub->datalen);
} }
} }
@ -816,7 +816,7 @@ Adafruit_MQTT_Subscribe::Adafruit_MQTT_Subscribe(Adafruit_MQTT *mqttserver,
callback_buffer = 0; callback_buffer = 0;
callback_double = 0; callback_double = 0;
callback_io = 0; callback_io = 0;
io_feed = 0; io_mqtt = 0;
} }
void Adafruit_MQTT_Subscribe::setCallback(SubscribeCallbackUInt32Type cb) { void Adafruit_MQTT_Subscribe::setCallback(SubscribeCallbackUInt32Type cb) {
@ -831,9 +831,9 @@ void Adafruit_MQTT_Subscribe::setCallback(SubscribeCallbackBufferType cb) {
callback_buffer = cb; callback_buffer = cb;
} }
void Adafruit_MQTT_Subscribe::setCallback(AdafruitIO_Feed *f, SubscribeCallbackIOType cb) { void Adafruit_MQTT_Subscribe::setCallback(AdafruitIO_MQTT *io, SubscribeCallbackIOType cb) {
callback_io = cb; callback_io = cb;
io_feed = f; io_mqtt= io;
} }
void Adafruit_MQTT_Subscribe::removeCallback(void) { void Adafruit_MQTT_Subscribe::removeCallback(void) {
@ -841,5 +841,5 @@ void Adafruit_MQTT_Subscribe::removeCallback(void) {
callback_buffer = 0; callback_buffer = 0;
callback_double = 0; callback_double = 0;
callback_io = 0; callback_io = 0;
io_feed = 0; io_mqtt = 0;
} }

View File

@ -30,8 +30,8 @@
#endif #endif
#define ADAFRUIT_MQTT_VERSION_MAJOR 0 #define ADAFRUIT_MQTT_VERSION_MAJOR 0
#define ADAFRUIT_MQTT_VERSION_MINOR 16 #define ADAFRUIT_MQTT_VERSION_MINOR 17
#define ADAFRUIT_MQTT_VERSION_PATCH 1 #define ADAFRUIT_MQTT_VERSION_PATCH 0
// Uncomment/comment to turn on/off debug output messages. // Uncomment/comment to turn on/off debug output messages.
//#define MQTT_DEBUG //#define MQTT_DEBUG
@ -116,7 +116,7 @@
#define SUBSCRIPTIONDATALEN 100 #define SUBSCRIPTIONDATALEN 100
#endif #endif
class AdafruitIO_Feed; // forward decl class AdafruitIO_MQTT; // forward decl
//Function pointer that returns an int //Function pointer that returns an int
typedef void (*SubscribeCallbackUInt32Type)(uint32_t); typedef void (*SubscribeCallbackUInt32Type)(uint32_t);
@ -125,7 +125,7 @@ typedef void (*SubscribeCallbackDoubleType)(double);
// returns a chunk of raw data // returns a chunk of raw data
typedef void (*SubscribeCallbackBufferType)(char *str, uint16_t len); typedef void (*SubscribeCallbackBufferType)(char *str, uint16_t len);
// returns an io data wrapper instance // returns an io data wrapper instance
typedef void (AdafruitIO_Feed::*SubscribeCallbackIOType)(char *str, uint16_t len); typedef void (AdafruitIO_MQTT::*SubscribeCallbackIOType)(char *str, uint16_t len);
extern void printBuffer(uint8_t *buffer, uint16_t len); extern void printBuffer(uint8_t *buffer, uint16_t len);
@ -277,7 +277,7 @@ class Adafruit_MQTT_Subscribe {
void setCallback(SubscribeCallbackUInt32Type callb); void setCallback(SubscribeCallbackUInt32Type callb);
void setCallback(SubscribeCallbackDoubleType callb); void setCallback(SubscribeCallbackDoubleType callb);
void setCallback(SubscribeCallbackBufferType callb); void setCallback(SubscribeCallbackBufferType callb);
void setCallback(AdafruitIO_Feed *io, SubscribeCallbackIOType callb); void setCallback(AdafruitIO_MQTT *io, SubscribeCallbackIOType callb);
void removeCallback(void); void removeCallback(void);
const char *topic; const char *topic;
@ -293,7 +293,7 @@ class Adafruit_MQTT_Subscribe {
SubscribeCallbackBufferType callback_buffer; SubscribeCallbackBufferType callback_buffer;
SubscribeCallbackIOType callback_io; SubscribeCallbackIOType callback_io;
AdafruitIO_Feed *io_feed; AdafruitIO_MQTT *io_mqtt;
private: private:
Adafruit_MQTT *mqtt; Adafruit_MQTT *mqtt;

View File

@ -1,5 +1,5 @@
name=Adafruit MQTT Library name=Adafruit MQTT Library
version=0.16.1 version=0.17.0
author=Adafruit author=Adafruit
maintainer=Adafruit <info@adafruit.com> maintainer=Adafruit <info@adafruit.com>
sentence=MQTT library that supports the CC3000, FONA, ESP8266, Yun, and generic Arduino Client hardware. sentence=MQTT library that supports the CC3000, FONA, ESP8266, Yun, and generic Arduino Client hardware.