able to subscribe for >10hrs and still running

Dependencies:   ADE7758_v1 Crypto DHT11 MQTT MbedJSONValue SDFileSystem SPI_TFT_ILI9341 SWSPI SetRTC TFT_fonts Touch W5500Interface mbed-rtos mbed-src tuanpm

Fork of PB_emma_controller_mbed_src by Emma

Revision:
3:e7fcbe6deb19
Parent:
2:fdfdeb5fd6fd
Child:
4:76ab12e2f8a3
--- a/emmaCode.cpp	Fri Jul 03 07:24:07 2015 +0000
+++ b/emmaCode.cpp	Fri Jul 03 08:12:09 2015 +0000
@@ -668,7 +668,7 @@
             esp.process();
             
             //fatal exception handler - use only if rest function is used?
-            /*
+            
             if(!esp.ready()) {  //ready is true
                 DBG.printf("exception handler - start\r\n");
                 while(1) {
@@ -691,8 +691,7 @@
                 }
                 DBG.printf("exception handler - finish\r\n");
             }
-            wait(0.5);
-            */
+            //wait(0.5);
             
             //energy
             if(tEnergy.read_ms() > 10000) {
@@ -1191,6 +1190,7 @@
     char mqttTopic[64];
     sprintf(mqttTopic,"%s/%s/command",platformDOMAIN.c_str(),emmaUID.c_str());
     mqtt.subscribe(mqttTopic);
+    //mqtt.subscribe(mqttTopic,1);
 }
 void mqttDisconnected(void* response) {
     DBG.printf("MQTT Disconnected\r\n");