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
24443b0a
Commit
24443b0a
authored
Apr 19, 2021
by
Eric Duminil
Browse files
Night mode command
parent
3362af87
Changes
3
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/co2_sensor.cpp
View file @
24443b0a
...
...
@@ -81,7 +81,6 @@ namespace sensor {
sensor_console
::
defineCommand
(
"reset"
,
[]()
{
ESP
.
restart
();
},
" (Restarts the sensor)"
);
sensor_console
::
defineCommand
(
"night_mode"
,
led_effects
::
toggleNightMode
,
" (Toggles night mode on/off)"
);
}
//NOTE: should timer deviation be used to adjust measurement_timestep?
...
...
ampel-firmware/led_effects.cpp
View file @
24443b0a
...
...
@@ -74,6 +74,7 @@ namespace led_effects {
pixels
.
begin
();
pixels
.
setBrightness
(
config
::
max_brightness
);
LEDsOff
();
sensor_console
::
defineCommand
(
"night_mode"
,
toggleNightMode
,
" (Toggles night mode on/off)"
);
}
void
toggleNightMode
()
{
...
...
ampel-firmware/led_effects.h
View file @
24443b0a
...
...
@@ -2,6 +2,7 @@
#define LED_EFFECTS_H_INCLUDED
#include
<Arduino.h>
#include
"config.h"
#include
"sensor_console.h"
// Adafruit NeoPixel (Arduino library for controlling single-wire-based LED pixels and strip)
// https://github.com/adafruit/Adafruit_NeoPixel
...
...
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