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:
12:96f637ed37f9
Parent:
8:51a0ca9079ca
Child:
14:8287f0f5d987
--- a/emmaCode.h	Mon Jul 13 13:29:25 2015 +0000
+++ b/emmaCode.h	Tue Jul 14 03:03:22 2015 +0000
@@ -2,16 +2,19 @@
 #define MBED_EMMACODE_H
 
 #include "mbed.h"
-#include "espduino.h"       //wifi mqtt
-#include "mqtt.h"           //wifi mqtt
-#include "rest.h"           //wifi rest
-#include "MQTTClient.h"     //eth mqtt
-#include "MQTTEthernet.h"   //eth mqtt
-#include "MbedJSONValue.h"  //json
-#include "SDFileSystem.h"   //sd card
-#include "Crypto.h"         //hash calculation
-#include "cmsis_os.h"       //threads
-#include "ade7758.h"        //ade7758
+#include "espduino.h"           //wifi mqtt
+#include "mqtt.h"               //wifi mqtt
+#include "rest.h"               //wifi rest
+#include "MQTTClient.h"         //eth mqtt
+#include "MQTTEthernet.h"       //eth mqtt
+#include "MbedJSONValue.h"      //json
+#include "SDFileSystem.h"       //sd card
+#include "Crypto.h"             //hash calculation
+#include "cmsis_os.h"           //threads
+#include "ade7758.h"            //ade7758
+#include "SPI_TFT_ILI9341.h"    //lcd
+#include "Touch.h"              //touch
+#include "Arial12x12.h"         //font
 #include <string>
 
 //platform
@@ -65,8 +68,12 @@
 #define VRMSTHRESHOLD   250
 #define WATTTHRESHOLD   200
 
+/*start lcd and touch*/
+int emmaModeSelection(void);
+/*end lcd and touch*/
+
 /*start emma mode*/
-void emmaInit(void);
+void emmaInit(int mode);
 void emmaModeWiFiConfig(void);
 void emmaModeSettings(void);
 void emmaModeRegister(void);