Version of HelloMQTT with u-blox cellular (C027 and C030) boards added.

Dependencies:   C12832 MQTT easy-connect ublox-at-cellular-interface-ext ublox-cellular-base ublox-cellular-driver-gen ublox-ppp-cellular-interface ublox-at-cellular-interface-n2xx ublox-cellular-base-n2xx

Fork of HelloMQTT by MQTT

Files at this revision

API Documentation at this revision

Comitter:
icraggs
Date:
Thu Jul 30 13:49:18 2015 +0000
Parent:
18:07a79d8f01c3
Child:
20:49c9daf2b0ff
Commit message:
Subscribe at QoS 2, remove lcd.cls() calls

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Jul 27 09:30:31 2015 +0000
+++ b/main.cpp	Thu Jul 30 13:49:18 2015 +0000
@@ -88,7 +88,7 @@
     if ((rc = client.connect(data)) != 0)
         printf("rc from MQTT connect is %d\n", rc);
     
-    if ((rc = client.subscribe(topic, MQTT::QOS1, messageArrived)) != 0)
+    if ((rc = client.subscribe(topic, MQTT::QOS2, messageArrived)) != 0)
         printf("rc from MQTT subscribe is %d\n", rc);
 
     MQTT::Message message;
@@ -122,16 +122,10 @@
         client.yield(100);
             
     if ((rc = client.unsubscribe(topic)) != 0)
-    {
-        lcd.cls();
         printf("rc from unsubscribe was %d\n", rc);
-    }
     
     if ((rc = client.disconnect()) != 0)
-    {
-        lcd.cls();
         printf("rc from disconnect was %d\n", rc);
-    }
     
     ipstack.disconnect();