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
29388bab
Commit
29388bab
authored
May 15, 2021
by
Eric Duminil
Browse files
Notes & stuff
parent
7a1888cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/web_server.cpp
View file @
29388bab
...
...
@@ -69,7 +69,7 @@ namespace web_server {
#define NUMBER_LEN 32
// -- Configuration specific key. The value should be modified if config structure was changed.
#define CONFIG_VERSION "dem2"
const
char
config_version
[]
=
"ampel_test_v1"
;
char
stringParamValue
[
STRING_LEN
];
char
intParamValue
[
NUMBER_LEN
];
...
...
@@ -99,7 +99,7 @@ namespace web_server {
}
void
initialize
()
{
iotWebConf
=
new
IotWebConf
(
ampel
.
sensorId
,
&
dnsServer
,
&
http
,
HTTP_PASSWORD
,
"ampel_test_v1"
);
iotWebConf
=
new
IotWebConf
(
ampel
.
sensorId
,
&
dnsServer
,
&
http
,
HTTP_PASSWORD
,
config_version
);
const
int
ONBOARD_LED_PIN
=
2
;
# ifdef ESP8266
...
...
@@ -161,13 +161,19 @@ namespace web_server {
iotWebConf
->
skipApStartup
();
//TODO: Add callbacks
//TODO: Add LED effects
//TODO: Allow offline config loading
//TODO: Add default values for SSID/password
//TODO: Add other params
//TODO: Use HTTP_USER / HTTP_PASSWORD for config
//TODO: Move to own class
//TODO: Remove AP Password config?
//TODO: Save LoRaWAN key if possible?
//FIXME: Why does MQTT fail?
//FIXME: Why does MQTT fail? (on ESP32)
Serial
.
println
(
intParamValue
);
// iotWebConf->loadConfig();
iotWebConf
->
init
();
Serial
.
println
(
intParamValue
);
sensor_console
::
defineCommand
(
"reset_config"
,
[]()
{
Serial
.
println
(
F
(
"Resetting config..."
));
...
...
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