Pranav Thakur / Mbed 2 deprecated daplink-validation

Dependencies:   mbed

Fork of daplink-validation by Russ Butler

Revision:
14:1293f2ed9c63
Parent:
12:b56a7a3f45d7
Child:
15:b724ef1cc0fe
diff -r 83609cba40df -r 1293f2ed9c63 main.cpp
--- a/main.cpp	Mon Apr 10 16:11:57 2017 +0000
+++ b/main.cpp	Mon Apr 10 16:15:01 2017 +0000
@@ -81,7 +81,7 @@
         }
 
         // Process and send data
-        if (!buf.empty()) {
+        if (!buf.empty() && pc.writeable()) {
             val = buf.dequeue();
             // Check for overflow. Leave space for
             // a null terminating character