Skip to content

Commit 08c10a6

Browse files
committed
Only return first element of array in get_distance()
1 parent 80c9717 commit 08c10a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

buildhat/colordistance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def get_distance(self):
122122
:rtype: int
123123
"""
124124
self.mode(6)
125-
distance = self.get()
125+
distance = self.get()[0]
126126
return distance
127127

128128
def _clamp(self, val, small, large):

0 commit comments

Comments
 (0)