mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-26 18:09:04 +00:00
fix of tryfix SHT31 sensor (#3377)
This commit is contained in:
parent
e16689a0d6
commit
c7839b469b
@ -12,6 +12,7 @@ int32_t SHT31Sensor::runOnce()
|
||||
if (!hasSensor()) {
|
||||
return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;
|
||||
}
|
||||
sht31 = Adafruit_SHT31(nodeTelemetrySensorsMap[sensorType].second);
|
||||
status = sht31.begin(nodeTelemetrySensorsMap[sensorType].first);
|
||||
return initI2CSensor();
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
class SHT31Sensor : public TelemetrySensor
|
||||
{
|
||||
private:
|
||||
Adafruit_SHT31 sht31 = Adafruit_SHT31(nodeTelemetrySensorsMap[sensorType].second);
|
||||
Adafruit_SHT31 sht31;
|
||||
|
||||
protected:
|
||||
virtual void setup() override;
|
||||
|
Loading…
Reference in New Issue
Block a user