@@ -103,7 +103,7 @@ def list_device_names(class_path, name_pattern, **kwargs):
103103 name_pattern: pattern that device name should match.
104104 For example, 'sensor*' or 'motor*'. Default value: '*'.
105105 keyword arguments: used for matching the corresponding device
106- attributes. For example, port_name ='outA', or
106+ attributes. For example, address ='outA', or
107107 driver_name=['lego-ev3-us', 'lego-nxt-us']. When argument value
108108 is a list, then a match against any entry of the list is
109109 enough.
@@ -245,7 +245,7 @@ def list_devices(class_name, name_pattern, **kwargs):
245245 name_pattern: pattern that device name should match.
246246 For example, 'sensor*' or 'motor*'. Default value: '*'.
247247 keyword arguments: used for matching the corresponding device
248- attributes. For example, port_name ='outA', or
248+ attributes. For example, address ='outA', or
249249 driver_name=['lego-ev3-us', 'lego-nxt-us']. When argument value
250250 is a list, then a match against any entry of the list is
251251 enough.
@@ -270,7 +270,7 @@ class Motor(Device):
270270 SYSTEM_DEVICE_NAME_CONVENTION = 'motor*'
271271
272272 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 :
274274 kwargs ['address' ] = address
275275 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , ** kwargs )
276276
@@ -750,7 +750,7 @@ def list_motors(name_pattern=Motor.SYSTEM_DEVICE_NAME_CONVENTION, **kwargs):
750750 For example, 'sensor*' or 'motor*'. Default value: '*'.
751751 keyword arguments: used for matching the corresponding device
752752 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
754754 is a list, then a match against any entry of the list is
755755 enough.
756756 """
@@ -772,7 +772,7 @@ class LargeMotor(Motor):
772772 SYSTEM_DEVICE_NAME_CONVENTION = Motor .SYSTEM_DEVICE_NAME_CONVENTION
773773
774774 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 :
776776 kwargs ['address' ] = address
777777 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-ev3-l-motor' ], ** kwargs )
778778
@@ -790,7 +790,7 @@ class MediumMotor(Motor):
790790 SYSTEM_DEVICE_NAME_CONVENTION = Motor .SYSTEM_DEVICE_NAME_CONVENTION
791791
792792 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 :
794794 kwargs ['address' ] = address
795795 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-ev3-m-motor' ], ** kwargs )
796796
@@ -810,7 +810,7 @@ class DcMotor(Device):
810810 SYSTEM_DEVICE_NAME_CONVENTION = 'motor*'
811811
812812 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 :
814814 kwargs ['address' ] = address
815815 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , ** kwargs )
816816
@@ -1045,7 +1045,7 @@ class ServoMotor(Device):
10451045 SYSTEM_DEVICE_NAME_CONVENTION = 'motor*'
10461046
10471047 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 :
10491049 kwargs ['address' ] = address
10501050 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , ** kwargs )
10511051
@@ -1245,7 +1245,7 @@ class Sensor(Device):
12451245 SYSTEM_DEVICE_NAME_CONVENTION = 'sensor*'
12461246
12471247 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 :
12491249 kwargs ['address' ] = address
12501250 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , ** kwargs )
12511251
@@ -1411,7 +1411,7 @@ class I2cSensor(Sensor):
14111411 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
14121412
14131413 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 :
14151415 kwargs ['address' ] = address
14161416 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['nxt-i2c-sensor' ], ** kwargs )
14171417
@@ -1455,7 +1455,7 @@ class ColorSensor(Sensor):
14551455 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
14561456
14571457 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 :
14591459 kwargs ['address' ] = address
14601460 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-ev3-color' ], ** kwargs )
14611461
@@ -1492,7 +1492,7 @@ class UltrasonicSensor(Sensor):
14921492 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
14931493
14941494 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 :
14961496 kwargs ['address' ] = address
14971497 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-ev3-us' , 'lego-nxt-us' ], ** kwargs )
14981498
@@ -1529,7 +1529,7 @@ class GyroSensor(Sensor):
15291529 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
15301530
15311531 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 :
15331533 kwargs ['address' ] = address
15341534 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-ev3-gyro' ], ** kwargs )
15351535
@@ -1566,7 +1566,7 @@ class InfraredSensor(Sensor):
15661566 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
15671567
15681568 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 :
15701570 kwargs ['address' ] = address
15711571 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-ev3-ir' ], ** kwargs )
15721572
@@ -1603,7 +1603,7 @@ class SoundSensor(Sensor):
16031603 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
16041604
16051605 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 :
16071607 kwargs ['address' ] = address
16081608 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-nxt-sound' ], ** kwargs )
16091609
@@ -1631,7 +1631,7 @@ class LightSensor(Sensor):
16311631 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
16321632
16331633 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 :
16351635 kwargs ['address' ] = address
16361636 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-nxt-light' ], ** kwargs )
16371637
@@ -1659,7 +1659,7 @@ class TouchSensor(Sensor):
16591659 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
16601660
16611661 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 :
16631663 kwargs ['address' ] = address
16641664 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , driver_name = ['lego-ev3-touch' , 'lego-nxt-touch' ], ** kwargs )
16651665
@@ -1679,7 +1679,7 @@ class Led(Device):
16791679 SYSTEM_DEVICE_NAME_CONVENTION = '*'
16801680
16811681 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 :
16831683 kwargs ['address' ] = address
16841684 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , ** kwargs )
16851685
@@ -1978,7 +1978,7 @@ class PowerSupply(Device):
19781978 SYSTEM_DEVICE_NAME_CONVENTION = '*'
19791979
19801980 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 :
19821982 kwargs ['address' ] = address
19831983 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , ** kwargs )
19841984
@@ -2078,7 +2078,7 @@ class LegoPort(Device):
20782078 SYSTEM_DEVICE_NAME_CONVENTION = '*'
20792079
20802080 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 :
20822082 kwargs ['address' ] = address
20832083 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name_pattern , name_exact , ** kwargs )
20842084
0 commit comments