mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-06 05:34:45 +00:00

Previously the module was designed around a single sensor. This patch brings it into line with the same design as EnvironmentTelemetry.
23 lines
499 B
C++
23 lines
499 B
C++
#include "configuration.h"
|
|
|
|
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
|
|
|
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
|
#include "TelemetrySensor.h"
|
|
#include <SensirionI2CScd4x.h>
|
|
|
|
class SCD4XSensor : public TelemetrySensor
|
|
{
|
|
private:
|
|
SensirionI2CScd4x scd4x = SensirionI2CScd4x();
|
|
|
|
protected:
|
|
virtual void setup() override;
|
|
|
|
public:
|
|
SCD4XSensor();
|
|
virtual int32_t runOnce() override;
|
|
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
|
|
};
|
|
|
|
#endif |