{"action":"created","issue":{"url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/issues/227","repository_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python","labels_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/issues/227/labels{/name}","comments_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/issues/227/comments","events_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/issues/227/events","html_url":"https://github.com/rhempel/ev3dev-lang-python/issues/227","id":181298661,"number":227,"title":"correct way to specify driver for LargeMotor?","user":{"login":"dwalton76","id":468309,"avatar_url":"https://avatars.githubusercontent.com/u/468309?v=3","gravatar_id":"","url":"https://api.github.com/users/dwalton76","html_url":"https://github.com/dwalton76","followers_url":"https://api.github.com/users/dwalton76/followers","following_url":"https://api.github.com/users/dwalton76/following{/other_user}","gists_url":"https://api.github.com/users/dwalton76/gists{/gist_id}","starred_url":"https://api.github.com/users/dwalton76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwalton76/subscriptions","organizations_url":"https://api.github.com/users/dwalton76/orgs","repos_url":"https://api.github.com/users/dwalton76/repos","events_url":"https://api.github.com/users/dwalton76/events{/privacy}","received_events_url":"https://api.github.com/users/dwalton76/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dwalton76","id":468309,"avatar_url":"https://avatars.githubusercontent.com/u/468309?v=3","gravatar_id":"","url":"https://api.github.com/users/dwalton76","html_url":"https://github.com/dwalton76","followers_url":"https://api.github.com/users/dwalton76/followers","following_url":"https://api.github.com/users/dwalton76/following{/other_user}","gists_url":"https://api.github.com/users/dwalton76/gists{/gist_id}","starred_url":"https://api.github.com/users/dwalton76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwalton76/subscriptions","organizations_url":"https://api.github.com/users/dwalton76/orgs","repos_url":"https://api.github.com/users/dwalton76/repos","events_url":"https://api.github.com/users/dwalton76/events{/privacy}","received_events_url":"https://api.github.com/users/dwalton76/received_events","type":"User","site_admin":false},"assignees":[{"login":"dwalton76","id":468309,"avatar_url":"https://avatars.githubusercontent.com/u/468309?v=3","gravatar_id":"","url":"https://api.github.com/users/dwalton76","html_url":"https://github.com/dwalton76","followers_url":"https://api.github.com/users/dwalton76/followers","following_url":"https://api.github.com/users/dwalton76/following{/other_user}","gists_url":"https://api.github.com/users/dwalton76/gists{/gist_id}","starred_url":"https://api.github.com/users/dwalton76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwalton76/subscriptions","organizations_url":"https://api.github.com/users/dwalton76/orgs","repos_url":"https://api.github.com/users/dwalton76/repos","events_url":"https://api.github.com/users/dwalton76/events{/privacy}","received_events_url":"https://api.github.com/users/dwalton76/received_events","type":"User","site_admin":false}],"milestone":null,"comments":13,"created_at":"2016-10-06T00:30:57Z","updated_at":"2016-10-06T13:16:56Z","closed_at":null,"body":"In core.py we have\r\n```\r\nclass LargeMotor(Motor):\r\n\r\n    \"\"\"  \r\n    EV3 large servo motor\r\n    \"\"\"\r\n\r\n    SYSTEM_CLASS_NAME = Motor.SYSTEM_CLASS_NAME\r\n    SYSTEM_DEVICE_NAME_CONVENTION = '*'\r\n\r\n    def __init__(self, address=None, name_pattern=SYSTEM_DEVICE_NAME_CONVENTION, name_exact=False, **kwargs):\r\n\r\n        super(LargeMotor, self).__init__(address, name_pattern, name_exact, driver_name=['lego-ev3-l-motor'], **kwargs)\r\n\r\n```\r\ndriver_name set to 'lego-ev3-l-motor' and driver_name is not accepted by LargeMotor.__init__.  How does one overwrite the driver_name?  You cannot pass it via kwargs, if you do python barfs because we've passed driver_name twice to Motor.__init__.  I need to set it to 'lego-nxt-motor' for my BrickPi.\r\n\r\nFor now I am doing\r\n```\r\ndiff --git a/ev3dev/brickpi.py b/ev3dev/brickpi.py\r\nindex 1df0483..cea56f2 100644\r\n--- a/ev3dev/brickpi.py\r\n+++ b/ev3dev/brickpi.py\r\n@@ -93,3 +93,16 @@ class Leds(object):\r\n \r\n \r\n # ~autogen\r\n+\r\n+\r\n+class LargeMotor(Motor):\r\n+    \"\"\"\r\n+    EV3 large servo motor\r\n+    \"\"\"\r\n+\r\n+    SYSTEM_CLASS_NAME = Motor.SYSTEM_CLASS_NAME\r\n+    SYSTEM_DEVICE_NAME_CONVENTION = '*'\r\n+\r\n+    def __init__(self, address=None, name_pattern=SYSTEM_DEVICE_NAME_CONVENTION, name_exact=False, **kwargs):\r\n+\r\n+        super(LargeMotor, self).__init__(address, name_pattern, name_exact, driver_name=['lego-nxt-motor'], **kwargs)\r\n```\r\n\r\nbut it feels like there has to be a better way that I am missing."},"comment":{"url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/issues/comments/251958347","html_url":"https://github.com/rhempel/ev3dev-lang-python/issues/227#issuecomment-251958347","issue_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/issues/227","id":251958347,"user":{"login":"WasabiFan","id":3310349,"avatar_url":"https://avatars.githubusercontent.com/u/3310349?v=3","gravatar_id":"","url":"https://api.github.com/users/WasabiFan","html_url":"https://github.com/WasabiFan","followers_url":"https://api.github.com/users/WasabiFan/followers","following_url":"https://api.github.com/users/WasabiFan/following{/other_user}","gists_url":"https://api.github.com/users/WasabiFan/gists{/gist_id}","starred_url":"https://api.github.com/users/WasabiFan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WasabiFan/subscriptions","organizations_url":"https://api.github.com/users/WasabiFan/orgs","repos_url":"https://api.github.com/users/WasabiFan/repos","events_url":"https://api.github.com/users/WasabiFan/events{/privacy}","received_events_url":"https://api.github.com/users/WasabiFan/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T13:16:56Z","updated_at":"2016-10-06T13:16:56Z","body":"I think I am going to open an issue to discuss if we actually want to keep that extra class. Right now though, this issue can be closed I think.\r\n\r\n@dwalton76 No, I've never used a BrickPi or any of the other extension boards... Just the EV3. Although I do have some RasPis and a BeagleBone Black."}}
{"actor":{"display_login":"WasabiFan"}}