Skip to content

Commit

Permalink
api/pupdevices: update illuminate argument
Browse files Browse the repository at this point in the history
match the implementation and simplify description
  • Loading branch information
laurensvalk committed May 27, 2020
1 parent 9051770 commit e3c3813
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions pybricks/pupdevices.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,13 @@ def __init__(self, port):
"""
pass

def color(self, illuminate=True):
def color(self, surface=True):
"""Scans the color of a surface or an external light source.
Arguments:
illuminate (bool): Choose ``true`` to keep the sensor light on.
This is useful to scan the color of objects and surfaces.
Choose ``false`` to turn the sensor light off. This is useful
to scan the color of a light source or screen.
surface (bool): Choose ``true`` to scan the color of objects
and surfaces. Choose ``false`` to scan the color of
screens and other external light sources.
:returns:
Detected color.
Expand Down Expand Up @@ -194,15 +193,14 @@ def color_map(self, hues, saturation, values):
"""
pass

def hsv(self, illuminate=True):
def hsv(self, surface=True):
"""Scans the hue, saturation and brightness value of a
surface or an external light source.
Arguments:
illuminate (bool): Choose ``true`` to keep the sensor light on.
This is useful to scan the color of objects and surfaces.
Choose ``false`` to turn the sensor light off. This is useful
to scan the color of a light source or screen.
surface (bool): Choose ``true`` to scan the color of objects
and surfaces. Choose ``false`` to scan the color of
screens and other external light sources.
:returns: Tuple with the hue, saturation, and value
(brightness) of the color.
Expand Down

0 comments on commit e3c3813

Please sign in to comment.