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:
11:2311b2d5157d
Child:
27:259aaa249619
--- a/main.cpp	Mon Jul 13 13:29:25 2015 +0000
+++ b/main.cpp	Tue Jul 14 03:03:22 2015 +0000
@@ -1,11 +1,13 @@
 #include "emmaCode.h"
 
-int mode = MODE_OPERATION;
+int mode;
+
 int main() {
     //init touchscreen and read input
-    
+    //mode = MODE_OPERATION;
+    mode = emmaModeSelection();
     
-    emmaInit();
+    emmaInit(mode);
     //switch mode
     switch(mode) {
         case MODE_SETTINGS: