Update LoRaWAN MAC
Dependents: LoRaWAN-SX1272-Application-crash LoRaWAN-SX1272-Application-24-31-9sec Canada-SX1272-LoRaWAN-EEPROM Training-Aug2018-SX1272-X-NUCLEO-IKS01A2_Natalia
Fork of LoRaWAN-lib by
Revision 11:58f66381eb7c, committed 2017-11-10
- Comitter:
- ubhat
- Date:
- Fri Nov 10 09:22:15 2017 +0000
- Parent:
- 6:d7a34ded7c87
- Commit message:
- Fix channel mask reset issue
Changed in this revision
LoRaMac.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r d7a34ded7c87 -r 58f66381eb7c LoRaMac.cpp --- a/LoRaMac.cpp Wed May 18 11:19:24 2016 +0000 +++ b/LoRaMac.cpp Fri Nov 10 09:22:15 2017 +0000 @@ -15,7 +15,7 @@ License: Revised BSD License, see LICENSE.TXT file include in the project -Maintainer: Miguel Luis ( Semtech ), Gregory Cristian ( Semtech ) and Daniel Jäckle ( STACKFORCE ) +Maintainer: Miguel Luis ( Semtech ), Gregory Cristian ( Semtech ) and Daniel Jäckle ( STACKFORCE ) */ #include "board.h" @@ -1429,6 +1429,7 @@ ChannelsDatarate = MAX( ChannelsDatarate - 1, LORAMAC_TX_MIN_DATARATE ); } LoRaMacFlags.Bits.MacDone = 0; + // Sends the same frame again ScheduleTx( ); } @@ -3258,7 +3259,7 @@ for ( uint8_t i = 0; i < sizeof( ChannelsMask ) / 2; i++ ) { // Disable channels which are no longer available - ChannelsMaskRemaining[i] &= ChannelsMask[i]; + ChannelsMaskRemaining[i] &= ChannelsMask[i]; } } } @@ -3634,13 +3635,6 @@ IsLoRaMacNetworkJoined = false; #if defined( USE_BAND_915 ) || defined( USE_BAND_915_HYBRID ) -#if defined( USE_BAND_915 ) - // Re-enable 500 kHz default channels - ChannelsMask[4] = 0x00FF; -#else // defined( USE_BAND_915_HYBRID ) - // Re-enable 500 kHz default channels - ChannelsMask[4] = 0x0001; -#endif static uint8_t drSwitch = 0;