mQ Branch for NA mote testing
Dependencies: LoRaWAN-lib SX1272Lib-mQ lib_gps lib_mma8451q lib_mpl3115a2 mbed
Fork of LoRaWAN-NAMote72-Application-Demo by
Diff: app/LoRaApp.cpp
- Revision:
- 15:39a23f5affd1
- Parent:
- 14:f687ec277e1b
- Child:
- 18:18408c3c2d0c
diff -r f687ec277e1b -r 39a23f5affd1 app/LoRaApp.cpp --- a/app/LoRaApp.cpp Tue Aug 30 18:56:17 2016 +0000 +++ b/app/LoRaApp.cpp Wed Aug 31 21:01:03 2016 +0000 @@ -46,8 +46,11 @@ void Application::ApplicationAppendData( uint8_t *pData, uint8_t len ) { - memcpy( BuffAddr + BuffPtr, pData, len ); - BuffPtr += len; + if( ( BuffPtr + len ) <= LORAWAN_APP_DATA_SIZE ) + { + memcpy( BuffAddr + BuffPtr, pData, len ); + BuffPtr += len; + } } void Application::ApplicationPtrPos( uint8_t ptrPos )