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
e3af69a3
Commit
e3af69a3
authored
Jan 09, 2021
by
Eric Duminil
Browse files
Removing old todos
parent
8b316b1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/csv_writer.cpp
View file @
e3af69a3
...
...
@@ -160,7 +160,6 @@ namespace csv_writer {
void
logIfTimeHasCome
(
const
String
&
timeStamp
,
const
int16_t
&
co2
,
const
float
&
temperature
,
const
float
&
humidity
)
{
unsigned
long
now
=
seconds
();
//TODO: Write average since last CSV write?
if
(
now
-
last_written_at
>
config
::
csv_interval
)
{
last_written_at
=
now
;
log
(
timeStamp
,
co2
,
temperature
,
humidity
);
...
...
ampel-firmware/mqtt.cpp
View file @
e3af69a3
...
...
@@ -177,7 +177,7 @@ namespace mqtt {
}
void
reconnect
()
{
if
(
last_failed_at
>
0
&&
seconds
()
-
last_failed_at
<
config
::
wait_after_fail
)
{
if
(
last_failed_at
>
0
&&
(
seconds
()
-
last_failed_at
<
config
::
wait_after_fail
)
)
{
// It failed less than wait_after_fail ago. Not even trying.
return
;
}
...
...
@@ -216,7 +216,6 @@ namespace mqtt {
void
publishIfTimeHasCome
(
const
String
&
timeStamp
,
const
int16_t
&
co2
,
const
float
&
temp
,
const
float
&
hum
)
{
// Send message via MQTT according to sending interval
unsigned
long
now
=
seconds
();
//TODO: Send average since last MQTT message?
if
(
now
-
last_sent_at
>
config
::
sending_interval
)
{
last_sent_at
=
now
;
publish
(
timeStamp
,
co2
,
temp
,
hum
);
...
...
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