Skip to content

Commit 73f34ff

Browse files
authored
Merge pull request #34 from m5stack/develop
Fixes UnitSHT30 via PaHub problem
2 parents 84dba23 + 3c52f84 commit 73f34ff

File tree

6 files changed

+13
-15
lines changed

6 files changed

+13
-15
lines changed

.github/workflows/arduino-m5-build-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
# - m5stack_unit_cams3
9797

9898
platform-version:
99-
- 2.1.2
99+
- 3.2.1
100100

101101
platform:
102102
- m5stack

library.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@
1010
"type": "git",
1111
"url": "https://github.com/m5stack/M5Unit-ENV.git"
1212
},
13-
"dependencies":
14-
{
15-
"m5stack/M5UnitUnified": ">=0.1.0",
16-
"boschsensortec/BME68x Sensor library": ">=1.3.40408",
17-
"boschsensortec/bsec2": ">=1.10.2610"
13+
"dependencies": {
14+
"m5stack/M5UnitUnified": ">=0.1.0",
15+
"boschsensortec/BME68x Sensor library": ">=1.3.40408",
16+
"boschsensortec/bsec2": ">=1.10.2610"
1817
},
19-
"version": "1.3.0",
18+
"version": "1.3.1",
2019
"frameworks": [
2120
"arduino"
2221
],
@@ -31,4 +30,4 @@
3130
"docs/html"
3231
]
3332
}
34-
}
33+
}

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=M5Unit-ENV
2-
version=1.3.0
2+
version=1.3.1
33
author=M5Stack
44
maintainer=M5Stack
55
sentence=Library for M5Stack UNIT ENV

src/unit/unit_BME688.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
*/
1010
#include "unit_BME688.hpp"
1111
#if defined(UNIT_BME688_USING_BSEC2)
12+
#pragma message "Using bsec2"
1213
#include <inc/bsec_interface.h> // BSEC2
14+
#else
15+
#pragma message "Not using bsec2"
1316
#endif
1417
#include <M5Utility.hpp>
1518
#include <array>

src/unit/unit_BME688.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@
1919
#include <bme68x/bme68x.h>
2020
#endif
2121

22-
#if defined(CONFIG_IDF_TARGET_ESP32C6)
23-
#pragma message "Not using bsec2"
24-
25-
#else
26-
#pragma message "Using bsec2"
22+
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3)
2723
#define UNIT_BME688_USING_BSEC2
2824

2925
#if defined(ARDUINO)

src/unit/unit_SHT30.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ bool UnitSHT30::readSerialNumber(uint32_t& serialNumber)
302302
}
303303

304304
std::array<uint8_t, 6> rbuf;
305-
if (readRegister(GET_SERIAL_NUMBER_ENABLE_STRETCH, rbuf.data(), rbuf.size(), 0)) {
305+
if (readRegister(GET_SERIAL_NUMBER_DISABLE_STRETCH, rbuf.data(), rbuf.size(), 1)) {
306306
m5::types::big_uint16_t u16[2]{{rbuf[0], rbuf[1]}, {rbuf[3], rbuf[4]}};
307307
m5::utility::CRC8_Checksum crc{};
308308
if (crc.range(u16[0].data(), u16[0].size()) == rbuf[2] && crc.range(u16[1].data(), u16[1].size()) == rbuf[5]) {

0 commit comments

Comments
 (0)