From 8e15b6a8d9a6e3a5dd9453f1f5203beb44335dc7 Mon Sep 17 00:00:00 2001
From: Eric Duminil <eric.duminil@gmail.com>
Date: Tue, 8 Feb 2022 10:17:25 +0100
Subject: [PATCH] SCD30 from .cpp to .h

---
 ampel-firmware/co2_sensor.cpp | 4 ++++
 ampel-firmware/co2_sensor.h   | 5 +----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/ampel-firmware/co2_sensor.cpp b/ampel-firmware/co2_sensor.cpp
index fae9895..ab58ebf 100644
--- a/ampel-firmware/co2_sensor.cpp
+++ b/ampel-firmware/co2_sensor.cpp
@@ -6,6 +6,10 @@
 #include "sensor_console.h"
 #include <Wire.h>
 
+// The SCD30 from Sensirion is a high quality Nondispersive Infrared (NDIR) based CO₂ sensor capable of detecting 400 to 10000ppm with an accuracy of ±(30ppm+3%).
+// https://github.com/sparkfun/SparkFun_SCD30_Arduino_Library
+#include "src/lib/SparkFun_SCD30_Arduino_Library/src/SparkFun_SCD30_Arduino_Library.h"  // From: http://librarymanager/All#SparkFun_SCD30
+
 namespace config {
   // UPPERCASE values should be defined in config.h
   uint16_t measurement_timestep = MEASUREMENT_TIMESTEP; // [s] Value between 2 and 1800 (range for SCD30 sensor).
diff --git a/ampel-firmware/co2_sensor.h b/ampel-firmware/co2_sensor.h
index a6a9dd2..2aea223 100644
--- a/ampel-firmware/co2_sensor.h
+++ b/ampel-firmware/co2_sensor.h
@@ -1,9 +1,7 @@
 #ifndef CO2_SENSOR_H_
 #define CO2_SENSOR_H_
 
-// The SCD30 from Sensirion is a high quality Nondispersive Infrared (NDIR) based CO₂ sensor capable of detecting 400 to 10000ppm with an accuracy of ±(30ppm+3%).
-// https://github.com/sparkfun/SparkFun_SCD30_Arduino_Library
-#include "src/lib/SparkFun_SCD30_Arduino_Library/src/SparkFun_SCD30_Arduino_Library.h"  // From: http://librarymanager/All#SparkFun_SCD30
+#include <stdint.h> // For uint16_t
 
 namespace config {
   extern uint16_t measurement_timestep; // [s] Value between 2 and 1800 (range for SCD30 sensor)
@@ -13,7 +11,6 @@ namespace config {
 }
 
 namespace sensor {
-  extern SCD30 scd30;
   extern uint16_t co2;
   extern float temperature;
   extern float humidity;
-- 
GitLab