App1_S5 / Mbed 2 deprecated APP4_IRQ

Dependencies:   mbed-rtos mbed

Revision:
11:1d277e7e272d
Parent:
10:c4629b6c42f8
Child:
12:e21604b50719
diff -r c4629b6c42f8 -r 1d277e7e272d quick_queue.cpp
--- a/quick_queue.cpp	Sun Oct 15 23:13:18 2017 +0000
+++ b/quick_queue.cpp	Mon Oct 16 00:27:07 2017 +0000
@@ -45,6 +45,10 @@
     if (out_output_index != out_input_index) 
     {
         out_output_index = (out_output_index + 1) % MESSAGE_BUFFER_SIZE;
+        for (int i = 0; i < MAX_MESSAGE_LENGTH; i++)
+        {
+            out_messages[out_output_index].data[i] = 0;
+        }
         return true;
     }
     return false;
@@ -85,6 +89,10 @@
     if (in_output_index != in_input_index) 
     {
         in_output_index = (in_output_index + 1) % MESSAGE_BUFFER_SIZE;
+        for (int i = 0; i < MAX_MESSAGE_LENGTH; i++)
+        {
+            in_messages[in_output_index].data[i] = 0;
+        }
         return true;
     }
     return false;