Browse Source

bump lib to 0.17.0

master_upstream
Todd Treece 5 years ago
parent
commit
3553074d45
3 changed files with 12 additions and 12 deletions
  1. +5
    -5
      Adafruit_MQTT.cpp
  2. +6
    -6
      Adafruit_MQTT.h
  3. +1
    -1
      library.properties

+ 5
- 5
Adafruit_MQTT.cpp View File

@ -437,7 +437,7 @@ void Adafruit_MQTT::processPackets(int16_t timeout) {
else if (sub->callback_io != NULL) {
// huh lets do the callback in io mode
//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_double = 0;
callback_io = 0;
io_feed = 0;
io_mqtt = 0;
}
void Adafruit_MQTT_Subscribe::setCallback(SubscribeCallbackUInt32Type cb) {
@ -831,9 +831,9 @@ void Adafruit_MQTT_Subscribe::setCallback(SubscribeCallbackBufferType 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;
io_feed = f;
io_mqtt= io;
}
void Adafruit_MQTT_Subscribe::removeCallback(void) {
@ -841,5 +841,5 @@ void Adafruit_MQTT_Subscribe::removeCallback(void) {
callback_buffer = 0;
callback_double = 0;
callback_io = 0;
io_feed = 0;
io_mqtt = 0;
}

+ 6
- 6
Adafruit_MQTT.h View File

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


+ 1
- 1
library.properties View File

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


Loading…
Cancel
Save