simulate data accoridng to #21

Files at this revision

API Documentation at this revision

Comitter:
gorazdko
Date:
Mon May 27 09:18:47 2019 +0000
Parent:
44:3b8a8dba7998
Commit message:
fix size of samples

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon May 27 07:27:00 2019 +0000
+++ b/main.cpp	Mon May 27 09:18:47 2019 +0000
@@ -71,7 +71,12 @@
         else
           st_uart.putc(255);  /* end of measurement 255 (0xff) */
           
-        st_uart.putc(5000);  /* SIZE OF SAMPLES 5000 == 10000 bytes */
+        /* SIZE OF SAMPLES 5000 == 10000 bytes */
+        uint16_t size_of_samples = 5000;
+        uint8_t byte_little = ((uint8_t *)&size_of_samples)[0];
+        uint8_t byte_big = ((uint8_t *)&size_of_samples)[1];
+        st_uart.putc(byte_little);
+        st_uart.putc(byte_big);
         
         for (int i=0; i<5000; i++)
         {