simulate data accoridng to #21
Revision 44:3b8a8dba7998, committed 2019-05-27
- Comitter:
- gorazdko
- Date:
- Mon May 27 07:27:00 2019 +0000
- Parent:
- 43:c179810e1a75
- Child:
- 45:092347ceac92
- Commit message:
- fix index to incrementing and to denote the end of measurement
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:14:08 2019 +0000
+++ b/main.cpp Mon May 27 07:27:00 2019 +0000
@@ -61,11 +61,16 @@
{
/* simulate data */
- for (uint16_t i=9; i>=0; i--)
+ for (uint16_t i=0; i<10; i++)
{
st_uart.putc(TYPE_MEASEUREMENT);
st_uart.putc(0x00); /* CRC */
- st_uart.putc(i); /* INDEX (decrementing) */
+
+ if (i<9)
+ st_uart.putc(i); /* INDEX (incrementing) */
+ else
+ st_uart.putc(255); /* end of measurement 255 (0xff) */
+
st_uart.putc(5000); /* SIZE OF SAMPLES 5000 == 10000 bytes */
for (int i=0; i<5000; i++)