Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Updated dependencies and build constraints (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommylans authored Feb 15, 2023
1 parent be44b9e commit 337ec2b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"periph.io/x/periph/host"
"periph.io/x/host/v3"
)

// HostInit calls periph.io host.Init(). This needs to be done before DHT can be used.
Expand Down
7 changes: 4 additions & 3 deletions dhtNotWindows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package dht
Expand All @@ -8,8 +9,8 @@ import (
"strings"
"time"

"periph.io/x/periph/conn/gpio"
"periph.io/x/periph/conn/gpio/gpioreg"
"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/gpio/gpioreg"
)

// NewDHT to create a new DHT struct.
Expand Down Expand Up @@ -142,7 +143,7 @@ func (dht *DHT) readBits() ([]int, error) {
if durations[i] > 70*time.Microsecond {
return nil, fmt.Errorf("missing some readings - low level duration too long: %v", durations[i])
}
// low should not be shorter then 35 microseconds
// low should not be shorter than 35 microseconds
if durations[i] < 35*time.Microsecond {
return nil, fmt.Errorf("missing some readings - low level duration too short: %v", durations[i])
}
Expand Down
1 change: 1 addition & 0 deletions dhtWindows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package dht
Expand Down
2 changes: 1 addition & 1 deletion globals.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dht
import (
"time"

"periph.io/x/periph/conn/gpio"
"periph.io/x/conn/v3/gpio"
)

// TemperatureUnit is the temperature unit wanted, either Celsius or Fahrenheit
Expand Down

0 comments on commit 337ec2b

Please sign in to comment.