@@ -103,7 +103,7 @@ def list_device_names(class_path, name_pattern, **kwargs):
103
103
name_pattern: pattern that device name should match.
104
104
For example, 'sensor*' or 'motor*'. Default value: '*'.
105
105
keyword arguments: used for matching the corresponding device
106
- attributes. For example, port_name ='outA', or
106
+ attributes. For example, address ='outA', or
107
107
driver_name=['lego-ev3-us', 'lego-nxt-us']. When argument value
108
108
is a list, then a match against any entry of the list is
109
109
enough.
@@ -245,7 +245,7 @@ def list_devices(class_name, name_pattern, **kwargs):
245
245
name_pattern: pattern that device name should match.
246
246
For example, 'sensor*' or 'motor*'. Default value: '*'.
247
247
keyword arguments: used for matching the corresponding device
248
- attributes. For example, port_name ='outA', or
248
+ attributes. For example, address ='outA', or
249
249
driver_name=['lego-ev3-us', 'lego-nxt-us']. When argument value
250
250
is a list, then a match against any entry of the list is
251
251
enough.
@@ -270,7 +270,7 @@ class Motor(Device):
270
270
SYSTEM_DEVICE_NAME_CONVENTION = 'motor*'
271
271
272
272
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
273
- if port is not None :
273
+ if address is not None :
274
274
kwargs ['address' ] = address
275
275
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , ** kwargs )
276
276
@@ -750,7 +750,7 @@ def list_motors(name_pattern=Motor.SYSTEM_DEVICE_NAME_CONVENTION, **kwargs):
750
750
For example, 'sensor*' or 'motor*'. Default value: '*'.
751
751
keyword arguments: used for matching the corresponding device
752
752
attributes. For example, driver_name='lego-ev3-l-motor', or
753
- port_name =['outB', 'outC']. When argument value
753
+ address =['outB', 'outC']. When argument value
754
754
is a list, then a match against any entry of the list is
755
755
enough.
756
756
"""
@@ -772,7 +772,7 @@ class LargeMotor(Motor):
772
772
SYSTEM_DEVICE_NAME_CONVENTION = Motor .SYSTEM_DEVICE_NAME_CONVENTION
773
773
774
774
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
775
- if port is not None :
775
+ if address is not None :
776
776
kwargs ['address' ] = address
777
777
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-ev3-l-motor' ], ** kwargs )
778
778
@@ -790,7 +790,7 @@ class MediumMotor(Motor):
790
790
SYSTEM_DEVICE_NAME_CONVENTION = Motor .SYSTEM_DEVICE_NAME_CONVENTION
791
791
792
792
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
793
- if port is not None :
793
+ if address is not None :
794
794
kwargs ['address' ] = address
795
795
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-ev3-m-motor' ], ** kwargs )
796
796
@@ -810,7 +810,7 @@ class DcMotor(Device):
810
810
SYSTEM_DEVICE_NAME_CONVENTION = 'motor*'
811
811
812
812
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
813
- if port is not None :
813
+ if address is not None :
814
814
kwargs ['address' ] = address
815
815
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , ** kwargs )
816
816
@@ -1045,7 +1045,7 @@ class ServoMotor(Device):
1045
1045
SYSTEM_DEVICE_NAME_CONVENTION = 'motor*'
1046
1046
1047
1047
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
1048
- if port is not None :
1048
+ if address is not None :
1049
1049
kwargs ['address' ] = address
1050
1050
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , ** kwargs )
1051
1051
@@ -1245,7 +1245,7 @@ class Sensor(Device):
1245
1245
SYSTEM_DEVICE_NAME_CONVENTION = 'sensor*'
1246
1246
1247
1247
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
1248
- if port is not None :
1248
+ if address is not None :
1249
1249
kwargs ['address' ] = address
1250
1250
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , ** kwargs )
1251
1251
@@ -1411,7 +1411,7 @@ class I2cSensor(Sensor):
1411
1411
SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
1412
1412
1413
1413
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
1414
- if port is not None :
1414
+ if address is not None :
1415
1415
kwargs ['address' ] = address
1416
1416
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['nxt-i2c-sensor' ], ** kwargs )
1417
1417
@@ -1455,7 +1455,7 @@ class ColorSensor(Sensor):
1455
1455
SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
1456
1456
1457
1457
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
1458
- if port is not None :
1458
+ if address is not None :
1459
1459
kwargs ['address' ] = address
1460
1460
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-ev3-color' ], ** kwargs )
1461
1461
@@ -1492,7 +1492,7 @@ class UltrasonicSensor(Sensor):
1492
1492
SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
1493
1493
1494
1494
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
1495
- if port is not None :
1495
+ if address is not None :
1496
1496
kwargs ['address' ] = address
1497
1497
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-ev3-us' , 'lego-nxt-us' ], ** kwargs )
1498
1498
@@ -1529,7 +1529,7 @@ class GyroSensor(Sensor):
1529
1529
SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
1530
1530
1531
1531
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
1532
- if port is not None :
1532
+ if address is not None :
1533
1533
kwargs ['address' ] = address
1534
1534
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-ev3-gyro' ], ** kwargs )
1535
1535
@@ -1566,7 +1566,7 @@ class InfraredSensor(Sensor):
1566
1566
SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
1567
1567
1568
1568
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
1569
- if port is not None :
1569
+ if address is not None :
1570
1570
kwargs ['address' ] = address
1571
1571
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-ev3-ir' ], ** kwargs )
1572
1572
@@ -1603,7 +1603,7 @@ class SoundSensor(Sensor):
1603
1603
SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
1604
1604
1605
1605
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
1606
- if port is not None :
1606
+ if address is not None :
1607
1607
kwargs ['address' ] = address
1608
1608
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-nxt-sound' ], ** kwargs )
1609
1609
@@ -1631,7 +1631,7 @@ class LightSensor(Sensor):
1631
1631
SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
1632
1632
1633
1633
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
1634
- if port is not None :
1634
+ if address is not None :
1635
1635
kwargs ['address' ] = address
1636
1636
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-nxt-light' ], ** kwargs )
1637
1637
@@ -1659,7 +1659,7 @@ class TouchSensor(Sensor):
1659
1659
SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
1660
1660
1661
1661
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
1662
- if port is not None :
1662
+ if address is not None :
1663
1663
kwargs ['address' ] = address
1664
1664
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-ev3-touch' , 'lego-nxt-touch' ], ** kwargs )
1665
1665
@@ -1679,7 +1679,7 @@ class Led(Device):
1679
1679
SYSTEM_DEVICE_NAME_CONVENTION = '*'
1680
1680
1681
1681
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
1682
- if port is not None :
1682
+ if address is not None :
1683
1683
kwargs ['address' ] = address
1684
1684
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , ** kwargs )
1685
1685
@@ -1978,7 +1978,7 @@ class PowerSupply(Device):
1978
1978
SYSTEM_DEVICE_NAME_CONVENTION = '*'
1979
1979
1980
1980
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
1981
- if port is not None :
1981
+ if address is not None :
1982
1982
kwargs ['address' ] = address
1983
1983
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , ** kwargs )
1984
1984
@@ -2078,7 +2078,7 @@ class LegoPort(Device):
2078
2078
SYSTEM_DEVICE_NAME_CONVENTION = '*'
2079
2079
2080
2080
def __init__ (self , address = None , name_pattern = SYSTEM_DEVICE_NAME_CONVENTION , name_exact = False , ** kwargs ):
2081
- if port is not None :
2081
+ if address is not None :
2082
2082
kwargs ['address' ] = address
2083
2083
Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , ** kwargs )
2084
2084
0 commit comments