Skip to content

Commit 0e3cedc

Browse files
committed
Merge pull request #134 from ddemidov/issue-133
Document Sensor.value function
2 parents 0acd575 + e01bac6 commit 0e3cedc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ev3dev/core.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,12 @@ def units(self):
13411341
# ~autogen
13421342

13431343
def value(self, n=0):
1344+
"""
1345+
Returns the value or values measured by the sensor. Check num_values to
1346+
see how many values there are. Values with N >= num_values will return
1347+
an error. The values are fixed point numbers, so check decimals to see
1348+
if you need to divide to get the actual value.
1349+
"""
13441350
if isinstance(n, numbers.Integral):
13451351
n = '{0:d}'.format(n)
13461352
elif isinstance(n, numbers.Real):

0 commit comments

Comments
 (0)