Skip to content

Commit 517f6e6

Browse files
authored
Minor docs wording improvements (ev3dev#530)
1 parent 49b48e8 commit 517f6e6

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

‎ev3dev2/motor.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,7 +1837,7 @@ def off(self, brake=True):
18371837

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

18821882
def on(self, steering, speed):
18831883
"""
1884-
Start rotating the motors according to the provided ``steering`` forever.
1884+
Start rotating the motors according to the provided ``steering`` and
1885+
``speed`` forever.
18851886
"""
18861887
(left_speed, right_speed) = self.get_speed_steering(steering, speed)
18871888
MoveTank.on(self, SpeedNativeUnits(left_speed), SpeedNativeUnits(right_speed))

‎ev3dev2/sensor/lego.py‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,15 @@ def __init__(self, address=None, name_pattern=SYSTEM_DEVICE_NAME_CONVENTION, nam
180180
@property
181181
def reflected_light_intensity(self):
182182
"""
183-
Reflected light intensity as a percentage. Light on sensor is red.
183+
Reflected light intensity as a percentage (0 to 100). Light on sensor is red.
184184
"""
185185
self._ensure_mode(self.MODE_COL_REFLECT)
186186
return self.value(0)
187187

188188
@property
189189
def ambient_light_intensity(self):
190190
"""
191-
Ambient light intensity. Light on sensor is dimly lit blue.
191+
Ambient light intensity, as a percentage (0 to 100). Light on sensor is dimly lit blue.
192192
"""
193193
self._ensure_mode(self.MODE_COL_AMBIENT)
194194
return self.value(0)
@@ -219,10 +219,12 @@ def color_name(self):
219219
@property
220220
def raw(self):
221221
"""
222-
Red, green, and blue components of the detected color, officially in the
223-
range 0-1020 but the values returned will never be that high. We do not
224-
yet know why the values returned are low, but pointing the color sensor
225-
at a well lit sheet of white paper will return values in the 250-400 range.
222+
Red, green, and blue components of the detected color, as a tuple.
223+
224+
Officially in the range 0-1020 but the values returned will never be
225+
that high. We do not yet know why the values returned are low, but
226+
pointing the color sensor at a well lit sheet of white paper will return
227+
values in the 250-400 range.
226228
227229
If this is an issue, check out the rgb() and calibrate_white() methods.
228230
"""

0 commit comments

Comments
 (0)