Skip to content

Commit

Permalink
📝 Change Min/MaxInt64 to 32 bit
Browse files Browse the repository at this point in the history
  • Loading branch information
bonan committed Feb 11, 2018
1 parent 882bcb5 commit 8088a7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions device.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ func (h *HemtjanstDevice) lightSetting() *tradfri.LightSetting {

func (h *HemtjanstDevice) featureVal(feature string) (string, error) {
if h.isGroup {
min := math.MaxInt64
max := math.MinInt64
min := math.MaxInt32
max := math.MinInt32
var last string

for _, m := range h.members {
Expand Down Expand Up @@ -368,7 +368,7 @@ func (h *HemtjanstDevice) featureVal(feature string) (string, error) {
}
return "0", nil
case "brightness":
if max != math.MinInt64 {
if max != math.MinInt32 {
return strconv.Itoa(max), nil
}
return "0", nil
Expand Down

0 comments on commit 8088a7c

Please sign in to comment.