Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
89ecb4a8
Commit
89ecb4a8
authored
Feb 07, 2022
by
Eric Duminil
Browse files
Trying to refactor lorawan header
parent
d08c38ec
Changes
3
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/lorawan.cpp
View file @
89ecb4a8
#include
"lorawan.h"
#if defined(AMPEL_LORAWAN) && defined(ESP32)
#include
"led_effects.h"
#include
"sensor_console.h"
#include
"util.h"
#include
<SPI.h>
namespace
config
{
// Values should be defined in config.h
uint16_t
lorawan_sending_interval
=
LORAWAN_SENDING_INTERVAL
;
// [s]
...
...
ampel-firmware/lorawan.h
View file @
89ecb4a8
...
...
@@ -4,17 +4,12 @@
#include
"config.h"
#if defined(AMPEL_LORAWAN) && defined(ESP32)
#include
<
Ardu
in
o
.h>
#include
<
std
in
t
.h>
// For uint32_t & uint16_t
// Requires "MCCI LoRaWAN LMIC library", which will be automatically used with PlatformIO but should be added in "Arduino IDE".
// Tested successfully with v3.2.0 and connected to a thethingsnetwork.org app.
#include
<lmic.h>
#include
<hal/hal.h>
#include
<arduino_lmic_hal_boards.h>
#include
<SPI.h>
#include
"led_effects.h"
#include
"sensor_console.h"
#include
"util.h"
namespace
config
{
extern
uint16_t
lorawan_sending_interval
;
// [s]
...
...
ampel-firmware/wifi_util.h
View file @
89ecb4a8
#ifndef WIFI_UTIL_H_INCLUDED
#define WIFI_UTIL_H_INCLUDED
#if defined(ESP8266)
# include <ESP8266WiFi.h>
#elif defined(ESP32)
# include <WiFi.h>
#endif
namespace
wifi
{
extern
char
local_ip
[];
void
connect
(
const
char
*
hostname
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment