Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
cc3629e4
Commit
cc3629e4
authored
Feb 16, 2022
by
Eric Duminil
Browse files
Trying to load session
parent
dfc57250
Changes
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/lorawan.cpp
View file @
cc3629e4
...
...
@@ -59,7 +59,13 @@ namespace lorawan {
// Reset the MAC state. Session and pending data transfers will be discarded.
LMIC_reset
();
// Join, but don't send anything yet.
LMIC_startJoining
();
if
(
config
::
lora_session_saved
)
{
LMIC_setSession
(
config
::
lora_netid
,
config
::
lora_devaddr
,
(
unsigned
char
*
)
config
::
lorawan_nwk_key
,
(
unsigned
char
*
)
config
::
lorawan_art_key
);
connected
=
true
;
// Well, hopefully.
}
else
{
LMIC_startJoining
();
}
sensor_console
::
defineIntCommand
(
"lora"
,
setLoRaInterval
,
F
(
"300 (Sets LoRaWAN sending interval, in s)"
));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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