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.
Dependents: LoRaBaseStation LoRaTerminal
Diff: BasicPacket/BasicPacket.cpp
- Revision:
- 6:7c719bcd3047
- Parent:
- 5:dcf7271595af
--- a/BasicPacket/BasicPacket.cpp Mon Aug 08 11:10:00 2016 +0000
+++ b/BasicPacket/BasicPacket.cpp Thu Aug 11 02:36:03 2016 +0000
@@ -34,7 +34,7 @@
void BasicPacket::generateCrc()
{
- _buffer[3] = crc8(_buffer, 3);
+ _buffer[7] = crc8(_buffer, 3);
// set verify flag
_isVerified = true;
@@ -96,7 +96,7 @@
void BasicPacket::setDestinationID(uint8_t did)
{
// clear lower 4 bits
- _buffer[1] = 0xf0;
+ _buffer[1] &= 0xf0;
// set bits
_buffer[1] |= did & 0x0f;