Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Fix bugs (#203)
Browse files Browse the repository at this point in the history
* Fix for when message is empty
* Updates IDE version for CI
  • Loading branch information
gguuss authored Oct 15, 2020
1 parent ef62e0b commit aecf386
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ addons:
- clang-format-5.0
env:
global:
# - ARDUINO_IDE_VERSION="1.8.10"
- ARDUINO_IDE_VERSION="1.8.13"
- PRETTYNAME="Google Cloud IoT Arduino Library"
# Optional, will default to "$TRAVIS_BUILD_DIR/Doxyfile"
# - DOXYFILE: $TRAVIS_BUILD_DIR/Doxyfile
Expand Down
7 changes: 6 additions & 1 deletion examples/Esp8266-lwmqtt/esp8266_mqtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@
#include <CloudIoTCoreMqtt.h>
#include "ciotc_config.h" // Wifi configuration here


// !!REPLACEME!!
// The MQTT callback function for commands and configuration updates
// Place your message handler code here.
void messageReceivedAdvanced(MQTTClient *client, char topic[], char bytes[], int length)
{
Serial.printf("incoming: %s - %s\n", topic, length > 0 ? bytes : "[empty]");
if (length > 0){
Serial.printf("incoming: %s - %s\n", topic, bytes);
} else {
Serial.printf("0\n"); // Success but no message
}
}
///////////////////////////////

Expand Down

0 comments on commit aecf386

Please sign in to comment.