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
d741d85f
Commit
d741d85f
authored
Mar 03, 2022
by
Eric Duminil
Browse files
Slightly modified example
parent
92b9b904
Changes
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/ampel-firmware.ino
View file @
d741d85f
...
...
@@ -53,7 +53,6 @@ const char wifiInitialApPassword[] = "smrtTHNG8266";
void
handleRoot
();
// -- Callback methods.
void
configSaved
();
bool
formValidator
(
iotwebconf
::
WebRequestWrapper
*
webRequestWrapper
);
DNSServer
dnsServer
;
WebServer
server
(
80
);
...
...
@@ -136,7 +135,6 @@ void setup()
iotWebConf
.
addParameterGroup
(
&
group1
);
iotWebConf
.
addParameterGroup
(
&
group2
);
iotWebConf
.
setConfigSavedCallback
(
&
configSaved
);
iotWebConf
.
setFormValidator
(
&
formValidator
);
iotWebConf
.
getApTimeoutParameter
()
->
visible
=
true
;
// -- Initializing the configuration.
...
...
@@ -200,20 +198,3 @@ void configSaved()
{
Serial
.
println
(
"Configuration was updated."
);
}
bool
formValidator
(
iotwebconf
::
WebRequestWrapper
*
webRequestWrapper
)
{
Serial
.
println
(
"Validating form."
);
bool
valid
=
true
;
/*
int l = webRequestWrapper->arg(stringParam.getId()).length();
if (l < 3)
{
stringParam.errorMessage = "Please provide at least 3 characters for this test!";
valid = false;
}
*/
return
valid
;
}
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