Skip to content

Commit ed0de47

Browse files
committed
Merge branch 'develop'
2 parents 8214dcf + 05af4a4 commit ed0de47

6 files changed

Lines changed: 11 additions & 7 deletions

File tree

examples/Basic/ComponentOnly/main/ComponentOnly.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void setup()
3232

3333
void loop()
3434
{
35-
M5.begin();
35+
M5.update();
3636
unit.update(); // Explicitly call unit.update() yourself
3737
if (unit.updated()) {
3838
// *3 Obtaining unit-specific measurements

examples/Basic/SelfUpdate/main/SelfUpdate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void setup()
5656

5757
void loop()
5858
{
59-
M5.begin();
59+
M5.update();
6060
Units.update(); // unit.update() is not called within this function
6161
M5_LOGI("loop");
6262
m5::utility::delay(1000);

examples/Basic/Simple/main/Simple.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void setup()
3333

3434
void loop()
3535
{
36-
M5.begin();
36+
M5.update();
3737
Units.update();
3838
if (unit.updated()) {
3939
// *3 Obtaining unit-specific measurements

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"M5Utility": "https://github.com/m5stack/M5Utility.git",
1515
"M5HAL": "https://github.com/m5stack/M5HAL.git"
1616
},
17-
"version": "0.0.3",
17+
"version": "0.0.4",
1818
"frameworks": [
1919
"arduino"
2020
],

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=M5UnitUnified
2-
version=0.0.3
2+
version=0.0.4
33
author=M5Stack
44
maintainer=M5Stack
55
sentence=M5UnitUnified is a library for unified handling of various M5 units products. (Alpha version)

src/googletest/test_template.hpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ class GlobalFixture : public ::testing::Environment {
4040
auto pin_num_sda = M5.getPin(m5::pin_name_t::port_a_sda);
4141
auto pin_num_scl = M5.getPin(m5::pin_name_t::port_a_scl);
4242

43+
#if defined(CONFIG_IDF_TARGET_ESP32C6)
44+
TwoWire* w[1] = {&Wire};
45+
#else
4346
TwoWire* w[2] = {&Wire, &Wire1};
44-
if (i2cIsInit(WNUM)) {
45-
M5_LOGW("Already inititlized Wire. Terminate and restart");
47+
#endif
48+
if (WNUM < m5::stl::size(w) && i2cIsInit(WNUM)) {
49+
M5_LOGW("Already inititlized Wire %d. Terminate and restart FREQ %u", WNUM, FREQ);
4650
w[WNUM]->end();
4751
}
4852
w[WNUM]->begin(pin_num_sda, pin_num_scl, FREQ);

0 commit comments

Comments
 (0)