[iot/main] Fix compilation errors

This commit is contained in:
Starbeamrainbowlabs 2019-06-24 14:27:22 +01:00
parent b9122f99f0
commit 18ba73c99b
6 changed files with 34 additions and 8 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
config.custom.h
settings.custom.h
Reports/*.pdf

View File

@ -22,7 +22,7 @@ void gps_fetch();
* Call gps_fetch() first.
* @return TinyGPSLocation The current location.
*/
TinyGPSLocation gps_info();
TinyGPSPlus gps_info();
/**
* Ends the connection to the GPS device and puts it to sleep in order to save

View File

@ -1,9 +1,9 @@
#pragma once
#include <lmic.h>
#include <hal/hal.h>
#include <SPI.h>
#include "settings.h"
// Global static variable that's used to detect when LMIC has finished doing it's thing
static bool is_sending_complete = false;

View File

@ -10,4 +10,4 @@ void radio_init();
* @param data The message to send.
* @param length The length of the given message.
*/
void radio_send(byte* data, int length);
bool radio_send(byte* data, int length);

View File

@ -0,0 +1,13 @@
// LoRaWAN NwkSKey, network session key
// This is the default Semtech key, which is used by the early prototype TTN
// network.
static const PROGMEM u1_t NWKSKEY[16] = { .... };
// LoRaWAN AppSKey, application session key
// This is the default Semtech key, which is used by the early prototype TTN
// network.
static const u1_t PROGMEM APPSKEY[16] = { ..... };
// LoRaWAN end-device address (DevAddr)
static const u4_t DEVADDR = 0x....; // <-- Change this address for every node!

View File

@ -1,6 +1,17 @@
#pragma once
#include <arduino-lmic/src/hal/hal.h>
#include <lmic.h>
#include <hal/hal.h>
#include <SPI.h>
#include "settings.custom.h"
/*
* This is the main settings file - customise it to match your setup.
* Don't forget that you need to take a copy of settings.custom.h.example as
* settings.custom.h, and fill in the private keys the program needs to talk
* over LORaWAN.
*/
//////////////////////////////////
////////////// Main //////////////
@ -20,16 +31,17 @@
/// RFM95 ///
/////////////
// The SPI chip-select pin for the RFM 95
#define PIN_SPI_CS_RFM95 10
// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 10,
.nss = PIN_SPI_CS_RFM95,
.rxtx = LMIC_UNUSED_PIN,
.rst = 9,
.dio = {2, 6, 7},
};
// The SPI chip-select pin for the RFM 95
#define PIN_SPI_CS_RFM95 10
/////////////////////////////////
////////////// GPS //////////////