summaryrefslogtreecommitdiff
path: root/platformio
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2023-06-01 02:56:26 +0300
committerEvgeny Zinoviev <me@ch1p.io>2023-06-01 02:56:26 +0300
commit2a761a7261b1ce4a93f7dd431e6604c21f232769 (patch)
tree35d7e764898825fe0851bd3f2b13acd58cc522ee /platformio
parentb02a9c5473267da88a9182a5b06753f62b689042 (diff)
pio/temphum: fix
Diffstat (limited to 'platformio')
-rw-r--r--platformio/common/libs/temphum/homekit/temphum.cpp4
-rw-r--r--platformio/common/libs/temphum/library.json2
2 files changed, 4 insertions, 2 deletions
diff --git a/platformio/common/libs/temphum/homekit/temphum.cpp b/platformio/common/libs/temphum/homekit/temphum.cpp
index ac4d371..e69b3a5 100644
--- a/platformio/common/libs/temphum/homekit/temphum.cpp
+++ b/platformio/common/libs/temphum/homekit/temphum.cpp
@@ -30,6 +30,7 @@ SensorData Si7021::read() {
Wire.requestFrom(dev_addr, 2);
if (Wire.available() < 2) {
PRINTLN("Si7021: 0xf3: could not read 2 bytes");
+ error = 1;
}
uint16_t temp_raw = Wire.read() << 8 | Wire.read();
double temperature = ((175.72 * temp_raw) / 65536.0) - 46.85;
@@ -38,6 +39,7 @@ SensorData Si7021::read() {
Wire.requestFrom(dev_addr, 2);
if (Wire.available() < 2) {
PRINTLN("Si7021: 0xf5: could not read 2 bytes");
+ error = 1;
}
uint16_t hum_raw = Wire.read() << 8 | Wire.read();
double humidity = ((125.0 * hum_raw) / 65536.0) - 6.0;
@@ -84,4 +86,4 @@ end:
return sd;
}
-} \ No newline at end of file
+}
diff --git a/platformio/common/libs/temphum/library.json b/platformio/common/libs/temphum/library.json
index ae7f670..329b7ca 100644
--- a/platformio/common/libs/temphum/library.json
+++ b/platformio/common/libs/temphum/library.json
@@ -1,6 +1,6 @@
{
"name": "homekit_temphum",
- "version": "1.0.2",
+ "version": "1.0.3",
"build": {
"flags": "-I../../include"
}