mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 10:12:50 +00:00
environment: add DPS310 high-accuracy barometer (#6237)
* dps310: initial scan support * dps310 sensor support * new protobufs * new protobufs * address cr --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
23
src/modules/Telemetry/Sensor/DPS310Sensor.h
Normal file
23
src/modules/Telemetry/Sensor/DPS310Sensor.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "configuration.h"
|
||||
|
||||
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
||||
|
||||
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
||||
#include "TelemetrySensor.h"
|
||||
#include <Adafruit_DPS310.h>
|
||||
|
||||
class DPS310Sensor : public TelemetrySensor
|
||||
{
|
||||
private:
|
||||
Adafruit_DPS310 dps310;
|
||||
|
||||
protected:
|
||||
virtual void setup() override;
|
||||
|
||||
public:
|
||||
DPS310Sensor();
|
||||
virtual int32_t runOnce() override;
|
||||
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user