XBee and XBee-PRO ZigBee RF modules provide cost-effective wireless connectivity to electronic devices. They are interoperable with other ZigBee PRO feature set devices, including devices from other vendors.
Diff: Core/APIFrame.cpp
- Revision:
- 1:3dc0ec2f9fd6
- Parent:
- 0:837e6c48e90d
- Child:
- 3:6b205ec8624b
diff -r 837e6c48e90d -r 3dc0ec2f9fd6 Core/APIFrame.cpp --- a/Core/APIFrame.cpp Thu Oct 22 12:28:26 2015 +0000 +++ b/Core/APIFrame.cpp Thu Oct 22 20:02:11 2015 +0000 @@ -7,8 +7,10 @@ APIFrame::APIFrame(APIFrame * frame) :BufferedArray(frame) { - this->checkSum = frame->checkSum; - this->isVerify = frame->isVerify; + if (frame != NULL) { + this->checkSum = frame->checkSum; + this->isVerify = frame->isVerify; + } } char APIFrame::getFrameType() @@ -16,7 +18,10 @@ return data[0]; } -void APIFrame::setFrameType(char identifier) {} +void APIFrame::setFrameType(char identifier) +{ + data[0] = identifier; +} void APIFrame::allocate(int length) {