Skip to content

Commit 8b96244

Browse files
committed
removed '*' copy error.
1 parent 57fe95c commit 8b96244

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

DHT.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ float DHT::readTemperature(bool S, bool force) {
4141
case DHT11:
4242
f = data[2];
4343
if (data[3] & 0x80) {
44-
f *= -1 -f ;
44+
f = -1 - f ;
4545
}
4646
f += (data[3] & 0x0f) * 0.1;
4747
if(S) {
@@ -164,11 +164,11 @@ bool DHT::read(bool force) {
164164
pinMode(_pin, OUTPUT);
165165
digitalWrite(_pin, LOW);
166166
switch(_type) {
167-
case DHT22:
168-
case DHT21:
167+
case DHT22:
168+
case DHT21:
169169
delayMicroseconds(1100); // data sheet says "at least 1ms"
170170
break;
171-
case DHT11:
171+
case DHT11:
172172
default:
173173
delay(20); //data sheet says at least 18ms, 20ms just to be safe
174174
break;

0 commit comments

Comments
 (0)