{"action":"created","comment":{"url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/pulls/comments/100232084","pull_request_review_id":20931164,"id":100232084,"diff_hunk":"@@ -0,0 +1,131 @@\n+\n+#include <Arduino.h>\n+#include \"WiFiService.h\"\n+#include <SoftwareSerial.h>\n+\n+\n+// Create SoftwareSerial object\n+SoftwareSerial mySerial(10, 11); // RX, TX\n+\n+//Constructor\n+WiFiService::WiFiService()\n+{\n+  StringComplete = false;\n+  StringStarted = false;\n+  rxString.reserve(50);  \n+  rxString = \"Test\";\n+  SerialChar = \"\";\n+  StringLength = 0;\n+  mySerial.begin(9600);   // Set data rate for the SW serial port\n+  while (!mySerial) {;}   // wait for SW serial port to connect.\n+}\n+\n+void WiFiService::Init(bool mode)\n+{\n+  //Mode \"Wait_for_Start_Character\": Does Bidirectional communication until it sees '['-Character, then Mode \"BuildString\" is entered in teh next Main Loop.\n+  if (mode == true && !StringComplete)        {Wait_for_Start_Character();  HWtoSWSerial();}  \n+\n+  //Mode \"BuildString\": SWtoHW Communiction is inhibited and Characters are stored until ']' is seen and SWtoHW Communication is back active.\n+  //The stored String can now be provided via Get_String()\n+  if (mode == true && StringStarted == true)  {BuildString();               HWtoSWSerial();} \n+  \n+  //Mode \"Bidirectional\". Just bidirectional Mode between SW and HW Serial.","path":"code/Spikes/Class_WiFiService/WiFiService.cpp","position":32,"original_position":32,"commit_id":"524cc2095a3abfd645c0fbca3e762f431865b140","original_commit_id":"524cc2095a3abfd645c0fbca3e762f431865b140","user":{"login":"AlexanderNahr","id":24532924,"avatar_url":"https://avatars.githubusercontent.com/u/24532924?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderNahr","html_url":"https://github.com/AlexanderNahr","followers_url":"https://api.github.com/users/AlexanderNahr/followers","following_url":"https://api.github.com/users/AlexanderNahr/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderNahr/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderNahr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderNahr/subscriptions","organizations_url":"https://api.github.com/users/AlexanderNahr/orgs","repos_url":"https://api.github.com/users/AlexanderNahr/repos","events_url":"https://api.github.com/users/AlexanderNahr/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderNahr/received_events","type":"User","site_admin":false},"body":"Echt?  In Zeile 33 wird doch Bidirectional_Mode(); aufgerufen.","created_at":"2017-02-09T05:14:06Z","updated_at":"2017-02-09T05:14:40Z","html_url":"https://github.com/AlexanderNahr/arduino_team_PMES_WS2016/pull/55#discussion_r100232084","pull_request_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/pulls/comments/100232084"},"html":{"href":"https://github.com/AlexanderNahr/arduino_team_PMES_WS2016/pull/55#discussion_r100232084"},"pull_request":{"href":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/pulls/55","id":104892542,"html_url":"https://github.com/AlexanderNahr/arduino_team_PMES_WS2016/pull/55","diff_url":"https://github.com/AlexanderNahr/arduino_team_PMES_WS2016/pull/55.diff","patch_url":"https://github.com/AlexanderNahr/arduino_team_PMES_WS2016/pull/55.patch","issue_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/issues/55","number":55,"state":"open","locked":false,"title":"Branch wi fi service","user":{"login":"myhamidi","id":18073154,"avatar_url":"https://avatars.githubusercontent.com/u/18073154?v=3","gravatar_id":"","url":"https://api.github.com/users/myhamidi","html_url":"https://github.com/myhamidi","followers_url":"https://api.github.com/users/myhamidi/followers","following_url":"https://api.github.com/users/myhamidi/following{/other_user}","gists_url":"https://api.github.com/users/myhamidi/gists{/gist_id}","starred_url":"https://api.github.com/users/myhamidi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myhamidi/subscriptions","organizations_url":"https://api.github.com/users/myhamidi/orgs","repos_url":"https://api.github.com/users/myhamidi/repos","events_url":"https://api.github.com/users/myhamidi/events{/privacy}","received_events_url":"https://api.github.com/users/myhamidi/received_events","type":"User","site_admin":false},"body":"Für das WLAN Modul, habe ich eine Klasse 'WiFiService' erstellt, die als Header eingebunden werden kann. Wichtig: WiFiService.h  bindet automatisch die SoftwareSerial.h mit ein. SoftwareSerial seperat zu lassen, habe ich technisch leider nicht hinbekommen, sollte aber auch kein Problem sein, da sich alle SoftwareSerial Funktionen einfach durchschieben/routen lassen). \r\n\r\nFolgende (public) Funktionen stehen bisher zur Verfügung:\r\n- **void Init(bool mode)**; --> Damit wird die Routine aktiviert. Wenn mode = false, wird nur die Bidirektional Kommunikation aktiv, bei mode = true wird auf einen String mit [ als Start und ] als Enzeichen gewartet. Der String muss dabei nicht in einem Stück gesendet werden.\r\n- **bool String_Is_Complete();** --> Sobald der String voll ist/ endeckt wurde, gibt diese Funktion true aus\r\n- **String Get_String();** --> Diese Funktion gibt den gefundenen String aus, wenn noch kein String gefunden wurde dann \"Test\"\r\n- **void ResetString();** --> resetet den String und die Routine. Nach ResetString kann nach einem weiterem String gesucht werden\r\n\r\nDer Vorteil von einer Klasse ist wie ich finde, ist dass die gesamte Logik gekapselt in dem WiFiService Objekt steckt. Die Klasse übernimmt alle Aufgaben die irgendwie mit der WLAN Kommunikation zu zun haben. Der Code in der Main Loop beschränkt sich damit auf das Aufrufen von wenigen Funktionen.\r\n\r\nWas haltet ihr davon?\r\nProbiert es bitte mal auf der Arduino HW aus, vielleicht vermisst ihr die eine oder andere Funktion noch!\r\n","created_at":"2017-02-06T22:05:17Z","updated_at":"2017-02-09T05:14:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"23e8e0502ae5d56d0a69c9118305c71dbdf1998f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/pulls/55/commits","review_comments_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/pulls/55/comments","review_comment_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/issues/55/comments","statuses_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/statuses/524cc2095a3abfd645c0fbca3e762f431865b140","head":{"label":"AlexanderNahr:branch-WiFi-Service","ref":"branch-WiFi-Service","sha":"524cc2095a3abfd645c0fbca3e762f431865b140","user":{"login":"AlexanderNahr","id":24532924,"avatar_url":"https://avatars.githubusercontent.com/u/24532924?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderNahr","html_url":"https://github.com/AlexanderNahr","followers_url":"https://api.github.com/users/AlexanderNahr/followers","following_url":"https://api.github.com/users/AlexanderNahr/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderNahr/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderNahr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderNahr/subscriptions","organizations_url":"https://api.github.com/users/AlexanderNahr/orgs","repos_url":"https://api.github.com/users/AlexanderNahr/repos","events_url":"https://api.github.com/users/AlexanderNahr/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderNahr/received_events","type":"User","site_admin":false},"repo":{"id":76298477,"name":"arduino_team_PMES_WS2016","full_name":"AlexanderNahr/arduino_team_PMES_WS2016","owner":{"login":"AlexanderNahr","id":24532924,"avatar_url":"https://avatars.githubusercontent.com/u/24532924?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderNahr","html_url":"https://github.com/AlexanderNahr","followers_url":"https://api.github.com/users/AlexanderNahr/followers","following_url":"https://api.github.com/users/AlexanderNahr/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderNahr/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderNahr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderNahr/subscriptions","organizations_url":"https://api.github.com/users/AlexanderNahr/orgs","repos_url":"https://api.github.com/users/AlexanderNahr/repos","events_url":"https://api.github.com/users/AlexanderNahr/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderNahr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlexanderNahr/arduino_team_PMES_WS2016","description":null,"fork":false,"url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016","forks_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/forks","keys_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/teams","hooks_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/hooks","issue_events_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/issues/events{/number}","events_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/events","assignees_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/assignees{/user}","branches_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/branches{/branch}","tags_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/tags","blobs_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/statuses/{sha}","languages_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/languages","stargazers_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/stargazers","contributors_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/contributors","subscribers_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/subscribers","subscription_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/subscription","commits_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/contents/{+path}","compare_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/merges","archive_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/downloads","issues_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/issues{/number}","pulls_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/pulls{/number}","milestones_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/milestones{/number}","notifications_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/labels{/name}","releases_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/releases{/id}","deployments_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/deployments","created_at":"2016-12-12T21:48:56Z","updated_at":"2017-01-13T18:01:54Z","pushed_at":"2017-02-09T04:58:41Z","git_url":"git://github.com/AlexanderNahr/arduino_team_PMES_WS2016.git","ssh_url":"git@github.com:AlexanderNahr/arduino_team_PMES_WS2016.git","clone_url":"https://github.com/AlexanderNahr/arduino_team_PMES_WS2016.git","svn_url":"https://github.com/AlexanderNahr/arduino_team_PMES_WS2016","homepage":null,"size":410,"stargazers_count":1,"watchers_count":1,"language":"Arduino","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":15,"forks":3,"open_issues":15,"watchers":1,"default_branch":"master"}},"base":{"label":"AlexanderNahr:master","ref":"master","sha":"6714c9588298e391f410d27e236db4b61f07e8f1","user":{"login":"AlexanderNahr","id":24532924,"avatar_url":"https://avatars.githubusercontent.com/u/24532924?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderNahr","html_url":"https://github.com/AlexanderNahr","followers_url":"https://api.github.com/users/AlexanderNahr/followers","following_url":"https://api.github.com/users/AlexanderNahr/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderNahr/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderNahr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderNahr/subscriptions","organizations_url":"https://api.github.com/users/AlexanderNahr/orgs","repos_url":"https://api.github.com/users/AlexanderNahr/repos","events_url":"https://api.github.com/users/AlexanderNahr/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderNahr/received_events","type":"User","site_admin":false},"repo":{"id":76298477,"name":"arduino_team_PMES_WS2016","full_name":"AlexanderNahr/arduino_team_PMES_WS2016","owner":{"login":"AlexanderNahr","id":24532924,"avatar_url":"https://avatars.githubusercontent.com/u/24532924?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderNahr","html_url":"https://github.com/AlexanderNahr","followers_url":"https://api.github.com/users/AlexanderNahr/followers","following_url":"https://api.github.com/users/AlexanderNahr/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderNahr/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderNahr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderNahr/subscriptions","organizations_url":"https://api.github.com/users/AlexanderNahr/orgs","repos_url":"https://api.github.com/users/AlexanderNahr/repos","events_url":"https://api.github.com/users/AlexanderNahr/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderNahr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlexanderNahr/arduino_team_PMES_WS2016","description":null,"fork":false,"url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016","forks_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/forks","keys_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/teams","hooks_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/hooks","issue_events_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/issues/events{/number}","events_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/events","assignees_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/assignees{/user}","branches_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/branches{/branch}","tags_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/tags","blobs_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/statuses/{sha}","languages_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/languages","stargazers_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/stargazers","contributors_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/contributors","subscribers_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/subscribers","subscription_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/subscription","commits_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/contents/{+path}","compare_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/merges","archive_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/downloads","issues_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/issues{/number}","pulls_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/pulls{/number}","milestones_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/milestones{/number}","notifications_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/labels{/name}","releases_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/releases{/id}","deployments_url":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/deployments","created_at":"2016-12-12T21:48:56Z","updated_at":"2017-01-13T18:01:54Z","pushed_at":"2017-02-09T04:58:41Z","git_url":"git://github.com/AlexanderNahr/arduino_team_PMES_WS2016.git","ssh_url":"git@github.com:AlexanderNahr/arduino_team_PMES_WS2016.git","clone_url":"https://github.com/AlexanderNahr/arduino_team_PMES_WS2016.git","svn_url":"https://github.com/AlexanderNahr/arduino_team_PMES_WS2016","homepage":null,"size":410,"stargazers_count":1,"watchers_count":1,"language":"Arduino","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":15,"forks":3,"open_issues":15,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/pulls/55"},"html":{"href":"https://github.com/AlexanderNahr/arduino_team_PMES_WS2016/pull/55"},"issue":{"href":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/issues/55"},"comments":{"href":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/AlexanderNahr/arduino_team_PMES_WS2016/statuses/524cc2095a3abfd645c0fbca3e762f431865b140"}}}}
{"actor":{"display_login":"AlexanderNahr"}}