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
96666137
Commit
96666137
authored
Feb 13, 2022
by
Eric Duminil
Browse files
Checking if AP mode, for ESP8266 and ESP32
parent
16536c99
Pipeline
#5806
passed with stage
in 3 minutes and 2 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/co2_sensor.cpp
View file @
96666137
...
...
@@ -230,7 +230,7 @@ namespace sensor {
delay
(
100
);
}
else
{
// Display a flashing led ring, if concentration exceeds a specific value
led_effects
::
redA
lert
();
led_effects
::
a
lert
(
color
::
red
);
}
}
...
...
ampel-firmware/led_effects.cpp
View file @
96666137
...
...
@@ -244,7 +244,7 @@ namespace led_effects {
}
}
void
redA
lert
()
{
void
a
lert
(
uint32_t
color
)
{
if
(
!
config
::
display_led
)
{
onBoardLEDOn
();
delay
(
500
);
...
...
@@ -255,7 +255,7 @@ namespace led_effects {
for
(
int
i
=
0
;
i
<
10
;
i
++
)
{
pixels
.
setBrightness
(
static_cast
<
int
>
(
config
::
max_brightness
*
(
1
-
i
*
0.1
)));
delay
(
50
);
pixels
.
fill
(
color
::
red
);
pixels
.
fill
(
color
);
pixels
.
show
();
}
}
...
...
ampel-firmware/led_effects.h
View file @
96666137
...
...
@@ -20,7 +20,7 @@ namespace led_effects {
void
LEDsOff
();
void
setupRing
();
void
redA
lert
();
void
a
lert
(
uint32_t
color
);
bool
countdownToZero
();
void
showWaitingLED
(
uint32_t
color
);
void
showKITTWheel
(
uint32_t
color
,
uint16_t
duration_s
=
2
);
...
...
ampel-firmware/wifi_util.cpp
View file @
96666137
...
...
@@ -23,17 +23,16 @@ namespace wifi {
//TODO: configurable timeout
for
(
int
i
=
0
;
i
<=
30
;
i
++
)
{
web_config
::
update
();
if
(
connected
())
{
if
(
WiFi
.
getMode
()
==
WIFI_AP
){
led_effects
::
alert
(
0x1cff68
);
}
else
if
(
connected
())
{
break
;
}
else
if
(
WiFi
.
status
()
==
WL_NO_SHIELD
)
{
// Access point, apparently FIXME: This doesn'T work for ESP826clipse6
led_effects
::
showKITTWheel
(
0xFF0015
,
1
);
}
else
{
led_effects
::
showRainbowWheel
();
}
Serial
.
print
(
"Status : "
);
Serial
.
println
(
WiFi
.
status
());
// Serial.print(".");
Serial
.
print
(
"."
);
}
Serial
.
println
();
}
void
scanNetworks
()
{
...
...
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