mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-31 23:21:06 +00:00
TI OPT3001 light sensor support (#4015)
* TI OPT3001 light sensor support * Added register interrogation to deconflict with SHT sensors on same address
This commit is contained in:
17
src/modules/Telemetry/Sensor/OPT3001Sensor.h
Normal file
17
src/modules/Telemetry/Sensor/OPT3001Sensor.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#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;
|
||||
};
|
||||
Reference in New Issue
Block a user