2024-04-29 22:10:49 +12:00
|
|
|
#include "configuration.h"
|
|
|
|
|
|
2025-04-28 18:35:13 -05:00
|
|
|
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_LPS2X.h>)
|
2024-04-27 18:05:39 +12:00
|
|
|
|
2023-01-18 08:56:47 -06:00
|
|
|
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
2022-10-15 14:55:57 -05:00
|
|
|
#include "TelemetrySensor.h"
|
|
|
|
|
#include <Adafruit_LPS2X.h>
|
|
|
|
|
#include <Adafruit_Sensor.h>
|
|
|
|
|
|
2023-10-15 02:33:45 +02:00
|
|
|
class LPS22HBSensor : public TelemetrySensor
|
2023-01-18 14:51:48 -06:00
|
|
|
{
|
|
|
|
|
private:
|
2022-10-15 14:55:57 -05:00
|
|
|
Adafruit_LPS22 lps22hb;
|
|
|
|
|
|
2023-01-18 14:51:48 -06:00
|
|
|
public:
|
2022-10-15 14:55:57 -05:00
|
|
|
LPS22HBSensor();
|
2023-01-21 18:22:19 +01:00
|
|
|
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
|
2025-10-13 18:09:33 +02:00
|
|
|
virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;
|
2024-04-27 18:05:39 +12:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|