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
6625ade7
Commit
6625ade7
authored
Feb 08, 2022
by
Eric Duminil
Browse files
Small changes
parent
22d98cc2
Pipeline
#5760
passed with stage
in 2 minutes and 8 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/ampel-firmware.ino
View file @
6625ade7
...
...
@@ -12,7 +12,6 @@
*/
#include
"ampel-firmware.h"
//TODO: Move as many includes into cpp as possible
/*****************************************************************
* GPL License *
...
...
@@ -96,8 +95,6 @@ void setup() {
});
#endif
void
setWifiConnectionFailedCallback
(
void
(
*
function
)());
pinMode
(
0
,
INPUT
);
// Flash button (used for forced calibration)
Serial
.
println
();
...
...
@@ -221,7 +218,7 @@ void checkFlashButton() {
void
keepServicesAlive
()
{
#ifdef AMPEL_WIFI
web_config
::
update
();
if
(
WiFi
.
status
()
==
WL_CONNECTED
)
{
if
(
wifi
::
connected
()
)
{
ntp
::
update
();
// NTP client has its own timer. It will connect to NTP server every 60s.
# ifdef AMPEL_MQTT
mqtt
::
keepConnection
();
// MQTT client has its own timer. It will keep alive every 15s.
...
...
ampel-firmware/wifi_util.cpp
View file @
6625ade7
...
...
@@ -27,6 +27,10 @@ namespace config {
namespace
wifi
{
char
local_ip
[
16
];
// "255.255.255.255\0"
bool
connected
()
{
return
WiFi
.
status
()
==
WL_CONNECTED
;
}
void
scanNetworks
()
{
Serial
.
println
();
Serial
.
println
(
F
(
"WiFi - Scanning..."
));
...
...
ampel-firmware/wifi_util.h
View file @
6625ade7
...
...
@@ -4,6 +4,7 @@
namespace
wifi
{
extern
char
local_ip
[
16
];
void
defineCommands
();
bool
connected
();
}
#endif
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