mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-04 20:54:42 +00:00
24 lines
498 B
C++
24 lines
498 B
C++
#pragma once
|
|
#include "configuration.h"
|
|
|
|
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
|
|
|
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
|
#include "TelemetrySensor.h"
|
|
#include <ClosedCube_OPT3001.h>
|
|
|
|
class OPT3001Sensor : public TelemetrySensor
|
|
{
|
|
private:
|
|
ClosedCube_OPT3001 opt3001;
|
|
|
|
protected:
|
|
virtual void setup() override;
|
|
|
|
public:
|
|
OPT3001Sensor();
|
|
virtual int32_t runOnce() override;
|
|
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
|
|
};
|
|
|
|
#endif |