![](/media/cache/group/Espotel.jpg.50x50_q85.jpg)
Semtech stack for ELMO - ver. 4.1.0.
Fork of LoRaWAN_Semtech_stack_v4.1 by
Diff: main.cpp
- Revision:
- 4:0aa5d153c316
- Parent:
- 3:73c2fa59588c
--- a/main.cpp Fri Mar 18 12:31:07 2016 +0000 +++ b/main.cpp Tue Mar 22 16:20:41 2016 +0000 @@ -19,7 +19,7 @@ #include "utilities.h" #include "LoRaMac.h" #include "Comissioning.h" - +#include "LoRaMac-api-v3.h" DigitalOut Led1(LED1); DigitalOut Led2(LED2); @@ -61,9 +61,9 @@ * * \remark Please note that ETSI mandates duty cycled transmissions. Use only for test purposes */ -#define LORAWAN_DUTYCYCLE_ON true +#define LORAWAN_DUTYCYCLE_ON false -#define USE_SEMTECH_DEFAULT_CHANNEL_LINEUP 1 +#define USE_SEMTECH_DEFAULT_CHANNEL_LINEUP 0 #if( USE_SEMTECH_DEFAULT_CHANNEL_LINEUP == 1 ) @@ -244,12 +244,6 @@ uint16_t altitudeGps = 0xFFFF; uint8_t batteryLevel = 0; - temperature = ( int16_t )( MPL3115ReadTemperature( ) * 100 ); // in °C * 100 - - batteryLevel = BoardGetBatteryLevel( ); // 1 (very low) to 254 (fully charged) - GpsGetLatestGpsPositionBinary( &latitude, &longitude ); - altitudeGps = GpsGetLatestGpsAltitude( ); // in m - AppData[0] = AppLedStateOn; AppData[1] = temperature; AppData[2] = batteryLevel; @@ -725,6 +719,7 @@ } case DEVICE_STATE_SEND: { + static uint8_t flag = 0; if( NextTx == true ) { PrepareTxFrame( AppPort );