@@ -217,8 +217,8 @@ OUTPUT_D = "outD"
217217
218218Motor = class (Device )
219219
220- Motor .Large = " tacho "
221- Motor .Medium = " minitacho "
220+ Motor .Large = " lego-ev3-l-motor "
221+ Motor .Medium = " lego-ev3-m-motor "
222222
223223Motor .ModeOff = " off"
224224Motor .ModeOn = " on"
@@ -238,13 +238,13 @@ function Motor:init(port, motor_types)
238238 local m = { port_name = { port } }
239239
240240 if (motor_types ~= nil ) then
241- m [" type " ] = motor_types
241+ m [" driver_name " ] = motor_types
242242 end
243243
244244 Device .init (self , " tacho-motor" , " motor" , m )
245245
246246 if (self :connected ()) then
247- self ._type = self :getAttrString (" type " )
247+ self ._type = self :getAttrString (" driver_name " )
248248 self ._port = self :getAttrString (" port_name" )
249249 else
250250 self ._type = nil
463463LargeMotor = class (Motor )
464464
465465function LargeMotor :init (port )
466- Motor .init (self , port , { " tacho " } )
466+ Motor .init (self , port , { Motor . Large } )
467467end
468468
469469---- --------------------------------------------------------------------------
472472MediumMotor = class (Motor )
473473
474474function MediumMotor :init (port )
475- Motor .init (self , port , { " minitacho " } )
475+ Motor .init (self , port , { Motor . Medium } )
476476end
477477
478478---- --------------------------------------------------------------------------
0 commit comments