{"action":"created","comment":{"url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/pulls/comments/49265990","id":49265990,"diff_hunk":"@@ -0,0 +1,199 @@\n+Tacho Driver Update Proposal\n+============================\n+\n+The tacho drivers work in most cases, but they have some defects against them\n+\n+Addresses the following issues in:\n+\n+- [ ] [ev3dev/ev3dev#488](https://github.com/ev3dev/ev3dev/issues/488)\n+- [ ] [ev3dev/ev3dev#467](https://github.com/ev3dev/ev3dev/issues/467)\n+- [ ] [ev3dev/ev3dev#455](https://github.com/ev3dev/ev3dev/issues/455)\n+- [ ] [ev3dev/ev3dev#454](https://github.com/ev3dev/ev3dev/issues/454)\n+- [ ] [ev3dev/ev3dev#453](https://github.com/ev3dev/ev3dev/issues/453)\n+- [ ] [ev3dev/ev3dev#356](https://github.com/ev3dev/ev3dev/issues/356)\n+- [ ] [ev3dev/ev3dev#224](https://github.com/ev3dev/ev3dev/issues/224)\n+- [ ] [ev3dev/ev3dev#149](https://github.com/ev3dev/ev3dev/issues/149)\n+- [ ] [ev3dev/ev3dev#148](https://github.com/ev3dev/ev3dev/issues/148)\n+- [ ] [ev3dev/ev3dev#54](https://github.com/ev3dev/ev3dev/issues/54)\n+\n+Other tasks that need to be dealt with for this proposal:\n+\n+- [ ] Add LibreOffice Template for graphs - I'd like to make sure that we have\n+a consistent format for the diagrams so that when they need changes we're not\n+recreating them from scratch.\n+- [ ] Add pointers to spec.json here so that we have a consistent notation\n+for commands, functions, and mode. We may need to update `spec.json` so that\n+the operation is better specified there.\n+\n+In order to properly fix the issues, and add the `sync` feature that users have\n+been asking for, this document describes the operating modes and functions for\n+the tacho motors.\n+\n+The `tacho-motor` drivers must strike a balance between doing the most common\n+functions that a robot builder needs but not becoming so complex that the\n+operation is unreliable or mysterious.\n+\n+## The sys Interface\n+\n+All motor operations are contolled by writing data to attributes within the\n+`/sys/class/tacho-motor/motorN/` folder. There is one folder per motor.\n+\n+Some of the attributes are valid only during particular `run` modes - and with\n+that in mind, the read and write operations can have the following return codes:\n+\n+| RETURN CODE  | DESCRIPTION\n+| ------------ | -----------\n+| 0            | Operation sucessful\n+| ( -1) EPERM  | Operation not permitted (not the same as EACCESS!) \n+| (-13) EACCES | Permission denied\n+| (-13) EBUSY  | Device or resource busy\n+| (-22) EINVAL | Invalid argument\n+\n+The attributes operate as described in `spec.json` - with the following\n+caveats for the `speed_regulation` value:\n+\n+| `speed_regulation` | Write `duty_cycle_sp` | Write `speed_sp`\n+| ------------------ | --------------------- | ----------------\n+| `off`              | Works                 | Return EPERM\n+| `on`               | Return EPERM          | Works\n+\n+The `ramp_up_sp` and `ramp_down_sp` specify how long (in msec) the motor\n+will take to go from 0 to 100 of the controlling parameter depending on\n+the `speed_regulation` mode.\n+\n+| `speed_regulation` | Ramp control parameter\n+| ------------------ | ----------------------\n+| `off`              | 0 to 100% Duty Cycle                 \n+| `on`               | 0 to 100% Max Speed\n+\n+The maximum speed of the motor is set in the driver. The large motor has a\n+maximum speed of 1200 pulses per second and the medium motor has a maximum\n+speed of 900 pulses per second. Both motors have 360 pulses per revolution.\n+\n+## Ramping\n+\n+See `spec.json` for a description of the `ramp_up_sp` and `ramp_down_sp`\n+attributes. Except in `run-direct` mode, you cannot change the ramping\n+attributes while the motor is running.","path":"TACHO_DRIVER.md","position":77,"original_position":77,"commit_id":"7ba5f45fd9265a9183ebb57dedfe0c59453ff107","original_commit_id":"7ba5f45fd9265a9183ebb57dedfe0c59453ff107","user":{"login":"dlech","id":963645,"avatar_url":"https://avatars.githubusercontent.com/u/963645?v=3","gravatar_id":"","url":"https://api.github.com/users/dlech","html_url":"https://github.com/dlech","followers_url":"https://api.github.com/users/dlech/followers","following_url":"https://api.github.com/users/dlech/following{/other_user}","gists_url":"https://api.github.com/users/dlech/gists{/gist_id}","starred_url":"https://api.github.com/users/dlech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlech/subscriptions","organizations_url":"https://api.github.com/users/dlech/orgs","repos_url":"https://api.github.com/users/dlech/repos","events_url":"https://api.github.com/users/dlech/events{/privacy}","received_events_url":"https://api.github.com/users/dlech/received_events","type":"User","site_admin":false},"body":"You can change the attributes while running. The changes will not take effect until you issue a `run-*` command unless you are using `run-direct`, in which case they take effect immediately.","created_at":"2016-01-09T17:39:32Z","updated_at":"2016-01-09T17:39:32Z","html_url":"https://github.com/ev3dev/lego-linux-drivers/pull/23#discussion_r49265990","pull_request_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/ev3dev/lego-linux-drivers/pulls/comments/49265990"},"html":{"href":"https://github.com/ev3dev/lego-linux-drivers/pull/23#discussion_r49265990"},"pull_request":{"href":"https://api.github.com/repos/ev3dev/lego-linux-drivers/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/pulls/23","id":55545169,"html_url":"https://github.com/ev3dev/lego-linux-drivers/pull/23","diff_url":"https://github.com/ev3dev/lego-linux-drivers/pull/23.diff","patch_url":"https://github.com/ev3dev/lego-linux-drivers/pull/23.patch","issue_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/issues/23","number":23,"state":"open","locked":false,"title":"Tacho driver update","user":{"login":"rhempel","id":5571620,"avatar_url":"https://avatars.githubusercontent.com/u/5571620?v=3","gravatar_id":"","url":"https://api.github.com/users/rhempel","html_url":"https://github.com/rhempel","followers_url":"https://api.github.com/users/rhempel/followers","following_url":"https://api.github.com/users/rhempel/following{/other_user}","gists_url":"https://api.github.com/users/rhempel/gists{/gist_id}","starred_url":"https://api.github.com/users/rhempel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhempel/subscriptions","organizations_url":"https://api.github.com/users/rhempel/orgs","repos_url":"https://api.github.com/users/rhempel/repos","events_url":"https://api.github.com/users/rhempel/events{/privacy}","received_events_url":"https://api.github.com/users/rhempel/received_events","type":"User","site_admin":false},"body":"This PR is so we can comment on the proposal in TACHO_DRIVER.md\r\n\r\nThat file will me merged into other docs eventually, but for now it's where I'd like to discuss the proposed changes.\r\n\r\nWe'll also use this PR for managing the actual changes to the driver, OK?","created_at":"2016-01-09T16:08:34Z","updated_at":"2016-01-09T17:39:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c4dfe1d4515f851df0858ad647e634f0474aa59","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/pulls/23/commits","review_comments_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/pulls/23/comments","review_comment_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/issues/23/comments","statuses_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/statuses/7ba5f45fd9265a9183ebb57dedfe0c59453ff107","head":{"label":"rhempel:tacho-driver-update","ref":"tacho-driver-update","sha":"7ba5f45fd9265a9183ebb57dedfe0c59453ff107","user":{"login":"rhempel","id":5571620,"avatar_url":"https://avatars.githubusercontent.com/u/5571620?v=3","gravatar_id":"","url":"https://api.github.com/users/rhempel","html_url":"https://github.com/rhempel","followers_url":"https://api.github.com/users/rhempel/followers","following_url":"https://api.github.com/users/rhempel/following{/other_user}","gists_url":"https://api.github.com/users/rhempel/gists{/gist_id}","starred_url":"https://api.github.com/users/rhempel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhempel/subscriptions","organizations_url":"https://api.github.com/users/rhempel/orgs","repos_url":"https://api.github.com/users/rhempel/repos","events_url":"https://api.github.com/users/rhempel/events{/privacy}","received_events_url":"https://api.github.com/users/rhempel/received_events","type":"User","site_admin":false},"repo":{"id":49237571,"name":"lego-linux-drivers","full_name":"rhempel/lego-linux-drivers","owner":{"login":"rhempel","id":5571620,"avatar_url":"https://avatars.githubusercontent.com/u/5571620?v=3","gravatar_id":"","url":"https://api.github.com/users/rhempel","html_url":"https://github.com/rhempel","followers_url":"https://api.github.com/users/rhempel/followers","following_url":"https://api.github.com/users/rhempel/following{/other_user}","gists_url":"https://api.github.com/users/rhempel/gists{/gist_id}","starred_url":"https://api.github.com/users/rhempel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhempel/subscriptions","organizations_url":"https://api.github.com/users/rhempel/orgs","repos_url":"https://api.github.com/users/rhempel/repos","events_url":"https://api.github.com/users/rhempel/events{/privacy}","received_events_url":"https://api.github.com/users/rhempel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rhempel/lego-linux-drivers","description":"LEGO MINDSTORMS and LEGO WeDo drivers for Linux from the ev3dev project","fork":true,"url":"https://api.github.com/repos/rhempel/lego-linux-drivers","forks_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/forks","keys_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/teams","hooks_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/hooks","issue_events_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/issues/events{/number}","events_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/events","assignees_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/assignees{/user}","branches_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/branches{/branch}","tags_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/tags","blobs_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/git/refs{/sha}","trees_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/statuses/{sha}","languages_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/languages","stargazers_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/stargazers","contributors_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/contributors","subscribers_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/subscribers","subscription_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/subscription","commits_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/commits{/sha}","git_commits_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/git/commits{/sha}","comments_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/comments{/number}","issue_comment_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/issues/comments{/number}","contents_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/contents/{+path}","compare_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/merges","archive_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/downloads","issues_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/issues{/number}","pulls_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/pulls{/number}","milestones_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/milestones{/number}","notifications_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/labels{/name}","releases_url":"https://api.github.com/repos/rhempel/lego-linux-drivers/releases{/id}","created_at":"2016-01-07T23:40:16Z","updated_at":"2016-01-07T23:40:17Z","pushed_at":"2016-01-09T16:06:15Z","git_url":"git://github.com/rhempel/lego-linux-drivers.git","ssh_url":"git@github.com:rhempel/lego-linux-drivers.git","clone_url":"https://github.com/rhempel/lego-linux-drivers.git","svn_url":"https://github.com/rhempel/lego-linux-drivers","homepage":"http://www.ev3dev.org","size":1156,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ev3dev:master","ref":"master","sha":"60e10e00b0c11a004fcfc638b7f9617b8c0b6523","user":{"login":"ev3dev","id":6878323,"avatar_url":"https://avatars.githubusercontent.com/u/6878323?v=3","gravatar_id":"","url":"https://api.github.com/users/ev3dev","html_url":"https://github.com/ev3dev","followers_url":"https://api.github.com/users/ev3dev/followers","following_url":"https://api.github.com/users/ev3dev/following{/other_user}","gists_url":"https://api.github.com/users/ev3dev/gists{/gist_id}","starred_url":"https://api.github.com/users/ev3dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev3dev/subscriptions","organizations_url":"https://api.github.com/users/ev3dev/orgs","repos_url":"https://api.github.com/users/ev3dev/repos","events_url":"https://api.github.com/users/ev3dev/events{/privacy}","received_events_url":"https://api.github.com/users/ev3dev/received_events","type":"Organization","site_admin":false},"repo":{"id":28286217,"name":"lego-linux-drivers","full_name":"ev3dev/lego-linux-drivers","owner":{"login":"ev3dev","id":6878323,"avatar_url":"https://avatars.githubusercontent.com/u/6878323?v=3","gravatar_id":"","url":"https://api.github.com/users/ev3dev","html_url":"https://github.com/ev3dev","followers_url":"https://api.github.com/users/ev3dev/followers","following_url":"https://api.github.com/users/ev3dev/following{/other_user}","gists_url":"https://api.github.com/users/ev3dev/gists{/gist_id}","starred_url":"https://api.github.com/users/ev3dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev3dev/subscriptions","organizations_url":"https://api.github.com/users/ev3dev/orgs","repos_url":"https://api.github.com/users/ev3dev/repos","events_url":"https://api.github.com/users/ev3dev/events{/privacy}","received_events_url":"https://api.github.com/users/ev3dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ev3dev/lego-linux-drivers","description":"LEGO MINDSTORMS and LEGO WeDo drivers for Linux from the ev3dev project","fork":false,"url":"https://api.github.com/repos/ev3dev/lego-linux-drivers","forks_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/forks","keys_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/teams","hooks_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/hooks","issue_events_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/issues/events{/number}","events_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/events","assignees_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/assignees{/user}","branches_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/branches{/branch}","tags_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/tags","blobs_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/git/refs{/sha}","trees_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/statuses/{sha}","languages_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/languages","stargazers_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/stargazers","contributors_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/contributors","subscribers_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/subscribers","subscription_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/subscription","commits_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/commits{/sha}","git_commits_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/git/commits{/sha}","comments_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/comments{/number}","issue_comment_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/issues/comments{/number}","contents_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/contents/{+path}","compare_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/merges","archive_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/downloads","issues_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/issues{/number}","pulls_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/pulls{/number}","milestones_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/milestones{/number}","notifications_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/labels{/name}","releases_url":"https://api.github.com/repos/ev3dev/lego-linux-drivers/releases{/id}","created_at":"2014-12-21T02:41:32Z","updated_at":"2015-12-18T23:49:20Z","pushed_at":"2016-01-09T16:08:34Z","git_url":"git://github.com/ev3dev/lego-linux-drivers.git","ssh_url":"git@github.com:ev3dev/lego-linux-drivers.git","clone_url":"https://github.com/ev3dev/lego-linux-drivers.git","svn_url":"https://github.com/ev3dev/lego-linux-drivers","homepage":"http://www.ev3dev.org","size":1161,"stargazers_count":13,"watchers_count":13,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":1,"forks":21,"open_issues":1,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ev3dev/lego-linux-drivers/pulls/23"},"html":{"href":"https://github.com/ev3dev/lego-linux-drivers/pull/23"},"issue":{"href":"https://api.github.com/repos/ev3dev/lego-linux-drivers/issues/23"},"comments":{"href":"https://api.github.com/repos/ev3dev/lego-linux-drivers/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/ev3dev/lego-linux-drivers/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/ev3dev/lego-linux-drivers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ev3dev/lego-linux-drivers/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/ev3dev/lego-linux-drivers/statuses/7ba5f45fd9265a9183ebb57dedfe0c59453ff107"}}}}