Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

Commit 0c1bb48

Browse files
committedMar 23, 2015
Fix casing with divide by 0 check.
1 parent 42cf3c9 commit 0c1bb48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎Adafruit_TCS34725/Adafruit_TCS34725.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def calculateColorTemperature(rgb):
197197
Z = (-0.68202 * rgb['r']) + (0.77073 * rgb['g']) + ( 0.56332 * rgb['b'])
198198

199199
# Check for divide by 0 (total darkness) and return None.
200-
if (x + y + z) == 0:
200+
if (X + Y + Z) == 0:
201201
return None
202202

203203
# 2. Calculate the chromaticity co-ordinates

0 commit comments

Comments
 (0)