Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
56:225786c56315
Parent:
51:66b820f203a5
Child:
63:0ded43237b22
--- a/src/OutputTask/OutputTask.cpp	Tue Sep 13 21:40:11 2016 +0000
+++ b/src/OutputTask/OutputTask.cpp	Wed Sep 14 12:56:00 2016 +0000
@@ -6,9 +6,16 @@
     
     while (true) {
         // wait for an event
-        osEvent evt = MailBox.get();
+        osEvent evt = OutputMasterMailBox.get();
         if (evt.status == osEventMail) {
             OutputControlReq_t *msg = (OutputControlReq_t*) evt.value.p;
+            printf("\r%s received message from someone...\n", __func__);
+            printf("\rmsg->relay    = %s\n", msg->relay.c_str());
+            printf("\rmsg->state    = %s\n", msg->state == ON ? "ON" : "OFF");
+            printf("\rmsg->priority = %u\n", msg->priority);
+            
+            // free the message
+            OutputMasterMailBox.free(msg);
         }
     }
 }
\ No newline at end of file