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
7790cf72
Commit
7790cf72
authored
Dec 26, 2020
by
Eric Duminil
Browse files
Show frequency plan in log
parent
d9a982b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
lorawan.cpp
View file @
7790cf72
...
...
@@ -36,13 +36,7 @@ namespace lorawan {
String
last_transmission
=
""
;
void
initialize
()
{
Serial
.
print
(
F
(
"Starting LoRaWAN. "
));
#if CFG_LMIC_EU_like
Serial
.
println
(
"Region : EU."
);
#else
Serial
.
println
(
"Region : US."
);
#endif
Serial
.
println
(
F
(
"Starting LoRaWAN. Frequency plan : "
LMIC_FREQUENCY_PLAN
" MHz."
));
// More info about pin mapping : https://github.com/mcci-catena/arduino-lmic#pin-mapping
// Has been tested successfully with ESP32 TTGO LoRa32 V1, and might work with other ESP32+LoRa boards.
...
...
lorawan.h
View file @
7790cf72
...
...
@@ -19,6 +19,22 @@ namespace config {
extern
uint16_t
lorawan_sending_interval
;
// [s]
}
#if defined(CFG_eu868)
# define LMIC_FREQUENCY_PLAN "Europe 868"
#elif defined(CFG_us915)
# define LMIC_FREQUENCY_PLAN "US 915"
#elif defined(CFG_au915)
# define LMIC_FREQUENCY_PLAN "Australia 915"
#elif defined(CFG_as923)
# define LMIC_FREQUENCY_PLAN "Asia 923"
#elif defined(CFG_kr920)
# define LMIC_FREQUENCY_PLAN "Korea 920"
#elif defined(CFG_in866)
# define LMIC_FREQUENCY_PLAN "India 866"
#else
# error "Region should be specified"
#endif
namespace
lorawan
{
extern
bool
waiting_for_confirmation
;
extern
bool
connected
;
...
...
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