We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2da6774 commit c8b90d3Copy full SHA for c8b90d3
ev3dev/ev3dev.py
@@ -1149,14 +1149,14 @@ def units(self):
1149
1150
#~autogen
1151
1152
- def value(self, n):
+ def value(self, n=0):
1153
if True == isinstance( n, numbers.Integral ):
1154
n = '{0:d}'.format( n )
1155
elif True == isinstance( n, numbers.Real ):
1156
n = '{0:.0f}'.format( n )
1157
1158
if True == isinstance( n, str ):
1159
- return self._device._get_int_attribute( 'value'+n, 'value'+n )
+ return self.get_attr_int( 'value'+n )
1160
else:
1161
return 0
1162
0 commit comments