Code to process UI input messages and verify them with checksum.
Diff: UserInterface.cpp
- Revision:
- 1:7795fb7ee3f3
- Parent:
- 0:6b5a3a0138ad
--- a/UserInterface.cpp Wed Feb 04 23:53:56 2015 +0000 +++ b/UserInterface.cpp Sat Feb 14 00:36:19 2015 +0000 @@ -123,16 +123,16 @@ if (idx != NULL) { int size[3]; find_length(idx, size); - pc.printf("Size: %d, Datacount: %d\r\n", size[1], _dataCnt); + printf("Size: %d, Datacount: %d\r\n", size[1], _dataCnt); if(_dataCnt >= size[1]) { _buttonA = (_xbeeBuffer[idx-_xbeeBuffer+21]>>1) & 1; // on DIO1 _buttonB = (_xbeeBuffer[idx-_xbeeBuffer+21]>>2) & 1; // on DIO2 if (checksum_check(idx+size[2], size[0])) { - pc.printf("Checksums match\r\n"); + printf("Checksums match\r\n"); } else { - pc.printf("Checksums don't match\r\n"); + printf("Checksums don't match\r\n"); } _dataCnt = 0; }