Skip to content

Commit

Permalink
Integration with TTN (The Things Network LoRaWAN) 'Mapper'
Browse files Browse the repository at this point in the history
  • Loading branch information
lyusupov committed Jun 7, 2018
1 parent 261c4b9 commit f512e33
Show file tree
Hide file tree
Showing 4 changed files with 463 additions and 0 deletions.
2 changes: 2 additions & 0 deletions software/firmware/source/SoftRF/SoftRF.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,6 @@ extern const float txrx_test_positions[90][2] PROGMEM;
#define TXRX_TEST_COURSE 0.0
#define TXRX_TEST_SPEED 50.0

//#define ENABLE_TTN

#endif /* SOFTRF_H */
13 changes: 13 additions & 0 deletions software/firmware/source/SoftRF/SoftRF.ino
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
#include "WiFiHelper.h"
#include "WebHelper.h"
#include "BaroHelper.h"
#include "TTNHelper.h"

#include "SoftRF.h"

Expand Down Expand Up @@ -143,6 +144,10 @@ void setup()
Web_setup();
NMEA_setup();

#if defined(ENABLE_TTN)
TTN_setup();
#endif

delay(1000);

/* expedite restart on WDT reset */
Expand Down Expand Up @@ -245,6 +250,10 @@ void normal_loop()

if (success && isValidFix()) ParseData();

#if defined(ENABLE_TTN)
TTN_loop();
#endif

if (isTimeToDisplay()) {
if (isValidFix()) {
LED_DisplayTraffic();
Expand Down Expand Up @@ -406,6 +415,10 @@ void txrx_test_loop()
parse_end_ms = millis();
#endif

#if defined(ENABLE_TTN)
TTN_loop();
#endif

#if DEBUG_TIMING
led_start_ms = millis();
#endif
Expand Down
Loading

0 comments on commit f512e33

Please sign in to comment.