{"action":"created","comment":{"url":"https://api.github.com/repos/tvheadend/tvheadend/pulls/comments/241988087","pull_request_review_id":185395785,"id":241988087,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTk4ODA4Nw==","diff_hunk":"@@ -315,6 +341,49 @@ sat_angle( linuxdvb_rotor_t *lr, linuxdvb_satconf_ele_t *ls )\n  * Class methods\n  * *************************************************************************/\n \n+static int\n+linuxdvb_external_command\n+  (linuxdvb_rotor_t *lr, linuxdvb_satconf_t *ls)\n+{\n+  int outlen = -1, rd = -1;\n+  char outbuf[100];\n+  char num[10];\n+  char *argv[] = {NULL, num, NULL};\n+  int ret = -1;\n+\n+  snprintf(num, sizeof(num), \"%u\", lr->lr_position);","path":"src/input/mpegts/linuxdvb/linuxdvb_rotor.c","position":54,"original_position":54,"commit_id":"fa54c3e3b3be6af05dfbbbad42e74df7cc75563f","original_commit_id":"fa54c3e3b3be6af05dfbbbad42e74df7cc75563f","user":{"login":"ljalves","id":1659543,"node_id":"MDQ6VXNlcjE2NTk1NDM=","avatar_url":"https://avatars1.githubusercontent.com/u/1659543?v=4","gravatar_id":"","url":"https://api.github.com/users/ljalves","html_url":"https://github.com/ljalves","followers_url":"https://api.github.com/users/ljalves/followers","following_url":"https://api.github.com/users/ljalves/following{/other_user}","gists_url":"https://api.github.com/users/ljalves/gists{/gist_id}","starred_url":"https://api.github.com/users/ljalves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljalves/subscriptions","organizations_url":"https://api.github.com/users/ljalves/orgs","repos_url":"https://api.github.com/users/ljalves/repos","events_url":"https://api.github.com/users/ljalves/events{/privacy}","received_events_url":"https://api.github.com/users/ljalves/received_events","type":"User","site_admin":false},"body":"Sorry! my bad...","created_at":"2018-12-16T17:06:50Z","updated_at":"2018-12-16T17:06:50Z","html_url":"https://github.com/tvheadend/tvheadend/pull/1238#discussion_r241988087","pull_request_url":"https://api.github.com/repos/tvheadend/tvheadend/pulls/1238","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/tvheadend/tvheadend/pulls/comments/241988087"},"html":{"href":"https://github.com/tvheadend/tvheadend/pull/1238#discussion_r241988087"},"pull_request":{"href":"https://api.github.com/repos/tvheadend/tvheadend/pulls/1238"}},"in_reply_to_id":241978524},"pull_request":{"url":"https://api.github.com/repos/tvheadend/tvheadend/pulls/1238","id":238912580,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4OTEyNTgw","html_url":"https://github.com/tvheadend/tvheadend/pull/1238","diff_url":"https://github.com/tvheadend/tvheadend/pull/1238.diff","patch_url":"https://github.com/tvheadend/tvheadend/pull/1238.patch","issue_url":"https://api.github.com/repos/tvheadend/tvheadend/issues/1238","number":1238,"state":"open","locked":false,"title":"added linudvb_rotor_external to control an actuator by spawning...","user":{"login":"olivluca","id":8250980,"node_id":"MDQ6VXNlcjgyNTA5ODA=","avatar_url":"https://avatars2.githubusercontent.com/u/8250980?v=4","gravatar_id":"","url":"https://api.github.com/users/olivluca","html_url":"https://github.com/olivluca","followers_url":"https://api.github.com/users/olivluca/followers","following_url":"https://api.github.com/users/olivluca/following{/other_user}","gists_url":"https://api.github.com/users/olivluca/gists{/gist_id}","starred_url":"https://api.github.com/users/olivluca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivluca/subscriptions","organizations_url":"https://api.github.com/users/olivluca/orgs","repos_url":"https://api.github.com/users/olivluca/repos","events_url":"https://api.github.com/users/olivluca/events{/privacy}","received_events_url":"https://api.github.com/users/olivluca/received_events","type":"User","site_admin":false},"body":"...an external command.\r\n\r\nI have an old style actuator jack that I''m controlling with a parallel port, a couple of relays and an ad-hoc device driver, I'm planning to eventually control it with an arduino\r\n(see https://linuxtv.org/vdrwiki/index.php/Actuator-plugin and https://tvheadend.org/boards/5/topics/35438)\r\n\r\nThis patch adds a new kind of rotor that spawns an external command to move the dish.\r\nIn turn the command will talk to the device (or the arduino) and will print on stdout an estimated time to move the dish. The command is used both in linuxdvb_rotor_tune and linux_dvb and linuxdvb_rotor_grace (the latter because the device knows where it is and it can give a better estimate than simply calculating the time the usual way).\r\n\r\nA better option (instead of the grace time) would be to have a method to check if the dish is positioned, but I couldn't find where to add it in the tvheadend's tuning logic.\r\n\r\nAnother thing I miss is some kind of notification in the user interface (specifically the htsp client for kodi)  that the dish is moving, but that's another issue.","created_at":"2018-12-15T13:47:17Z","updated_at":"2018-12-16T17:06:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4b184ce3c9942f92a6d1c7172a42cf680db6824","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tvheadend/tvheadend/pulls/1238/commits","review_comments_url":"https://api.github.com/repos/tvheadend/tvheadend/pulls/1238/comments","review_comment_url":"https://api.github.com/repos/tvheadend/tvheadend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tvheadend/tvheadend/issues/1238/comments","statuses_url":"https://api.github.com/repos/tvheadend/tvheadend/statuses/fa54c3e3b3be6af05dfbbbad42e74df7cc75563f","head":{"label":"olivluca:feature/rotor_external","ref":"feature/rotor_external","sha":"fa54c3e3b3be6af05dfbbbad42e74df7cc75563f","user":{"login":"olivluca","id":8250980,"node_id":"MDQ6VXNlcjgyNTA5ODA=","avatar_url":"https://avatars2.githubusercontent.com/u/8250980?v=4","gravatar_id":"","url":"https://api.github.com/users/olivluca","html_url":"https://github.com/olivluca","followers_url":"https://api.github.com/users/olivluca/followers","following_url":"https://api.github.com/users/olivluca/following{/other_user}","gists_url":"https://api.github.com/users/olivluca/gists{/gist_id}","starred_url":"https://api.github.com/users/olivluca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivluca/subscriptions","organizations_url":"https://api.github.com/users/olivluca/orgs","repos_url":"https://api.github.com/users/olivluca/repos","events_url":"https://api.github.com/users/olivluca/events{/privacy}","received_events_url":"https://api.github.com/users/olivluca/received_events","type":"User","site_admin":false},"repo":{"id":161907544,"node_id":"MDEwOlJlcG9zaXRvcnkxNjE5MDc1NDQ=","name":"tvheadend","full_name":"olivluca/tvheadend","private":false,"owner":{"login":"olivluca","id":8250980,"node_id":"MDQ6VXNlcjgyNTA5ODA=","avatar_url":"https://avatars2.githubusercontent.com/u/8250980?v=4","gravatar_id":"","url":"https://api.github.com/users/olivluca","html_url":"https://github.com/olivluca","followers_url":"https://api.github.com/users/olivluca/followers","following_url":"https://api.github.com/users/olivluca/following{/other_user}","gists_url":"https://api.github.com/users/olivluca/gists{/gist_id}","starred_url":"https://api.github.com/users/olivluca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivluca/subscriptions","organizations_url":"https://api.github.com/users/olivluca/orgs","repos_url":"https://api.github.com/users/olivluca/repos","events_url":"https://api.github.com/users/olivluca/events{/privacy}","received_events_url":"https://api.github.com/users/olivluca/received_events","type":"User","site_admin":false},"html_url":"https://github.com/olivluca/tvheadend","description":"Tvheadend is a TV streaming server for Linux supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV,SAT>IP and other formats through the unix pipe as input sources.","fork":true,"url":"https://api.github.com/repos/olivluca/tvheadend","forks_url":"https://api.github.com/repos/olivluca/tvheadend/forks","keys_url":"https://api.github.com/repos/olivluca/tvheadend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/olivluca/tvheadend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/olivluca/tvheadend/teams","hooks_url":"https://api.github.com/repos/olivluca/tvheadend/hooks","issue_events_url":"https://api.github.com/repos/olivluca/tvheadend/issues/events{/number}","events_url":"https://api.github.com/repos/olivluca/tvheadend/events","assignees_url":"https://api.github.com/repos/olivluca/tvheadend/assignees{/user}","branches_url":"https://api.github.com/repos/olivluca/tvheadend/branches{/branch}","tags_url":"https://api.github.com/repos/olivluca/tvheadend/tags","blobs_url":"https://api.github.com/repos/olivluca/tvheadend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/olivluca/tvheadend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/olivluca/tvheadend/git/refs{/sha}","trees_url":"https://api.github.com/repos/olivluca/tvheadend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/olivluca/tvheadend/statuses/{sha}","languages_url":"https://api.github.com/repos/olivluca/tvheadend/languages","stargazers_url":"https://api.github.com/repos/olivluca/tvheadend/stargazers","contributors_url":"https://api.github.com/repos/olivluca/tvheadend/contributors","subscribers_url":"https://api.github.com/repos/olivluca/tvheadend/subscribers","subscription_url":"https://api.github.com/repos/olivluca/tvheadend/subscription","commits_url":"https://api.github.com/repos/olivluca/tvheadend/commits{/sha}","git_commits_url":"https://api.github.com/repos/olivluca/tvheadend/git/commits{/sha}","comments_url":"https://api.github.com/repos/olivluca/tvheadend/comments{/number}","issue_comment_url":"https://api.github.com/repos/olivluca/tvheadend/issues/comments{/number}","contents_url":"https://api.github.com/repos/olivluca/tvheadend/contents/{+path}","compare_url":"https://api.github.com/repos/olivluca/tvheadend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/olivluca/tvheadend/merges","archive_url":"https://api.github.com/repos/olivluca/tvheadend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/olivluca/tvheadend/downloads","issues_url":"https://api.github.com/repos/olivluca/tvheadend/issues{/number}","pulls_url":"https://api.github.com/repos/olivluca/tvheadend/pulls{/number}","milestones_url":"https://api.github.com/repos/olivluca/tvheadend/milestones{/number}","notifications_url":"https://api.github.com/repos/olivluca/tvheadend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/olivluca/tvheadend/labels{/name}","releases_url":"https://api.github.com/repos/olivluca/tvheadend/releases{/id}","deployments_url":"https://api.github.com/repos/olivluca/tvheadend/deployments","created_at":"2018-12-15T13:27:48Z","updated_at":"2018-12-15T13:27:54Z","pushed_at":"2018-12-15T13:32:21Z","git_url":"git://github.com/olivluca/tvheadend.git","ssh_url":"git@github.com:olivluca/tvheadend.git","clone_url":"https://github.com/olivluca/tvheadend.git","svn_url":"https://github.com/olivluca/tvheadend","homepage":"https://tvheadend.org","size":58628,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tvheadend:master","ref":"master","sha":"0db0890a4b4d1a2521009b8b5cbf058b964d9608","user":{"login":"tvheadend","id":1908588,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MDg1ODg=","avatar_url":"https://avatars3.githubusercontent.com/u/1908588?v=4","gravatar_id":"","url":"https://api.github.com/users/tvheadend","html_url":"https://github.com/tvheadend","followers_url":"https://api.github.com/users/tvheadend/followers","following_url":"https://api.github.com/users/tvheadend/following{/other_user}","gists_url":"https://api.github.com/users/tvheadend/gists{/gist_id}","starred_url":"https://api.github.com/users/tvheadend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tvheadend/subscriptions","organizations_url":"https://api.github.com/users/tvheadend/orgs","repos_url":"https://api.github.com/users/tvheadend/repos","events_url":"https://api.github.com/users/tvheadend/events{/privacy}","received_events_url":"https://api.github.com/users/tvheadend/received_events","type":"Organization","site_admin":false},"repo":{"id":1208360,"node_id":"MDEwOlJlcG9zaXRvcnkxMjA4MzYw","name":"tvheadend","full_name":"tvheadend/tvheadend","private":false,"owner":{"login":"tvheadend","id":1908588,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MDg1ODg=","avatar_url":"https://avatars3.githubusercontent.com/u/1908588?v=4","gravatar_id":"","url":"https://api.github.com/users/tvheadend","html_url":"https://github.com/tvheadend","followers_url":"https://api.github.com/users/tvheadend/followers","following_url":"https://api.github.com/users/tvheadend/following{/other_user}","gists_url":"https://api.github.com/users/tvheadend/gists{/gist_id}","starred_url":"https://api.github.com/users/tvheadend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tvheadend/subscriptions","organizations_url":"https://api.github.com/users/tvheadend/orgs","repos_url":"https://api.github.com/users/tvheadend/repos","events_url":"https://api.github.com/users/tvheadend/events{/privacy}","received_events_url":"https://api.github.com/users/tvheadend/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/tvheadend/tvheadend","description":"Tvheadend is a TV streaming server for Linux supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV,SAT>IP and other formats through the unix pipe as input sources.","fork":false,"url":"https://api.github.com/repos/tvheadend/tvheadend","forks_url":"https://api.github.com/repos/tvheadend/tvheadend/forks","keys_url":"https://api.github.com/repos/tvheadend/tvheadend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tvheadend/tvheadend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tvheadend/tvheadend/teams","hooks_url":"https://api.github.com/repos/tvheadend/tvheadend/hooks","issue_events_url":"https://api.github.com/repos/tvheadend/tvheadend/issues/events{/number}","events_url":"https://api.github.com/repos/tvheadend/tvheadend/events","assignees_url":"https://api.github.com/repos/tvheadend/tvheadend/assignees{/user}","branches_url":"https://api.github.com/repos/tvheadend/tvheadend/branches{/branch}","tags_url":"https://api.github.com/repos/tvheadend/tvheadend/tags","blobs_url":"https://api.github.com/repos/tvheadend/tvheadend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tvheadend/tvheadend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tvheadend/tvheadend/git/refs{/sha}","trees_url":"https://api.github.com/repos/tvheadend/tvheadend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tvheadend/tvheadend/statuses/{sha}","languages_url":"https://api.github.com/repos/tvheadend/tvheadend/languages","stargazers_url":"https://api.github.com/repos/tvheadend/tvheadend/stargazers","contributors_url":"https://api.github.com/repos/tvheadend/tvheadend/contributors","subscribers_url":"https://api.github.com/repos/tvheadend/tvheadend/subscribers","subscription_url":"https://api.github.com/repos/tvheadend/tvheadend/subscription","commits_url":"https://api.github.com/repos/tvheadend/tvheadend/commits{/sha}","git_commits_url":"https://api.github.com/repos/tvheadend/tvheadend/git/commits{/sha}","comments_url":"https://api.github.com/repos/tvheadend/tvheadend/comments{/number}","issue_comment_url":"https://api.github.com/repos/tvheadend/tvheadend/issues/comments{/number}","contents_url":"https://api.github.com/repos/tvheadend/tvheadend/contents/{+path}","compare_url":"https://api.github.com/repos/tvheadend/tvheadend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tvheadend/tvheadend/merges","archive_url":"https://api.github.com/repos/tvheadend/tvheadend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tvheadend/tvheadend/downloads","issues_url":"https://api.github.com/repos/tvheadend/tvheadend/issues{/number}","pulls_url":"https://api.github.com/repos/tvheadend/tvheadend/pulls{/number}","milestones_url":"https://api.github.com/repos/tvheadend/tvheadend/milestones{/number}","notifications_url":"https://api.github.com/repos/tvheadend/tvheadend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tvheadend/tvheadend/labels{/name}","releases_url":"https://api.github.com/repos/tvheadend/tvheadend/releases{/id}","deployments_url":"https://api.github.com/repos/tvheadend/tvheadend/deployments","created_at":"2010-12-30T12:45:11Z","updated_at":"2018-12-16T12:16:50Z","pushed_at":"2018-12-16T08:19:39Z","git_url":"git://github.com/tvheadend/tvheadend.git","ssh_url":"git@github.com:tvheadend/tvheadend.git","clone_url":"https://github.com/tvheadend/tvheadend.git","svn_url":"https://github.com/tvheadend/tvheadend","homepage":"https://tvheadend.org","size":58680,"stargazers_count":1373,"watchers_count":1373,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":645,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":645,"open_issues":13,"watchers":1373,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tvheadend/tvheadend/pulls/1238"},"html":{"href":"https://github.com/tvheadend/tvheadend/pull/1238"},"issue":{"href":"https://api.github.com/repos/tvheadend/tvheadend/issues/1238"},"comments":{"href":"https://api.github.com/repos/tvheadend/tvheadend/issues/1238/comments"},"review_comments":{"href":"https://api.github.com/repos/tvheadend/tvheadend/pulls/1238/comments"},"review_comment":{"href":"https://api.github.com/repos/tvheadend/tvheadend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tvheadend/tvheadend/pulls/1238/commits"},"statuses":{"href":"https://api.github.com/repos/tvheadend/tvheadend/statuses/fa54c3e3b3be6af05dfbbbad42e74df7cc75563f"}},"author_association":"NONE"}}
{"actor":{"display_login":"ljalves"}}