{"action":"created","comment":{"url":"https://api.github.com/repos/orwell-int/robots/pulls/comments/42164536","id":42164536,"diff_hunk":"@@ -0,0 +1,81 @@\n+package orwell.tank;\n+\n+import lejos.nxt.I2CPort;\n+import lejos.nxt.NXTMotor;\n+import orwell.tank.config.TankFileBom;\n+import orwell.tank.elements.*;\n+\n+import java.util.ArrayList;\n+\n+\n+/**\n+ * Created by Michaël Ludmann on 6/10/15.\n+ */\n+public class Tank {\n+    private final lejos.nxt.TachoMotorPort leftMotorPort;\n+    private final lejos.nxt.TachoMotorPort rightMotorPort;\n+    private final I2CPort rfidPort;\n+    private final DisplayScreen displayScreen;\n+    private final IDrivingTracks drivingTracks;\n+    private final RfidFlagSensor rfidFlagSensor;\n+    private final SoundSpeaker soundSpeaker;\n+    private String bluetoothName;\n+    private String routingId;\n+    private ArrayList<ISensor> sensors;\n+    private EnumConnectionState connectionState;\n+    private volatile boolean isTankAlive = false;\n+\n+    public Tank(TankFileBom tankFileBom) {\n+//        this.drivingTracks = new DrivingTracksRegulated(\n+//                new NXTRegulatedMotor(MOTOR_PORT_LEFT),\n+//                new NXTRegulatedMotor(rightMotorPort));\n+        this.leftMotorPort = tankFileBom.getLeftMortPort();\n+        this.rightMotorPort = tankFileBom.getRightMotorPort();\n+        this.rfidPort = tankFileBom.getRfidSensorPort();\n+        this.drivingTracks = new DrivingTracksNonRegulated(\n+                new NXTMotor(leftMotorPort),\n+                new NXTMotor(rightMotorPort),\n+                tankFileBom.isLeftMotorInverted(),\n+                tankFileBom.isRightMotorInverted()\n+        );\n+        this.rfidFlagSensor = new RfidFlagSensor(rfidPort);\n+        sensors = new ArrayList<>();\n+        sensors.add(rfidFlagSensor);\n+        this.soundSpeaker = new SoundSpeaker();\n+        this.displayScreen = new DisplayScreen();\n+        setConnectionState(EnumConnectionState.NOT_CONNECTED);\n+    }\n+\n+    public void accept(final ITankVisitor visitor) {","path":"robots-module/src/main/java/orwell/tank/Tank.java","position":49,"original_position":49,"commit_id":"0d5b200c1ee669a6ffe29988cc06767a3c6379ed","original_commit_id":"0d5b200c1ee669a6ffe29988cc06767a3c6379ed","user":{"login":"dchilot","id":2634447,"avatar_url":"https://avatars.githubusercontent.com/u/2634447?v=3","gravatar_id":"","url":"https://api.github.com/users/dchilot","html_url":"https://github.com/dchilot","followers_url":"https://api.github.com/users/dchilot/followers","following_url":"https://api.github.com/users/dchilot/following{/other_user}","gists_url":"https://api.github.com/users/dchilot/gists{/gist_id}","starred_url":"https://api.github.com/users/dchilot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchilot/subscriptions","organizations_url":"https://api.github.com/users/dchilot/orgs","repos_url":"https://api.github.com/users/dchilot/repos","events_url":"https://api.github.com/users/dchilot/events{/privacy}","received_events_url":"https://api.github.com/users/dchilot/received_events","type":"User","site_admin":false},"body":"I really have something against the visitor pattern ...\r\nWhat happens here seems a mystery to me.","created_at":"2015-10-15T18:50:20Z","updated_at":"2015-10-15T18:50:20Z","html_url":"https://github.com/orwell-int/robots/pull/2#discussion_r42164536","pull_request_url":"https://api.github.com/repos/orwell-int/robots/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/orwell-int/robots/pulls/comments/42164536"},"html":{"href":"https://github.com/orwell-int/robots/pull/2#discussion_r42164536"},"pull_request":{"href":"https://api.github.com/repos/orwell-int/robots/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/orwell-int/robots/pulls/2","id":47350481,"html_url":"https://github.com/orwell-int/robots/pull/2","diff_url":"https://github.com/orwell-int/robots/pull/2.diff","patch_url":"https://github.com/orwell-int/robots/pull/2.patch","issue_url":"https://api.github.com/repos/orwell-int/robots/issues/2","number":2,"state":"open","locked":false,"title":"Feature/ready tank","user":{"login":"miludmann","id":4282356,"avatar_url":"https://avatars.githubusercontent.com/u/4282356?v=3","gravatar_id":"","url":"https://api.github.com/users/miludmann","html_url":"https://github.com/miludmann","followers_url":"https://api.github.com/users/miludmann/followers","following_url":"https://api.github.com/users/miludmann/following{/other_user}","gists_url":"https://api.github.com/users/miludmann/gists{/gist_id}","starred_url":"https://api.github.com/users/miludmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miludmann/subscriptions","organizations_url":"https://api.github.com/users/miludmann/orgs","repos_url":"https://api.github.com/users/miludmann/repos","events_url":"https://api.github.com/users/miludmann/events{/privacy}","received_events_url":"https://api.github.com/users/miludmann/received_events","type":"User","site_admin":false},"body":"Totally rewritten code of the tank.\r\nNew unit message parser, new game states handling, parsing of .ini conf at start of the program, separates classes for motors, rfid, sounds, display, etc.\r\nSome tests also added (yet clearly not enough, because of hardware interference, it is not an easy matter).","created_at":"2015-10-10T17:57:38Z","updated_at":"2015-10-15T18:50:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"657c98bf9673542c809a51d2ca83b9b4d8dad00b","assignee":{"login":"dchilot","id":2634447,"avatar_url":"https://avatars.githubusercontent.com/u/2634447?v=3","gravatar_id":"","url":"https://api.github.com/users/dchilot","html_url":"https://github.com/dchilot","followers_url":"https://api.github.com/users/dchilot/followers","following_url":"https://api.github.com/users/dchilot/following{/other_user}","gists_url":"https://api.github.com/users/dchilot/gists{/gist_id}","starred_url":"https://api.github.com/users/dchilot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchilot/subscriptions","organizations_url":"https://api.github.com/users/dchilot/orgs","repos_url":"https://api.github.com/users/dchilot/repos","events_url":"https://api.github.com/users/dchilot/events{/privacy}","received_events_url":"https://api.github.com/users/dchilot/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/orwell-int/robots/pulls/2/commits","review_comments_url":"https://api.github.com/repos/orwell-int/robots/pulls/2/comments","review_comment_url":"https://api.github.com/repos/orwell-int/robots/pulls/comments{/number}","comments_url":"https://api.github.com/repos/orwell-int/robots/issues/2/comments","statuses_url":"https://api.github.com/repos/orwell-int/robots/statuses/0d5b200c1ee669a6ffe29988cc06767a3c6379ed","head":{"label":"miludmann:feature/readyTank","ref":"feature/readyTank","sha":"0d5b200c1ee669a6ffe29988cc06767a3c6379ed","user":{"login":"miludmann","id":4282356,"avatar_url":"https://avatars.githubusercontent.com/u/4282356?v=3","gravatar_id":"","url":"https://api.github.com/users/miludmann","html_url":"https://github.com/miludmann","followers_url":"https://api.github.com/users/miludmann/followers","following_url":"https://api.github.com/users/miludmann/following{/other_user}","gists_url":"https://api.github.com/users/miludmann/gists{/gist_id}","starred_url":"https://api.github.com/users/miludmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miludmann/subscriptions","organizations_url":"https://api.github.com/users/miludmann/orgs","repos_url":"https://api.github.com/users/miludmann/repos","events_url":"https://api.github.com/users/miludmann/events{/privacy}","received_events_url":"https://api.github.com/users/miludmann/received_events","type":"User","site_admin":false},"repo":{"id":37052094,"name":"robots","full_name":"miludmann/robots","owner":{"login":"miludmann","id":4282356,"avatar_url":"https://avatars.githubusercontent.com/u/4282356?v=3","gravatar_id":"","url":"https://api.github.com/users/miludmann","html_url":"https://github.com/miludmann","followers_url":"https://api.github.com/users/miludmann/followers","following_url":"https://api.github.com/users/miludmann/following{/other_user}","gists_url":"https://api.github.com/users/miludmann/gists{/gist_id}","starred_url":"https://api.github.com/users/miludmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miludmann/subscriptions","organizations_url":"https://api.github.com/users/miludmann/orgs","repos_url":"https://api.github.com/users/miludmann/repos","events_url":"https://api.github.com/users/miludmann/events{/privacy}","received_events_url":"https://api.github.com/users/miludmann/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/miludmann/robots","description":"What is actually running on the NXT robots","fork":true,"url":"https://api.github.com/repos/miludmann/robots","forks_url":"https://api.github.com/repos/miludmann/robots/forks","keys_url":"https://api.github.com/repos/miludmann/robots/keys{/key_id}","collaborators_url":"https://api.github.com/repos/miludmann/robots/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/miludmann/robots/teams","hooks_url":"https://api.github.com/repos/miludmann/robots/hooks","issue_events_url":"https://api.github.com/repos/miludmann/robots/issues/events{/number}","events_url":"https://api.github.com/repos/miludmann/robots/events","assignees_url":"https://api.github.com/repos/miludmann/robots/assignees{/user}","branches_url":"https://api.github.com/repos/miludmann/robots/branches{/branch}","tags_url":"https://api.github.com/repos/miludmann/robots/tags","blobs_url":"https://api.github.com/repos/miludmann/robots/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/miludmann/robots/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/miludmann/robots/git/refs{/sha}","trees_url":"https://api.github.com/repos/miludmann/robots/git/trees{/sha}","statuses_url":"https://api.github.com/repos/miludmann/robots/statuses/{sha}","languages_url":"https://api.github.com/repos/miludmann/robots/languages","stargazers_url":"https://api.github.com/repos/miludmann/robots/stargazers","contributors_url":"https://api.github.com/repos/miludmann/robots/contributors","subscribers_url":"https://api.github.com/repos/miludmann/robots/subscribers","subscription_url":"https://api.github.com/repos/miludmann/robots/subscription","commits_url":"https://api.github.com/repos/miludmann/robots/commits{/sha}","git_commits_url":"https://api.github.com/repos/miludmann/robots/git/commits{/sha}","comments_url":"https://api.github.com/repos/miludmann/robots/comments{/number}","issue_comment_url":"https://api.github.com/repos/miludmann/robots/issues/comments{/number}","contents_url":"https://api.github.com/repos/miludmann/robots/contents/{+path}","compare_url":"https://api.github.com/repos/miludmann/robots/compare/{base}...{head}","merges_url":"https://api.github.com/repos/miludmann/robots/merges","archive_url":"https://api.github.com/repos/miludmann/robots/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/miludmann/robots/downloads","issues_url":"https://api.github.com/repos/miludmann/robots/issues{/number}","pulls_url":"https://api.github.com/repos/miludmann/robots/pulls{/number}","milestones_url":"https://api.github.com/repos/miludmann/robots/milestones{/number}","notifications_url":"https://api.github.com/repos/miludmann/robots/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/miludmann/robots/labels{/name}","releases_url":"https://api.github.com/repos/miludmann/robots/releases{/id}","created_at":"2015-06-08T07:25:05Z","updated_at":"2015-06-08T07:25:06Z","pushed_at":"2015-10-10T17:56:23Z","git_url":"git://github.com/miludmann/robots.git","ssh_url":"git@github.com:miludmann/robots.git","clone_url":"https://github.com/miludmann/robots.git","svn_url":"https://github.com/miludmann/robots","homepage":null,"size":208,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"orwell-int:master","ref":"master","sha":"898bcfb586c442dfdb434c8265561d3aad0f9dab","user":{"login":"orwell-int","id":4205279,"avatar_url":"https://avatars.githubusercontent.com/u/4205279?v=3","gravatar_id":"","url":"https://api.github.com/users/orwell-int","html_url":"https://github.com/orwell-int","followers_url":"https://api.github.com/users/orwell-int/followers","following_url":"https://api.github.com/users/orwell-int/following{/other_user}","gists_url":"https://api.github.com/users/orwell-int/gists{/gist_id}","starred_url":"https://api.github.com/users/orwell-int/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orwell-int/subscriptions","organizations_url":"https://api.github.com/users/orwell-int/orgs","repos_url":"https://api.github.com/users/orwell-int/repos","events_url":"https://api.github.com/users/orwell-int/events{/privacy}","received_events_url":"https://api.github.com/users/orwell-int/received_events","type":"Organization","site_admin":false},"repo":{"id":27644892,"name":"robots","full_name":"orwell-int/robots","owner":{"login":"orwell-int","id":4205279,"avatar_url":"https://avatars.githubusercontent.com/u/4205279?v=3","gravatar_id":"","url":"https://api.github.com/users/orwell-int","html_url":"https://github.com/orwell-int","followers_url":"https://api.github.com/users/orwell-int/followers","following_url":"https://api.github.com/users/orwell-int/following{/other_user}","gists_url":"https://api.github.com/users/orwell-int/gists{/gist_id}","starred_url":"https://api.github.com/users/orwell-int/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orwell-int/subscriptions","organizations_url":"https://api.github.com/users/orwell-int/orgs","repos_url":"https://api.github.com/users/orwell-int/repos","events_url":"https://api.github.com/users/orwell-int/events{/privacy}","received_events_url":"https://api.github.com/users/orwell-int/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/orwell-int/robots","description":"What is actually running on the NXT robots","fork":false,"url":"https://api.github.com/repos/orwell-int/robots","forks_url":"https://api.github.com/repos/orwell-int/robots/forks","keys_url":"https://api.github.com/repos/orwell-int/robots/keys{/key_id}","collaborators_url":"https://api.github.com/repos/orwell-int/robots/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/orwell-int/robots/teams","hooks_url":"https://api.github.com/repos/orwell-int/robots/hooks","issue_events_url":"https://api.github.com/repos/orwell-int/robots/issues/events{/number}","events_url":"https://api.github.com/repos/orwell-int/robots/events","assignees_url":"https://api.github.com/repos/orwell-int/robots/assignees{/user}","branches_url":"https://api.github.com/repos/orwell-int/robots/branches{/branch}","tags_url":"https://api.github.com/repos/orwell-int/robots/tags","blobs_url":"https://api.github.com/repos/orwell-int/robots/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/orwell-int/robots/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/orwell-int/robots/git/refs{/sha}","trees_url":"https://api.github.com/repos/orwell-int/robots/git/trees{/sha}","statuses_url":"https://api.github.com/repos/orwell-int/robots/statuses/{sha}","languages_url":"https://api.github.com/repos/orwell-int/robots/languages","stargazers_url":"https://api.github.com/repos/orwell-int/robots/stargazers","contributors_url":"https://api.github.com/repos/orwell-int/robots/contributors","subscribers_url":"https://api.github.com/repos/orwell-int/robots/subscribers","subscription_url":"https://api.github.com/repos/orwell-int/robots/subscription","commits_url":"https://api.github.com/repos/orwell-int/robots/commits{/sha}","git_commits_url":"https://api.github.com/repos/orwell-int/robots/git/commits{/sha}","comments_url":"https://api.github.com/repos/orwell-int/robots/comments{/number}","issue_comment_url":"https://api.github.com/repos/orwell-int/robots/issues/comments{/number}","contents_url":"https://api.github.com/repos/orwell-int/robots/contents/{+path}","compare_url":"https://api.github.com/repos/orwell-int/robots/compare/{base}...{head}","merges_url":"https://api.github.com/repos/orwell-int/robots/merges","archive_url":"https://api.github.com/repos/orwell-int/robots/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/orwell-int/robots/downloads","issues_url":"https://api.github.com/repos/orwell-int/robots/issues{/number}","pulls_url":"https://api.github.com/repos/orwell-int/robots/pulls{/number}","milestones_url":"https://api.github.com/repos/orwell-int/robots/milestones{/number}","notifications_url":"https://api.github.com/repos/orwell-int/robots/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/orwell-int/robots/labels{/name}","releases_url":"https://api.github.com/repos/orwell-int/robots/releases{/id}","created_at":"2014-12-06T18:45:31Z","updated_at":"2015-01-18T18:20:31Z","pushed_at":"2015-10-10T17:57:38Z","git_url":"git://github.com/orwell-int/robots.git","ssh_url":"git@github.com:orwell-int/robots.git","clone_url":"https://github.com/orwell-int/robots.git","svn_url":"https://github.com/orwell-int/robots","homepage":null,"size":213,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/orwell-int/robots/pulls/2"},"html":{"href":"https://github.com/orwell-int/robots/pull/2"},"issue":{"href":"https://api.github.com/repos/orwell-int/robots/issues/2"},"comments":{"href":"https://api.github.com/repos/orwell-int/robots/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/orwell-int/robots/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/orwell-int/robots/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/orwell-int/robots/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/orwell-int/robots/statuses/0d5b200c1ee669a6ffe29988cc06767a3c6379ed"}}}}