Skip to content

Fixes UnitSHT30 via PaHub problem #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/arduino-m5-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
# - m5stack_unit_cams3

platform-version:
- 2.1.2
- 3.2.1

platform:
- m5stack
Expand Down
13 changes: 6 additions & 7 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@
"type": "git",
"url": "https://github.com/m5stack/M5Unit-ENV.git"
},
"dependencies":
{
"m5stack/M5UnitUnified": ">=0.1.0",
"boschsensortec/BME68x Sensor library": ">=1.3.40408",
"boschsensortec/bsec2": ">=1.10.2610"
"dependencies": {
"m5stack/M5UnitUnified": ">=0.1.0",
"boschsensortec/BME68x Sensor library": ">=1.3.40408",
"boschsensortec/bsec2": ">=1.10.2610"
},
"version": "1.3.0",
"version": "1.3.1",
"frameworks": [
"arduino"
],
Expand All @@ -31,4 +30,4 @@
"docs/html"
]
}
}
}
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=M5Unit-ENV
version=1.3.0
version=1.3.1
author=M5Stack
maintainer=M5Stack
sentence=Library for M5Stack UNIT ENV
Expand Down
3 changes: 3 additions & 0 deletions src/unit/unit_BME688.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
*/
#include "unit_BME688.hpp"
#if defined(UNIT_BME688_USING_BSEC2)
#pragma message "Using bsec2"
#include <inc/bsec_interface.h> // BSEC2
#else
#pragma message "Not using bsec2"
#endif
#include <M5Utility.hpp>
#include <array>
Expand Down
6 changes: 1 addition & 5 deletions src/unit/unit_BME688.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@
#include <bme68x/bme68x.h>
#endif

#if defined(CONFIG_IDF_TARGET_ESP32C6)
#pragma message "Not using bsec2"

#else
#pragma message "Using bsec2"
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3)
#define UNIT_BME688_USING_BSEC2

#if defined(ARDUINO)
Expand Down
2 changes: 1 addition & 1 deletion src/unit/unit_SHT30.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ bool UnitSHT30::readSerialNumber(uint32_t& serialNumber)
}

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