LoRa on Multitech with Semtech mote
Dependencies: LoRaWAN-lib SX1272Lib lib_gps lib_mma8451q lib_mpl3115a2 mbed
Fork of LoRaWAN-NAMote72-Application-Demo_Multitech by
Diff: app/LoRaApp.cpp
- Revision:
- 15:39a23f5affd1
- Parent:
- 14:f687ec277e1b
- Child:
- 16:85cfe4bb33e8
--- 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 )