Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MAX11410-test by
Diff: main.cpp
- Revision:
- 8:882a6cdb1bf3
- Parent:
- 7:5295cbdb123c
- Child:
- 9:5d9509c15e8a
diff -r 5295cbdb123c -r 882a6cdb1bf3 main.cpp
--- a/main.cpp Sat Jan 27 19:48:33 2018 +0000
+++ b/main.cpp Tue Feb 06 02:51:26 2018 +0000
@@ -237,20 +237,23 @@
}
// calc checksum
- checksum=0;
- for (int n=0; n<10; n++)
- {
- checksum += channel_data[n];
- }
- checksum_byte = (char) checksum;
+ checksum= 0x66 + 0x01;
+// for (int n=0; n<10; n++)
+// {
+// checksum += channel_data[n];
+// }
+// checksum_byte = (char) checksum;
for (int n=0; n<10; n++)
{
for(int m=0;m<4;m++)
{
byte2print[n*4+m] = getNthByte(channel_data[n],3-m);
- }
+ checksum += getNthByte(channel_data[n],3-m);
+ }
}
+ checksum_byte = (char) checksum;
+
//print data and checksum
// print header 0x6601
