Skip to content

Commit

Permalink
update BLE/WS/MQTT heartbeat codes
Browse files Browse the repository at this point in the history
  • Loading branch information
i3water committed May 7, 2018
1 parent 5dc2214 commit 406b26f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Blinker/BlinkerApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,11 @@ class BlinkerApi
if (STRING_find_string_value(static_cast<Proto*>(this)->dataParse(), state, BLINKER_CMD_GET)) {
// _fresh = true;
if (state == BLINKER_CMD_STATE) {
#if defined(BLINKER_MQTT)
static_cast<Proto*>(this)->print(BLINKER_CMD_STATE, BLINKER_CMD_ONLINE);
#else
static_cast<Proto*>(this)->print(BLINKER_CMD_STATE, BLINKER_CMD_CONNECTED);
#endif
_fresh = true;
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/Blinker/BlinkerConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@

#define BLINKER_CMD_ONLINE "online"

#define BLINKER_CMD_CONNECTED "connected"

#define BLINKER_CMD_VERSION "version"

#define BLINKER_CMD_NOTICE "notice"
Expand Down

0 comments on commit 406b26f

Please sign in to comment.