diff --git a/lib/M5UnitGesture/src/unit/unit_PAJ7620U2.cpp b/lib/M5UnitGesture/src/unit/unit_PAJ7620U2.cpp index 6ebb467..447fa21 100644 --- a/lib/M5UnitGesture/src/unit/unit_PAJ7620U2.cpp +++ b/lib/M5UnitGesture/src/unit/unit_PAJ7620U2.cpp @@ -569,7 +569,7 @@ bool UnitPAJ7620U2::readObjectCenter(uint16_t& x, uint16_t& y) { } bool UnitPAJ7620U2::readCursor(uint16_t& x, uint16_t& y) { - std::array raw{}; // X_LOW , 4? + // std::array raw{}; // X_LOW , 4? uint8_t xl{}, xh{}, yl{}, yh{}; if (read_banked_register8(CURSOR_CLAMP_CENTER_X_LOW, xl) && diff --git a/lib/M5UnitGesture/src/unit/unit_PAJ7620U2.hpp b/lib/M5UnitGesture/src/unit/unit_PAJ7620U2.hpp index 23701f4..fe8069d 100644 --- a/lib/M5UnitGesture/src/unit/unit_PAJ7620U2.hpp +++ b/lib/M5UnitGesture/src/unit/unit_PAJ7620U2.hpp @@ -27,6 +27,8 @@ #include #include +#include +#include namespace m5 { namespace unit { @@ -87,6 +89,8 @@ enum class Frequency : int8_t { @brief Measurement data group */ struct Data { + Data() { + } // Common // [0,1]:gesture // Proximity @@ -145,7 +149,6 @@ struct Data { } // namespace paj7620u2 - /*! @class UnitPAJ7620U2 @brief PAJ7620U2 unit diff --git a/lib/M5UnitHeart/src/utility/heart_rate.cpp b/lib/M5UnitHeart/src/utility/heart_rate.cpp index 8398f4b..f35284b 100644 --- a/lib/M5UnitHeart/src/utility/heart_rate.cpp +++ b/lib/M5UnitHeart/src/utility/heart_rate.cpp @@ -79,7 +79,9 @@ namespace max30100 { HeartRate::HeartRate(const uint32_t srate, const float threshold, const size_t max_data_size) - : _samplingRate{srate}, _threshold(threshold), _maxDataSize{max_data_size} { + : _samplingRate{(float)srate}, + _threshold(threshold), + _maxDataSize{max_data_size} { assert(srate && "SamplingRate must not be zero"); if (!max_data_size) { _maxDataSize = (size_t)srate * 30U; diff --git a/test/embedded/test_scd40/scd40_test.cpp b/test/embedded/test_scd40/scd40_test.cpp index 5416896..a50f7bf 100644 --- a/test/embedded/test_scd40/scd40_test.cpp +++ b/test/embedded/test_scd40/scd40_test.cpp @@ -37,10 +37,12 @@ class TestSCD40 : public ComponentTestBase { #else auto ptr = new m5::unit::UnitSCD40(); #endif - auto cfg = ptr->config(); - cfg.start_periodic = false; - cfg.stored_size = 2; - ptr->config(cfg); + if (ptr) { + auto cfg = ptr->config(); + cfg.start_periodic = false; + cfg.stored_size = 2; + ptr->config(cfg); + } return ptr; } virtual bool is_using_hal() const override {