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/LoRaEventProc.cpp
- Revision:
- 13:6b6f4be13633
- Parent:
- 8:14521932100a
- Child:
- 15:39a23f5affd1
--- a/app/LoRaEventProc.cpp Fri Aug 05 20:45:12 2016 +0000 +++ b/app/LoRaEventProc.cpp Tue Aug 30 06:35:16 2016 +0000 @@ -145,6 +145,30 @@ break; } + + + /* Senet myDevices Sensor Demo + Data Format (in Hex): + [Pressure (2 Bytes), Temperature (1 Byte), X-Axis (2 bytes), Y-Axis (2 bytes), Z-Axis (2 bytes), ] + */ + case 13: + { + uint8_t ptrIndex = 0; + + //Point the pointer to position index of Tx Buffer + LoRaApp.ApplicationPtrPos( ptrIndex ); + + LoRaApp.ApplicationCall( AppPrsr); + + LoRaApp.ApplicationCall( AppTemp ); + + LoRaApp.ApplicationCall( AppBat ); + + LoRaApp.ApplicationCall( AppAcclSensor ); // Generate Accelerometer data bytes + + + break; + } default: break; @@ -244,6 +268,7 @@ default: { // Schedule next packet transmission + TxDutyCycleTime = APP_TX_DUTYCYCLE + randr( -APP_TX_DUTYCYCLE_RND, APP_TX_DUTYCYCLE_RND ); TimerSetValue( &TxNextPacketTimer, TxDutyCycleTime ); TimerStart( &TxNextPacketTimer ); break;