Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SX1272lib-PABOOST-HW-Modification mbed
Fork of LoRaWAN_ELMO_TxRx_Template by
Diff: main.cpp
- Revision:
- 4:0aa5d153c316
- Parent:
- 3:73c2fa59588c
- Child:
- 5:be347c6040c1
--- 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 );
