Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
71:34856d21f2bf
Parent:
70:7427f4959201
Child:
73:3750cc5251e9
--- a/src/main.cpp	Fri Sep 16 17:54:51 2016 +0000
+++ b/src/main.cpp	Fri Sep 16 20:54:07 2016 +0000
@@ -99,13 +99,13 @@
     i2c = &i2c_instance;
 
     //rtc_init();
-#if 0 
+#if 0
     rtc_get_time(&year, &rtc_time.tm_mon, &rtc_time.tm_mday, &rtc_time.tm_hour, &rtc_time.tm_min, &rtc_time.tm_sec);
     rtc_time.tm_mon = rtc_time.tm_mon - 1;
     rtc_time.tm_year = year - 1900;
     curr_sec =  mktime( &rtc_time );
-#endif 
-    set_time(0); 
+#endif
+    set_time(0);
 
     // for signaling from the configuration handler
     mainThreadId = osThreadGetId();
@@ -114,10 +114,9 @@
     printf("\rMultiTech mDot library version: %s\n", dot->getId().c_str());
 
     // start the configuration handler
-    Thread configHandler_thread(ConfigurationHandler, NULL, osPriorityNormal, 3072, NULL);
-    Thread outputTask_thread(OutputTask, NULL, osPriorityNormal, (1024*4), NULL);
-
-    Thread controlTask_thread(ControlTask);
+    Thread configHandler_thread(ConfigurationHandler, NULL, osPriorityNormal, (1024*3),  NULL);
+    Thread outputTask_thread   (OutputTask,  NULL, osPriorityNormal, (1024*10), NULL);
+    Thread controlTask_thread  (ControlTask, NULL, osPriorityNormal, (1024*2),  NULL);
 
     // wait for the configuration handler to signal us
     osSignalWait(sig_continue, osWaitForever);
@@ -125,9 +124,9 @@
     printf("\r%s: continuing to initialize...\n", __func__);
 
     Thread analyticsLoggerThread(AnalyticsLogger);
-    Thread modbusMaster_thread(ModbusMaster, NULL, osPriorityHigh, 10000, NULL);
+    Thread modbusMaster_thread(ModbusMaster, NULL, osPriorityHigh, (1024*10), NULL);
     Thread BLE_thread(BLEDataHandler);
-    Thread CDH_thread(CloudDataHandler, NULL, osPriorityNormal, 8000, NULL);
+    Thread CDH_thread(CloudDataHandler, NULL, osPriorityNormal, (1024*8), NULL);
 
     // assign globals
     GLOBAL_analyticsLogger_thread = &analyticsLoggerThread;
@@ -140,11 +139,11 @@
 
     Thread::wait(1000);
 
-#if 0 
+#if 0
     // display free memory on the heap
     printf("\r\n");
     __heapstats((__heapprt)fprintf,stdout);
-#endif 
+#endif
 
     printf("\r\n");
     Thread::wait(1000);