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:
- 7:92f4f419f91f
- Parent:
- 6:f8194e691dd4
- Child:
- 8:14521932100a
--- a/app/LoRaEventProc.cpp Wed Jun 08 22:06:26 2016 +0000 +++ b/app/LoRaEventProc.cpp Wed Jun 08 22:39:27 2016 +0000 @@ -128,7 +128,20 @@ //Point the pointer to position index of Tx Buffer LoRaApp.ApplicationPtrPos( ptrIndex ); - LoRaApp.ApplicationCall( AppPushButton ); // Generate Accelerometer data bytes + LoRaApp.ApplicationCall( AppPushButton ); // Transmit uplink counter + + break; + } + + // Transmit on Vertical Orientation Demo + case 12: + { + uint8_t ptrIndex = 0; + + //Point the pointer to position index of Tx Buffer + LoRaApp.ApplicationPtrPos( ptrIndex ); + + LoRaApp.ApplicationCall( AppPushButton ); // Transmit uplink counter break; } @@ -196,6 +209,27 @@ break; } + /* Orientation Demo + Send Packet Immedietly if Mote is Vertical + */ + case 12: + { + CheckOrientation(); + + if(VerticalStatus == true) + { + // Send Pkt immedietly if PC = GND + DeviceState = DEVICE_STATE_SEND; + NextTx = true; + } + else + { + // Keep polling + IsTxIntUpdate = true; + } + break; + } + /* Compliance Test Set Timer interrupt for next uplink */