Skip to content

Commit 46e0be8

Browse files
Add PayloadRequest::setPayload overload to set pointer and length
This allows setting both in one call, which is slightly more convenient.
1 parent c6fb5bf commit 46e0be8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

XBee.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,15 @@ class PayloadRequest : public XBeeRequest {
10351035
* Sets the payload array
10361036
*/
10371037
void setPayload(uint8_t* payloadPtr);
1038+
1039+
/*
1040+
* Set the payload and its length in one call.
1041+
*/
1042+
void setPayload(uint8_t* payloadPtr, uint8_t payloadLength) {
1043+
setPayload(payloadPtr);
1044+
setPayloadLength(payloadLength);
1045+
}
1046+
10381047
/**
10391048
* Returns the length of the payload array, as specified by the user.
10401049
*/

0 commit comments

Comments
 (0)