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
fcee9d6d
Commit
fcee9d6d
authored
Feb 15, 2022
by
Eric Duminil
Browse files
Starting to parse Lora config
parent
39e7a31b
Changes
2
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/web_config.cpp
View file @
fcee9d6d
...
...
@@ -154,8 +154,8 @@ namespace web_config {
"70B3D5..."
).
build
();
TextTParameter
<
17
>
appEUIParam
=
Builder
<
TextTParameter
<
17
>>
(
"app_eui"
).
label
(
"App EUI"
).
defaultValue
(
"00EA07..."
).
build
();
TextTParameter
<
3
2
>
appKeyParam
=
Builder
<
TextTParameter
<
3
2
>>
(
"app_key"
).
label
(
"App key"
).
defaultValue
(
"81CCFE..."
).
build
();
TextTParameter
<
3
3
>
appKeyParam
=
Builder
<
TextTParameter
<
3
3
>>
(
"app_key"
).
label
(
"App key"
).
defaultValue
(
"81CCFE..."
).
build
();
//TODO: Save LoRa session to hidden parameter after first OTAA successful login
#endif
...
...
@@ -345,5 +345,8 @@ namespace config {
bool
is_lorawan_active
()
{
return
web_config
::
loraParams
.
isActive
();
}
char
*
lorawan_device_eui
=
web_config
::
deviceEUIParam
.
value
();
char
*
lorawan_app_key
=
web_config
::
appKeyParam
.
value
();
char
*
lorawan_app_eui
=
web_config
::
appEUIParam
.
value
();
#endif
}
ampel-firmware/web_config.h
View file @
fcee9d6d
...
...
@@ -54,6 +54,9 @@ namespace config {
// LORAWAN
#if defined(ESP32)
bool
is_lorawan_active
();
// also defined for ESP8266, and set to false
extern
char
*
lorawan_device_eui
;
extern
char
*
lorawan_app_key
;
extern
char
*
lorawan_app_eui
;
#endif
// Transmission rate
...
...
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