@@ -212,9 +212,9 @@ class Motor(Device):
212212 SYSTEM_CLASS_NAME = 'tacho-motor'
213213 SYSTEM_DEVICE_NAME_CONVENTION = 'motor*'
214214
215- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
216- if port is not None :
217- kwargs ['address' ] = port
215+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
216+ if address is not None :
217+ kwargs ['address' ] = address
218218 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , ** kwargs )
219219
220220
@@ -693,9 +693,9 @@ class LargeMotor(Motor):
693693 SYSTEM_CLASS_NAME = Motor .SYSTEM_CLASS_NAME
694694 SYSTEM_DEVICE_NAME_CONVENTION = Motor .SYSTEM_DEVICE_NAME_CONVENTION
695695
696- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
697- if port is not None :
698- kwargs ['address' ] = port
696+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
697+ if address is not None :
698+ kwargs ['address' ] = address
699699 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , driver_name = ['lego-ev3-l-motor' ], ** kwargs )
700700
701701
@@ -711,9 +711,9 @@ class MediumMotor(Motor):
711711 SYSTEM_CLASS_NAME = Motor .SYSTEM_CLASS_NAME
712712 SYSTEM_DEVICE_NAME_CONVENTION = Motor .SYSTEM_DEVICE_NAME_CONVENTION
713713
714- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
715- if port is not None :
716- kwargs ['address' ] = port
714+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
715+ if address is not None :
716+ kwargs ['address' ] = address
717717 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , driver_name = ['lego-ev3-m-motor' ], ** kwargs )
718718
719719
@@ -731,9 +731,9 @@ class DcMotor(Device):
731731 SYSTEM_CLASS_NAME = 'dc-motor'
732732 SYSTEM_DEVICE_NAME_CONVENTION = 'motor*'
733733
734- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
735- if port is not None :
736- kwargs ['address' ] = port
734+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
735+ if address is not None :
736+ kwargs ['address' ] = address
737737 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , ** kwargs )
738738
739739
@@ -966,9 +966,9 @@ class ServoMotor(Device):
966966 SYSTEM_CLASS_NAME = 'servo-motor'
967967 SYSTEM_DEVICE_NAME_CONVENTION = 'motor*'
968968
969- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
970- if port is not None :
971- kwargs ['address' ] = port
969+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
970+ if address is not None :
971+ kwargs ['address' ] = address
972972 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , ** kwargs )
973973
974974
@@ -1166,9 +1166,9 @@ class Sensor(Device):
11661166 SYSTEM_CLASS_NAME = 'lego-sensor'
11671167 SYSTEM_DEVICE_NAME_CONVENTION = 'sensor*'
11681168
1169- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1170- if port is not None :
1171- kwargs ['address' ] = port
1169+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1170+ if address is not None :
1171+ kwargs ['address' ] = address
11721172 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , ** kwargs )
11731173
11741174
@@ -1332,9 +1332,9 @@ class I2cSensor(Sensor):
13321332 SYSTEM_CLASS_NAME = Sensor .SYSTEM_CLASS_NAME
13331333 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
13341334
1335- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1336- if port is not None :
1337- kwargs ['address' ] = port
1335+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1336+ if address is not None :
1337+ kwargs ['address' ] = address
13381338 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , driver_name = ['nxt-i2c-sensor' ], ** kwargs )
13391339
13401340
@@ -1376,9 +1376,9 @@ class ColorSensor(Sensor):
13761376 SYSTEM_CLASS_NAME = Sensor .SYSTEM_CLASS_NAME
13771377 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
13781378
1379- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1380- if port is not None :
1381- kwargs ['address' ] = port
1379+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1380+ if address is not None :
1381+ kwargs ['address' ] = address
13821382 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , driver_name = ['lego-ev3-color' ], ** kwargs )
13831383
13841384
@@ -1413,9 +1413,9 @@ class UltrasonicSensor(Sensor):
14131413 SYSTEM_CLASS_NAME = Sensor .SYSTEM_CLASS_NAME
14141414 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
14151415
1416- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1417- if port is not None :
1418- kwargs ['address' ] = port
1416+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1417+ if address is not None :
1418+ kwargs ['address' ] = address
14191419 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , driver_name = ['lego-ev3-us' , 'lego-nxt-us' ], ** kwargs )
14201420
14211421
@@ -1450,9 +1450,9 @@ class GyroSensor(Sensor):
14501450 SYSTEM_CLASS_NAME = Sensor .SYSTEM_CLASS_NAME
14511451 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
14521452
1453- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1454- if port is not None :
1455- kwargs ['address' ] = port
1453+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1454+ if address is not None :
1455+ kwargs ['address' ] = address
14561456 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , driver_name = ['lego-ev3-gyro' ], ** kwargs )
14571457
14581458
@@ -1487,9 +1487,9 @@ class InfraredSensor(Sensor):
14871487 SYSTEM_CLASS_NAME = Sensor .SYSTEM_CLASS_NAME
14881488 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
14891489
1490- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1491- if port is not None :
1492- kwargs ['address' ] = port
1490+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1491+ if address is not None :
1492+ kwargs ['address' ] = address
14931493 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , driver_name = ['lego-ev3-ir' ], ** kwargs )
14941494
14951495
@@ -1524,9 +1524,9 @@ class SoundSensor(Sensor):
15241524 SYSTEM_CLASS_NAME = Sensor .SYSTEM_CLASS_NAME
15251525 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
15261526
1527- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1528- if port is not None :
1529- kwargs ['address' ] = port
1527+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1528+ if address is not None :
1529+ kwargs ['address' ] = address
15301530 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , driver_name = ['lego-nxt-sound' ], ** kwargs )
15311531
15321532
@@ -1552,9 +1552,9 @@ class LightSensor(Sensor):
15521552 SYSTEM_CLASS_NAME = Sensor .SYSTEM_CLASS_NAME
15531553 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
15541554
1555- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1556- if port is not None :
1557- kwargs ['address' ] = port
1555+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1556+ if address is not None :
1557+ kwargs ['address' ] = address
15581558 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , driver_name = ['lego-nxt-light' ], ** kwargs )
15591559
15601560
@@ -1580,9 +1580,9 @@ class TouchSensor(Sensor):
15801580 SYSTEM_CLASS_NAME = Sensor .SYSTEM_CLASS_NAME
15811581 SYSTEM_DEVICE_NAME_CONVENTION = Sensor .SYSTEM_DEVICE_NAME_CONVENTION
15821582
1583- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1584- if port is not None :
1585- kwargs ['address' ] = port
1583+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1584+ if address is not None :
1585+ kwargs ['address' ] = address
15861586 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , driver_name = ['lego-ev3-touch' , 'lego-nxt-touch' ], ** kwargs )
15871587
15881588
@@ -1600,9 +1600,9 @@ class Led(Device):
16001600 SYSTEM_CLASS_NAME = 'leds'
16011601 SYSTEM_DEVICE_NAME_CONVENTION = '*'
16021602
1603- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1604- if port is not None :
1605- kwargs ['address' ] = port
1603+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1604+ if address is not None :
1605+ kwargs ['address' ] = address
16061606 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , ** kwargs )
16071607
16081608
@@ -1899,9 +1899,9 @@ class PowerSupply(Device):
18991899 SYSTEM_CLASS_NAME = 'power_supply'
19001900 SYSTEM_DEVICE_NAME_CONVENTION = '*'
19011901
1902- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1903- if port is not None :
1904- kwargs ['address' ] = port
1902+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
1903+ if address is not None :
1904+ kwargs ['address' ] = address
19051905 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , ** kwargs )
19061906
19071907
@@ -1999,9 +1999,9 @@ class LegoPort(Device):
19991999 SYSTEM_CLASS_NAME = 'lego_port'
20002000 SYSTEM_DEVICE_NAME_CONVENTION = '*'
20012001
2002- def __init__ (self , port = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
2003- if port is not None :
2004- kwargs ['address' ] = port
2002+ def __init__ (self , address = None , name = SYSTEM_DEVICE_NAME_CONVENTION , ** kwargs ):
2003+ if address is not None :
2004+ kwargs ['address' ] = address
20052005 Device .__init__ (self , self .SYSTEM_CLASS_NAME , name , ** kwargs )
20062006
20072007
0 commit comments