Skip to content

Commit e832a0d

Browse files
committed
mod: better color standard calibration
1 parent e858d83 commit e832a0d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

arduino_alvik/arduino_alvik.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -914,9 +914,9 @@ def hsv2label(h, s, v) -> str:
914914
label = 'GREEN'
915915
elif 170 <= h < 210:
916916
label = 'LIGHT BLUE'
917-
elif 210 <= h < 260:
917+
elif 210 <= h < 250:
918918
label = 'BLUE'
919-
elif 260 <= h < 280:
919+
elif 250 <= h < 280:
920920
label = 'VIOLET'
921921
else: # h<20 or h>=280 is more problematic
922922
if v < 0.5 and s < 0.45:

arduino_alvik/constants.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
# COLOR SENSOR
33
COLOR_FULL_SCALE = 4097
4-
WHITE_CAL = [444, 342, 345]
5-
BLACK_CAL = [153, 135, 123]
4+
WHITE_CAL = [450, 500, 510]
5+
BLACK_CAL = [160, 200, 190]

0 commit comments

Comments
 (0)