{"action":"created","comment":{"url":"https://api.github.com/repos/diydrones/ardupilot/pulls/comments/33638653","id":33638653,"diff_hunk":"@@ -24,20 +24,24 @@\n #include <arpa/inet.h>\n #include \"../AP_HAL/utility/RingBuffer.h\"\n \n+#include \"UARTDevice.h\"\n+#include \"UDPDevice.h\"\n+#include \"ConsoleDevice.h\"\n+#include \"TCPClientDevice.h\"\n+#include \"TCPServerDevice.h\"\n+\n extern const AP_HAL::HAL& hal;\n \n using namespace Linux;\n \n LinuxUARTDriver::LinuxUARTDriver(bool default_console) :\n     device_path(NULL),\n-    _rd_fd(-1),\n-    _wr_fd(-1),\n     _packetise(false),\n     _flow_control(FLOW_CONTROL_DISABLE)\n {\n     if (default_console) {\n-        _rd_fd = 0;\n-        _wr_fd = 1;\n+        _device = new ConsoleDevice();","path":"libraries/AP_HAL_Linux/UARTDriver.cpp","position":24,"original_position":24,"commit_id":"e37d53453debd85b52735048424f6c4d844cdd6b","original_commit_id":"e37d53453debd85b52735048424f6c4d844cdd6b","user":{"login":"tridge","id":831867,"avatar_url":"https://avatars.githubusercontent.com/u/831867?v=3","gravatar_id":"","url":"https://api.github.com/users/tridge","html_url":"https://github.com/tridge","followers_url":"https://api.github.com/users/tridge/followers","following_url":"https://api.github.com/users/tridge/following{/other_user}","gists_url":"https://api.github.com/users/tridge/gists{/gist_id}","starred_url":"https://api.github.com/users/tridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tridge/subscriptions","organizations_url":"https://api.github.com/users/tridge/orgs","repos_url":"https://api.github.com/users/tridge/repos","events_url":"https://api.github.com/users/tridge/events{/privacy}","received_events_url":"https://api.github.com/users/tridge/received_events","type":"User","site_admin":false},"body":"it would be good to check if new failed\r\n","created_at":"2015-07-01T00:18:34Z","updated_at":"2015-07-01T00:18:34Z","html_url":"https://github.com/diydrones/ardupilot/pull/2406#discussion_r33638653","pull_request_url":"https://api.github.com/repos/diydrones/ardupilot/pulls/2406","_links":{"self":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/comments/33638653"},"html":{"href":"https://github.com/diydrones/ardupilot/pull/2406#discussion_r33638653"},"pull_request":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/2406"}}},"pull_request":{"url":"https://api.github.com/repos/diydrones/ardupilot/pulls/2406","id":37520154,"html_url":"https://github.com/diydrones/ardupilot/pull/2406","diff_url":"https://github.com/diydrones/ardupilot/pull/2406.diff","patch_url":"https://github.com/diydrones/ardupilot/pull/2406.patch","issue_url":"https://api.github.com/repos/diydrones/ardupilot/issues/2406","number":2406,"state":"open","locked":false,"title":"Linux UART driver rework","user":{"login":"staroselskii","id":4541230,"avatar_url":"https://avatars.githubusercontent.com/u/4541230?v=3","gravatar_id":"","url":"https://api.github.com/users/staroselskii","html_url":"https://github.com/staroselskii","followers_url":"https://api.github.com/users/staroselskii/followers","following_url":"https://api.github.com/users/staroselskii/following{/other_user}","gists_url":"https://api.github.com/users/staroselskii/gists{/gist_id}","starred_url":"https://api.github.com/users/staroselskii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staroselskii/subscriptions","organizations_url":"https://api.github.com/users/staroselskii/orgs","repos_url":"https://api.github.com/users/staroselskii/repos","events_url":"https://api.github.com/users/staroselskii/events{/privacy}","received_events_url":"https://api.github.com/users/staroselskii/received_events","type":"User","site_admin":false},"body":"As we all know Linux UART driver is not really a UART driver anymore. That's why I've make an effort to reimplement the driver. I encapsulated all mediums like UDP, UART and Console into several classes.\r\n\r\nThe last commit is questionable. Is there any reason to use TCP over UDP? The latter seems more preferable, doesn't it? \r\n\r\nAs a side effect of the refactoring some issues with UDP have been solved i.e the APM doesn't exit if there's no GCS available. \r\n","created_at":"2015-06-11T23:42:47Z","updated_at":"2015-07-01T00:18:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7d74957d2ead0e4f61b6c904aa5db28334dd85e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/diydrones/ardupilot/pulls/2406/commits","review_comments_url":"https://api.github.com/repos/diydrones/ardupilot/pulls/2406/comments","review_comment_url":"https://api.github.com/repos/diydrones/ardupilot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/diydrones/ardupilot/issues/2406/comments","statuses_url":"https://api.github.com/repos/diydrones/ardupilot/statuses/e37d53453debd85b52735048424f6c4d844cdd6b","head":{"label":"emlid:linux-uart-driver-factory","ref":"linux-uart-driver-factory","sha":"e37d53453debd85b52735048424f6c4d844cdd6b","user":{"login":"emlid","id":6757242,"avatar_url":"https://avatars.githubusercontent.com/u/6757242?v=3","gravatar_id":"","url":"https://api.github.com/users/emlid","html_url":"https://github.com/emlid","followers_url":"https://api.github.com/users/emlid/followers","following_url":"https://api.github.com/users/emlid/following{/other_user}","gists_url":"https://api.github.com/users/emlid/gists{/gist_id}","starred_url":"https://api.github.com/users/emlid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emlid/subscriptions","organizations_url":"https://api.github.com/users/emlid/orgs","repos_url":"https://api.github.com/users/emlid/repos","events_url":"https://api.github.com/users/emlid/events{/privacy}","received_events_url":"https://api.github.com/users/emlid/received_events","type":"Organization","site_admin":false},"repo":{"id":23183242,"name":"ardupilot","full_name":"emlid/ardupilot","owner":{"login":"emlid","id":6757242,"avatar_url":"https://avatars.githubusercontent.com/u/6757242?v=3","gravatar_id":"","url":"https://api.github.com/users/emlid","html_url":"https://github.com/emlid","followers_url":"https://api.github.com/users/emlid/followers","following_url":"https://api.github.com/users/emlid/following{/other_user}","gists_url":"https://api.github.com/users/emlid/gists{/gist_id}","starred_url":"https://api.github.com/users/emlid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emlid/subscriptions","organizations_url":"https://api.github.com/users/emlid/orgs","repos_url":"https://api.github.com/users/emlid/repos","events_url":"https://api.github.com/users/emlid/events{/privacy}","received_events_url":"https://api.github.com/users/emlid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/emlid/ardupilot","description":"APM port for Navio. Working branch is navio. Instructions are available here:","fork":true,"url":"https://api.github.com/repos/emlid/ardupilot","forks_url":"https://api.github.com/repos/emlid/ardupilot/forks","keys_url":"https://api.github.com/repos/emlid/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emlid/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emlid/ardupilot/teams","hooks_url":"https://api.github.com/repos/emlid/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/emlid/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/emlid/ardupilot/events","assignees_url":"https://api.github.com/repos/emlid/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/emlid/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/emlid/ardupilot/tags","blobs_url":"https://api.github.com/repos/emlid/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emlid/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emlid/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/emlid/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emlid/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/emlid/ardupilot/languages","stargazers_url":"https://api.github.com/repos/emlid/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/emlid/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/emlid/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/emlid/ardupilot/subscription","commits_url":"https://api.github.com/repos/emlid/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/emlid/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/emlid/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/emlid/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/emlid/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/emlid/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emlid/ardupilot/merges","archive_url":"https://api.github.com/repos/emlid/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emlid/ardupilot/downloads","issues_url":"https://api.github.com/repos/emlid/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/emlid/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/emlid/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/emlid/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emlid/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/emlid/ardupilot/releases{/id}","created_at":"2014-08-21T10:30:36Z","updated_at":"2015-06-15T08:59:14Z","pushed_at":"2015-06-29T14:31:29Z","git_url":"git://github.com/emlid/ardupilot.git","ssh_url":"git@github.com:emlid/ardupilot.git","clone_url":"https://github.com/emlid/ardupilot.git","svn_url":"https://github.com/emlid/ardupilot","homepage":"http://docs.emlid.com","size":83676,"stargazers_count":22,"watchers_count":22,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":1,"forks":15,"open_issues":1,"watchers":22,"default_branch":"master"}},"base":{"label":"diydrones:master","ref":"master","sha":"520d6cae6dd816b794b8136c3de497e11c67c552","user":{"login":"diydrones","id":3189387,"avatar_url":"https://avatars.githubusercontent.com/u/3189387?v=3","gravatar_id":"","url":"https://api.github.com/users/diydrones","html_url":"https://github.com/diydrones","followers_url":"https://api.github.com/users/diydrones/followers","following_url":"https://api.github.com/users/diydrones/following{/other_user}","gists_url":"https://api.github.com/users/diydrones/gists{/gist_id}","starred_url":"https://api.github.com/users/diydrones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diydrones/subscriptions","organizations_url":"https://api.github.com/users/diydrones/orgs","repos_url":"https://api.github.com/users/diydrones/repos","events_url":"https://api.github.com/users/diydrones/events{/privacy}","received_events_url":"https://api.github.com/users/diydrones/received_events","type":"Organization","site_admin":false},"repo":{"id":7512484,"name":"ardupilot","full_name":"diydrones/ardupilot","owner":{"login":"diydrones","id":3189387,"avatar_url":"https://avatars.githubusercontent.com/u/3189387?v=3","gravatar_id":"","url":"https://api.github.com/users/diydrones","html_url":"https://github.com/diydrones","followers_url":"https://api.github.com/users/diydrones/followers","following_url":"https://api.github.com/users/diydrones/following{/other_user}","gists_url":"https://api.github.com/users/diydrones/gists{/gist_id}","starred_url":"https://api.github.com/users/diydrones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diydrones/subscriptions","organizations_url":"https://api.github.com/users/diydrones/orgs","repos_url":"https://api.github.com/users/diydrones/repos","events_url":"https://api.github.com/users/diydrones/events{/privacy}","received_events_url":"https://api.github.com/users/diydrones/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/diydrones/ardupilot","description":"APM Plane, APM Copter, APM Rover source","fork":false,"url":"https://api.github.com/repos/diydrones/ardupilot","forks_url":"https://api.github.com/repos/diydrones/ardupilot/forks","keys_url":"https://api.github.com/repos/diydrones/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diydrones/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diydrones/ardupilot/teams","hooks_url":"https://api.github.com/repos/diydrones/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/diydrones/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/diydrones/ardupilot/events","assignees_url":"https://api.github.com/repos/diydrones/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/diydrones/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/diydrones/ardupilot/tags","blobs_url":"https://api.github.com/repos/diydrones/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diydrones/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diydrones/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/diydrones/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diydrones/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/diydrones/ardupilot/languages","stargazers_url":"https://api.github.com/repos/diydrones/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/diydrones/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/diydrones/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/diydrones/ardupilot/subscription","commits_url":"https://api.github.com/repos/diydrones/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/diydrones/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/diydrones/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/diydrones/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/diydrones/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/diydrones/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diydrones/ardupilot/merges","archive_url":"https://api.github.com/repos/diydrones/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diydrones/ardupilot/downloads","issues_url":"https://api.github.com/repos/diydrones/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/diydrones/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/diydrones/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/diydrones/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diydrones/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/diydrones/ardupilot/releases{/id}","created_at":"2013-01-09T00:58:52Z","updated_at":"2015-06-30T21:51:23Z","pushed_at":"2015-06-30T14:21:27Z","git_url":"git://github.com/diydrones/ardupilot.git","ssh_url":"git@github.com:diydrones/ardupilot.git","clone_url":"https://github.com/diydrones/ardupilot.git","svn_url":"https://github.com/diydrones/ardupilot","homepage":"http://ardupilot.com/","size":118806,"stargazers_count":1279,"watchers_count":1279,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2340,"mirror_url":null,"open_issues_count":605,"forks":2340,"open_issues":605,"watchers":1279,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/2406"},"html":{"href":"https://github.com/diydrones/ardupilot/pull/2406"},"issue":{"href":"https://api.github.com/repos/diydrones/ardupilot/issues/2406"},"comments":{"href":"https://api.github.com/repos/diydrones/ardupilot/issues/2406/comments"},"review_comments":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/2406/comments"},"review_comment":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/diydrones/ardupilot/pulls/2406/commits"},"statuses":{"href":"https://api.github.com/repos/diydrones/ardupilot/statuses/e37d53453debd85b52735048424f6c4d844cdd6b"}}}}