Skip to content

Commit

Permalink
correct placing readData in correct function
Browse files Browse the repository at this point in the history
  • Loading branch information
hasenradball committed Apr 25, 2024
1 parent cf76136 commit 74c0df0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/AM2302-Sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ int8_t AM2302::AM2302_Sensor::read() {
return status;
}
else if (status == AM2302_ERROR_TIMEOUT) {
// reset Temperature and Humidity
resetData();
return status;
}
else if (status == AM2302_ERROR_CHECKSUM) {
// not clear now
// notthing to do

Check failure on line 64 in src/AM2302-Sensor.cpp

View workflow job for this annotation

GitHub Actions / spellcheck

notthing ==> nothing
return status;
}
}
Expand Down Expand Up @@ -219,7 +219,6 @@ const char * AM2302::AM2302_Sensor::get_sensorState(int8_t state) const {
return AM2302_STATE_ERR_CKSUM;
}
else if(state == AM2302_ERROR_TIMEOUT) {
resetData();
return AM2302_STATE_ERR_TIMEOUT;
}
else if(state == AM2302_ERROR_READ_FREQ) {
Expand Down

0 comments on commit 74c0df0

Please sign in to comment.