This website works better with JavaScript.
Home
Explore
Help
Sign In
mh
/
mhsw-espurna
Watch
1
Star
0
Fork
0
Code
Releases
0
Activity
Browse Source
Release lock if sensor has not valid ID
fastled
Xose Pérez
7 years ago
parent
bb82a4936e
commit
4c90a1b320
2 changed files
with
2 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-0
code/espurna/sensors/BMX280Sensor.h
+1
-0
code/espurna/sensors/SI7021Sensor.h
+ 1
- 0
code/espurna/sensors/BMX280Sensor.h
View File
@ -149,6 +149,7 @@ class BMX280Sensor : public BaseSensor {
_chip
=
bme
-
>
begin
(
)
;
if
(
(
_chip
!
=
BMX280_CHIP_BME280
)
&
&
(
_chip
!
=
BMX280_CHIP_BMP280
)
)
{
_chip
=
0
;
i2cReleaseLock
(
_address
)
;
_error
=
SENSOR_ERROR_UNKNOWN_ID
;
}
+ 1
- 0
code/espurna/sensors/SI7021Sensor.h
View File
@ -75,6 +75,7 @@ class SI7021Sensor : public BaseSensor {
#
endif
if
(
(
_chip
!
=
SI7021_CHIP_SI7021
)
&
(
_chip
!
=
SI7021_CHIP_HTU21D
)
)
{
i2cReleaseLock
(
_address
)
;
_error
=
SENSOR_ERROR_UNKNOWN_ID
;
}
else
{
_count
=
2
;
Write
Preview
Loading…
Cancel
Save