publish for gps with lora
Dependents: Dinghy_RaceTrak_Node_GPS_with_LoRa
Fork of LoRaWAN-lib by
Diff: LoRaMac.cpp
- Revision:
- 10:1ac668ce2b15
- Parent:
- 9:db4900d60c37
diff -r db4900d60c37 -r 1ac668ce2b15 LoRaMac.cpp --- a/LoRaMac.cpp Wed Jul 26 00:56:14 2017 +0000 +++ b/LoRaMac.cpp Wed Jul 26 01:08:23 2017 +0000 @@ -2923,6 +2923,10 @@ } else { + if( ValidatePayloadLength( LoRaMacTxPayloadLen, LoRaMacParams.ChannelsDatarate, MacCommandsBufferIndex ) == false ) + { + return LORAMAC_STATUS_LENGTH_ERROR; + } RxWindow1Delay = LoRaMacParams.ReceiveDelay1 + RxWindowsParams[0].RxOffset; RxWindow2Delay = LoRaMacParams.ReceiveDelay2 + RxWindowsParams[1].RxOffset; } @@ -3149,11 +3153,6 @@ fCtrl->Bits.AdrAckReq = AdrNextDr( fCtrl->Bits.Adr, true, &LoRaMacParams.ChannelsDatarate ); - if( ValidatePayloadLength( LoRaMacTxPayloadLen, LoRaMacParams.ChannelsDatarate, MacCommandsBufferIndex ) == false ) - { - return LORAMAC_STATUS_LENGTH_ERROR; - } - if( SrvAckRequested == true ) { SrvAckRequested = false;