Skip to content

Commit

Permalink
Cosmetic change
Browse files Browse the repository at this point in the history
  • Loading branch information
GOB52 committed Dec 6, 2024
1 parent 60a5427 commit f9a79c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/unit/unit_QMP6988.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,11 @@ bool UnitQMP6988::begin()
return false;
}


if (!softReset()) {
M5_LIB_LOGE("Failed to reset");
return false;
}

if (!read_calibration(_calibration)) {
M5_LIB_LOGE("Failed to read_calibration");
return false;
Expand Down Expand Up @@ -517,8 +516,8 @@ bool UnitQMP6988::softReset()
auto ret = writeRegister8(SOFT_RESET, v);
M5_LIB_LOGD("Reset causes a NO ACK or timeout error, but ignore it");
(void)ret;
m5::utility::delay(10); // Need delay
if(writeRegister(SOFT_RESET, 0x00)){
m5::utility::delay(10); // Need delay
if (writeRegister(SOFT_RESET, 0x00)) {
_periodic = false;
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/unit/unit_QMP6988.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ enum class PowerMode : uint8_t {
/*!
@enum Oversampling
@brief Oversampling value
@warning
@warning
*/
enum class Oversampling : uint8_t {
Skipped, //!< Skipped (No measurements are performed)
Expand Down
2 changes: 1 addition & 1 deletion src/unit/unit_SHT40.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class UnitSHT40 : public Component, public PeriodicMeasurementAdapter<UnitSHT40,
bool read_measurement(sht40::Data& d);
void reset_status();
bool soft_reset();

M5_UNIT_COMPONENT_PERIODIC_MEASUREMENT_ADAPTER_HPP_BUILDER(UnitSHT40, sht40::Data);

protected:
Expand Down

0 comments on commit f9a79c7

Please sign in to comment.