Skip to content

Commit 884c33a

Browse files
author
brentru
committed
fix sub/pub issues
1 parent e2b69fd commit 884c33a

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

examples/adafruitio_12_group_sub/adafruitio_12_group_sub.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ void setup() {
3434
Serial.print("Connecting to Adafruit IO");
3535
io.connect();
3636

37-
group->onMessage("example.count-1", one);
38-
group->onMessage("example.count-2", two);
37+
group->onMessage("count-1", one);
38+
group->onMessage("count-2", two);
3939

4040
// wait for a connection
4141
while(io.status() < AIO_CONNECTED) {

src/AdafruitIO_Group.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,6 @@ void AdafruitIO_Group::call(AdafruitIO_Data *d) {
348348
if (strcmp(cur_cb->feed, d->feedName()) == 0 || cur_cb->feed == NULL) {
349349
cur_cb->dataCallback(d);
350350
}
351-
352351
cur_cb = cur_cb->next_cb;
353352
}
354353
}

src/AdafruitIO_Group.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class AdafruitIO_Group : public AdafruitIO_MQTT {
7777

7878
AdafruitIO *_io; /*!< An instance of AdafruitIO. */
7979
AdafruitIOGroupCallback
80-
*_groupCallback; /*!< An instance of AdafruitIOGroupCallback */
80+
*_groupCallback = NULL; /*!< An instance of AdafruitIOGroupCallback */
8181

8282
double _lat, _lon, _ele; /*!< latitude, longitude, elevation metadata. */
8383
};

0 commit comments

Comments
 (0)