Commit e3af69a3 authored by Eric Duminil's avatar Eric Duminil
Browse files

Removing old todos

parent 8b316b1a
...@@ -160,7 +160,6 @@ namespace csv_writer { ...@@ -160,7 +160,6 @@ namespace csv_writer {
void logIfTimeHasCome(const String &timeStamp, const int16_t &co2, const float &temperature, const float &humidity) { void logIfTimeHasCome(const String &timeStamp, const int16_t &co2, const float &temperature, const float &humidity) {
unsigned long now = seconds(); unsigned long now = seconds();
//TODO: Write average since last CSV write?
if (now - last_written_at > config::csv_interval) { if (now - last_written_at > config::csv_interval) {
last_written_at = now; last_written_at = now;
log(timeStamp, co2, temperature, humidity); log(timeStamp, co2, temperature, humidity);
......
...@@ -177,7 +177,7 @@ namespace mqtt { ...@@ -177,7 +177,7 @@ namespace mqtt {
} }
void reconnect() { 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. // It failed less than wait_after_fail ago. Not even trying.
return; return;
} }
...@@ -216,7 +216,6 @@ namespace mqtt { ...@@ -216,7 +216,6 @@ namespace mqtt {
void publishIfTimeHasCome(const String &timeStamp, const int16_t &co2, const float &temp, const float &hum) { void publishIfTimeHasCome(const String &timeStamp, const int16_t &co2, const float &temp, const float &hum) {
// Send message via MQTT according to sending interval // Send message via MQTT according to sending interval
unsigned long now = seconds(); unsigned long now = seconds();
//TODO: Send average since last MQTT message?
if (now - last_sent_at > config::sending_interval) { if (now - last_sent_at > config::sending_interval) {
last_sent_at = now; last_sent_at = now;
publish(timeStamp, co2, temp, hum); publish(timeStamp, co2, temp, hum);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment