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.
Fork of SX1276Lib by
Revision 25:7ab8cc20ae64, committed 2016-05-03
- Comitter:
- firis
- Date:
- Tue May 03 19:18:20 2016 +0000
- Parent:
- 24:79c5b50b2b9c
- Commit message:
- Correction in RX config error. If REG_LR_PAYLOADLENGTH and REG_LR_PAYLOADMAXLENGTH is not set, the RX is limited to 64 bytes.
Changed in this revision
sx1276/sx1276.cpp | Show annotated file Show diff for this revision Revisions of this file |
sx1276/sx1276.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/sx1276/sx1276.cpp Tue Mar 15 13:12:44 2016 +0000 +++ b/sx1276/sx1276.cpp Tue May 03 19:18:20 2016 +0000 @@ -330,9 +330,16 @@ Write( REG_LR_PREAMBLEMSB, ( uint8_t )( ( preambleLen >> 8 ) & 0xFF ) ); Write( REG_LR_PREAMBLELSB, ( uint8_t )( preambleLen & 0xFF ) ); - if( fixLen == 1 ) + //write PAYLOADLENGTH and PAYLOADMAXLENGTH even if it's not in fixedLength + if (payloadLen == 0) { - Write( REG_LR_PAYLOADLENGTH, payloadLen ); + Write(REG_LR_PAYLOADLENGTH, RX_BUFFER_SIZE); + Write(REG_LR_PAYLOADMAXLENGTH, RX_BUFFER_SIZE); + } + else + { + Write(REG_LR_PAYLOADLENGTH, payloadLen); + Write(REG_LR_PAYLOADMAXLENGTH, payloadLen); } if( this->settings.LoRa.FreqHopOn == true )
--- a/sx1276/sx1276.h Tue Mar 15 13:12:44 2016 +0000 +++ b/sx1276/sx1276.h Tue May 03 19:18:20 2016 +0000 @@ -31,7 +31,7 @@ #define XTAL_FREQ 32000000 #define FREQ_STEP 61.03515625 -#define RX_BUFFER_SIZE 256 +#define RX_BUFFER_SIZE 0xff /*! * Constant values need to compute the RSSI value