mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 09:43:03 +00:00
Add Sensirion SHT4X sensors (#3792)
* add Sensirion SHT4X sensors * Update platformio.ini Fix lib version * Delete src/mesh/generated/meshtastic/telemetry.pb.h * Revert "Delete src/mesh/generated/meshtastic/telemetry.pb.h" This reverts commit 8e5e6a9f6ff4e31ed32775741c03a855e663a5de. * remove modification on generated file * Update ScanI2CTwoWire.cpp Fix copy/paste issue --------- Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "Sensor/MCP9808Sensor.h"
|
||||
#include "Sensor/RCWL9620Sensor.h"
|
||||
#include "Sensor/SHT31Sensor.h"
|
||||
#include "Sensor/SHT4XSensor.h"
|
||||
#include "Sensor/SHTC3Sensor.h"
|
||||
|
||||
BMP085Sensor bmp085Sensor;
|
||||
@@ -36,6 +37,7 @@ MCP9808Sensor mcp9808Sensor;
|
||||
SHTC3Sensor shtc3Sensor;
|
||||
LPS22HBSensor lps22hbSensor;
|
||||
SHT31Sensor sht31Sensor;
|
||||
SHT4XSensor sht4xSensor;
|
||||
RCWL9620Sensor rcwl9620Sensor;
|
||||
|
||||
#define FAILED_STATE_SENSOR_READ_MULTIPLIER 10
|
||||
@@ -91,6 +93,8 @@ int32_t EnvironmentTelemetryModule::runOnce()
|
||||
result = lps22hbSensor.runOnce();
|
||||
if (sht31Sensor.hasSensor())
|
||||
result = sht31Sensor.runOnce();
|
||||
if (sht4xSensor.hasSensor())
|
||||
result = sht4xSensor.runOnce();
|
||||
if (ina219Sensor.hasSensor())
|
||||
result = ina219Sensor.runOnce();
|
||||
if (ina260Sensor.hasSensor())
|
||||
@@ -246,6 +250,8 @@ bool EnvironmentTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly)
|
||||
|
||||
if (sht31Sensor.hasSensor())
|
||||
valid = sht31Sensor.getMetrics(&m);
|
||||
if (sht4xSensor.hasSensor())
|
||||
valid = sht4xSensor.getMetrics(&m);
|
||||
if (lps22hbSensor.hasSensor())
|
||||
valid = lps22hbSensor.getMetrics(&m);
|
||||
if (shtc3Sensor.hasSensor())
|
||||
|
||||
Reference in New Issue
Block a user