Package COBS

Dependencies:   mbed UsaPack

Revision:
1:562dd758a8e4
Parent:
0:6a74f8d2aab2
diff -r 6a74f8d2aab2 -r 562dd758a8e4 main.cpp
--- a/main.cpp	Sat Apr 24 04:31:18 2021 +0000
+++ b/main.cpp	Mon Apr 26 11:59:37 2021 +0000
@@ -13,20 +13,20 @@
 int main()
 {
     pack p;
+    int d;
     slave.Subscribe(123, &p);
+    slave.Subscribe(456, &d);
     while (1)
     {
-        for (int i = 0; i < 10; i++)
+        for (int j = 0; j < 10; j++)
         {
-            for (int j = 0; j < 10; j++)
-            {
-                pc.printf("a:%f\r\n", p.a[j]);
-            }
-            for (int j = 0; j < 10; j++)
-            {
-                pc.printf("b:%d\r\n", p.b[j]);
-            }
+            pc.printf("a:%f\r\n", p.a[j]);
         }
-        wait(1.0);
+        for (int j = 0; j < 10; j++)
+        {
+            pc.printf("b:%d\r\n", p.b[j]);
+        }
+        pc.printf("d:%d\r\n", d);
+        wait(0.5);
     }
 }
\ No newline at end of file