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