Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ev3dev2/motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,7 @@ def off(self, brake=True):

class MoveSteering(MoveTank):
"""
Controls a pair of motors simultaneously, via a single "steering" value.
Controls a pair of motors simultaneously, via a single "steering" value and a speed.
steering [-100, 100]:
* -100 means turn left on the spot (right motor at 100% forward, left motor at 100% backward),
Expand Down Expand Up @@ -1881,7 +1881,8 @@ def on_for_seconds(self, steering, speed, seconds, brake=True, block=True):

def on(self, steering, speed):
"""
Start rotating the motors according to the provided ``steering`` forever.
Start rotating the motors according to the provided ``steering`` and
``speed`` forever.
"""
(left_speed, right_speed) = self.get_speed_steering(steering, speed)
MoveTank.on(self, SpeedNativeUnits(left_speed), SpeedNativeUnits(right_speed))
Expand Down
14 changes: 8 additions & 6 deletions ev3dev2/sensor/lego.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ def __init__(self, address=None, name_pattern=SYSTEM_DEVICE_NAME_CONVENTION, nam
@property
def reflected_light_intensity(self):
"""
Reflected light intensity as a percentage. Light on sensor is red.
Reflected light intensity as a percentage (0 to 100). Light on sensor is red.
"""
self._ensure_mode(self.MODE_COL_REFLECT)
return self.value(0)

@property
def ambient_light_intensity(self):
"""
Ambient light intensity. Light on sensor is dimly lit blue.
Ambient light intensity, as a percentage (0 to 100). Light on sensor is dimly lit blue.
"""
self._ensure_mode(self.MODE_COL_AMBIENT)
return self.value(0)
Expand Down Expand Up @@ -219,10 +219,12 @@ def color_name(self):
@property
def raw(self):
"""
Red, green, and blue components of the detected color, officially in the
range 0-1020 but the values returned will never be that high. We do not
yet know why the values returned are low, but pointing the color sensor
at a well lit sheet of white paper will return values in the 250-400 range.
Red, green, and blue components of the detected color, as a tuple.
Officially in the range 0-1020 but the values returned will never be
that high. We do not yet know why the values returned are low, but
pointing the color sensor at a well lit sheet of white paper will return
values in the 250-400 range.
If this is an issue, check out the rgb() and calibrate_white() methods.
"""
Expand Down