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
2f9bf5d4
Commit
2f9bf5d4
authored
Feb 15, 2022
by
Eric Duminil
Browse files
Updated warning
parent
f51460db
Changes
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/web_config.cpp
View file @
2f9bf5d4
...
...
@@ -3,13 +3,9 @@
#define STRING_LEN 40 // Should be enough for ip, addresses, passwords...
#include
"config.h"
#ifndef
MEASUREMENT_TIMESTEP
#ifndef
AMPEL_PASSWORD
# error Missing config.h file. Please copy config.public.h to config.h.
#endif
// Make sure AMPEL_WIFI is defined and not empty:
#if !defined(AMPEL_WIFI) || (7-AMPEL_WIFI-7 == 14)
# error config.h has a new structure, please update it from config.public.h (e.g. AMPEL_WIFI should be set to true or false)
# warning config.h has a new structure (e.g. AMPEL_WIFI should be set to true or false)
#endif
#include
"util.h"
...
...
@@ -100,8 +96,8 @@ namespace web_config {
OptionalParameterGroup
mqttParams
=
OptionalParameterGroup
(
"MQTT"
,
"MQTT"
,
AMPEL_MQTT
);
IntTParameter
<
uint16_t
>
mqttIntervalParam
=
Builder
<
IntTParameter
<
uint16_t
>>
(
"mqtt_interval"
).
label
(
"MQTT interval"
).
defaultValue
(
MQTT_SENDING_INTERVAL
).
min
(
0
).
step
(
1
).
defaultValue
(
300
).
placeholder
(
"[s]"
).
build
();
Builder
<
IntTParameter
<
uint16_t
>>
(
"mqtt_interval"
).
label
(
"MQTT interval"
).
defaultValue
(
MQTT_SENDING_INTERVAL
).
min
(
0
).
step
(
1
).
defaultValue
(
300
).
placeholder
(
"[s]"
).
build
();
CheckboxTParameter
mqttEncryptionParam
=
Builder
<
CheckboxTParameter
>
(
"mqtt_encryption"
).
label
(
"Encrypt MQTT?"
).
defaultValue
(
MQTT_ENCRYPTED
).
build
();
...
...
@@ -140,8 +136,8 @@ namespace web_config {
#if defined(ESP32)
OptionalParameterGroup
loraParams
=
OptionalParameterGroup
(
"LoRaWan"
,
"LoRaWan"
,
AMPEL_LORAWAN
);
IntTParameter
<
uint16_t
>
loraIntervalParam
=
Builder
<
IntTParameter
<
uint16_t
>>
(
"lora_interval"
).
label
(
"LoRa interval"
).
defaultValue
(
LORAWAN_SENDING_INTERVAL
).
min
(
0
).
step
(
1
).
defaultValue
(
300
).
placeholder
(
"[s]"
).
build
();
Builder
<
IntTParameter
<
uint16_t
>>
(
"lora_interval"
).
label
(
"LoRa interval"
).
defaultValue
(
LORAWAN_SENDING_INTERVAL
).
min
(
0
).
step
(
1
).
defaultValue
(
300
).
placeholder
(
"[s]"
).
build
();
TextTParameter
<
17
>
deviceEUIParam
=
Builder
<
TextTParameter
<
17
>>
(
"device_eui"
).
label
(
"Device EUI (MSB)"
).
defaultValue
(
LORAWAN_DEVICE_EUI
).
build
();
...
...
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