[PHY] Fixed known binary receive length

This commit is contained in:
jgromes 2021-11-21 21:16:23 +01:00
parent f8bdbae73a
commit 77689e81e0
2 changed files with 4 additions and 7 deletions

View file

@ -103,11 +103,6 @@ int16_t PhysicalLayer::receive(String& str, size_t len) {
// user can override the length of data to read
size_t length = len;
if(len == 0) {
// unknown packet length, set to maximum
length = _maxPacketLength;
}
// build a temporary buffer
#if defined(RADIOLIB_STATIC_ONLY)
uint8_t data[RADIOLIB_STATIC_ARRAY_SIZE + 1];

View file

@ -144,7 +144,8 @@ class PhysicalLayer {
\param str Address of Arduino String to save the received data.
\param len Expected number of characters in the message.
\param len Expected number of characters in the message. When set to 0, the packet length will be retreived automatically.
When more bytes than received are requested, only the number of bytes requested will be returned.
\returns \ref status_codes
*/
@ -155,7 +156,8 @@ class PhysicalLayer {
\param data Pointer to array to save the received binary data.
\param len Number of bytes that will be received. Must be known in advance for binary transmissions.
\param len Number of bytes that will be read. When set to 0, the packet length will be retreived automatically.
When more bytes than received are requested, only the number of bytes requested will be returned.
\returns \ref status_codes
*/