{"action":"created","comment":{"url":"https://api.github.com/repos/Smoothieware/Smoothieware/pulls/comments/212250590","pull_request_review_id":148839369,"id":212250590,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjI1MDU5MA==","diff_hunk":"@@ -507,3 +516,63 @@ void ZProbe::home()\n     Gcode gc(THEKERNEL->is_grbl_mode() ? \"G28.2\" : \"G28\", &(StreamOutput::NullStream));\n     THEKERNEL->call_event(ON_GCODE_RECEIVED, &gc);\n }\n+\n+// measure repeatability of probe (M48)\n+void ZProbe::repeatability(StreamOutput *stream, int number_point, float x, float y) {\n+  bool probe_result;\n+  float mm;\n+  float sum = 0.0f, mean = 0.0f, sigma = 0.0f, min = 99999.9f, max = -99999.9f, sample[number_point];\n+  int nb_point_read = 0;\n+\n+  // some sanity checking\n+  if (number_point<0) {\n+    stream->printf(\"Wrong number point (P) !\");\n+    return;\n+  }\n+\n+  // if x or y is passed, move to the position.\n+  if (!isnan(x) || !isnan(y)) {\n+    coordinated_move(x, y, NAN, this->fast_feedrate, false);\n+  } else {\n+    // first wait for all moves to finish\n+    THEKERNEL->conveyor->wait_for_idle();\n+  }\n+\n+  // probe the bed and store result until the number point is reached or an error is occured\n+  stream->printf(\"Probe repeatability with %d sample, start sampling :\\n\", number_point);\n+  for (int i = 0; i < number_point; i++) {\n+\n+      // if not setting Z then return probe to where it started, otherwise leave it where it is\n+      probe_result = run_probe_return(mm, this->slow_feedrate, -1, false);\n+\n+      if(probe_result) {\n+        // the result is in actuator coordinates moved\n+        sample[i] = THEKERNEL->robot->from_millimeters(mm);\n+        stream->printf(\" sample %d, Z=%1.4f\\n\", i, sample[i]);\n+        nb_point_read++;\n+      } else {\n+        stream->printf(\" sample %d, can't probe !\\n\", i);\n+        break;\n+      }\n+\n+  }\n+\n+  // compute mean for the probed value\n+  sum = 0.0;","path":"src/modules/tools/zprobe/ZProbe.cpp","position":62,"original_position":62,"commit_id":"432dc0ea00eb7c7326e4ecbb98288c58fe03d38d","original_commit_id":"432dc0ea00eb7c7326e4ecbb98288c58fe03d38d","user":{"login":"wolfmanjm","id":22263,"node_id":"MDQ6VXNlcjIyMjYz","avatar_url":"https://avatars1.githubusercontent.com/u/22263?v=4","gravatar_id":"","url":"https://api.github.com/users/wolfmanjm","html_url":"https://github.com/wolfmanjm","followers_url":"https://api.github.com/users/wolfmanjm/followers","following_url":"https://api.github.com/users/wolfmanjm/following{/other_user}","gists_url":"https://api.github.com/users/wolfmanjm/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfmanjm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfmanjm/subscriptions","organizations_url":"https://api.github.com/users/wolfmanjm/orgs","repos_url":"https://api.github.com/users/wolfmanjm/repos","events_url":"https://api.github.com/users/wolfmanjm/events{/privacy}","received_events_url":"https://api.github.com/users/wolfmanjm/received_events","type":"User","site_admin":false},"body":"no 0.0F here","created_at":"2018-08-23T09:58:55Z","updated_at":"2018-08-23T09:58:55Z","html_url":"https://github.com/Smoothieware/Smoothieware/pull/1337#discussion_r212250590","pull_request_url":"https://api.github.com/repos/Smoothieware/Smoothieware/pulls/1337","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Smoothieware/Smoothieware/pulls/comments/212250590"},"html":{"href":"https://github.com/Smoothieware/Smoothieware/pull/1337#discussion_r212250590"},"pull_request":{"href":"https://api.github.com/repos/Smoothieware/Smoothieware/pulls/1337"}}},"pull_request":{"url":"https://api.github.com/repos/Smoothieware/Smoothieware/pulls/1337","id":210287428,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMjg3NDI4","html_url":"https://github.com/Smoothieware/Smoothieware/pull/1337","diff_url":"https://github.com/Smoothieware/Smoothieware/pull/1337.diff","patch_url":"https://github.com/Smoothieware/Smoothieware/pull/1337.patch","issue_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/1337","number":1337,"state":"open","locked":false,"title":"Feature/zprobe m48","user":{"login":"manoukianv","id":10980775,"node_id":"MDQ6VXNlcjEwOTgwNzc1","avatar_url":"https://avatars3.githubusercontent.com/u/10980775?v=4","gravatar_id":"","url":"https://api.github.com/users/manoukianv","html_url":"https://github.com/manoukianv","followers_url":"https://api.github.com/users/manoukianv/followers","following_url":"https://api.github.com/users/manoukianv/following{/other_user}","gists_url":"https://api.github.com/users/manoukianv/gists{/gist_id}","starred_url":"https://api.github.com/users/manoukianv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manoukianv/subscriptions","organizations_url":"https://api.github.com/users/manoukianv/orgs","repos_url":"https://api.github.com/users/manoukianv/repos","events_url":"https://api.github.com/users/manoukianv/events{/privacy}","received_events_url":"https://api.github.com/users/manoukianv/received_events","type":"User","site_admin":false},"body":"Measure Z-Probe repeatability : implement M48 GCode function\r\n\r\n[The specification of the functionality is here](https://reprap.org/wiki/G-code#M48:_Measure_Z-Probe_repeatability)\r\nParameters implemented : \r\n- Pnnn : number of points\r\n- Xnnn : position on the X axis\r\n- Ynnn : position on the Y axis\r\nWithout parameter, do 3 points at the current position.\r\n\r\nSample used : \r\nM48 P5 X50 Y50","created_at":"2018-08-22T22:58:04Z","updated_at":"2018-08-23T09:58:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39d4b0bfe726d095a245d876575475d7fb50c528","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":299262571,"node_id":"MDU6TGFiZWwyOTkyNjI1NzE=","url":"https://api.github.com/repos/Smoothieware/Smoothieware/labels/Needs%20testing","name":"Needs testing","color":"009800","default":false},{"id":463675553,"node_id":"MDU6TGFiZWw0NjM2NzU1NTM=","url":"https://api.github.com/repos/Smoothieware/Smoothieware/labels/Requires%20review","name":"Requires review","color":"1d76db","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Smoothieware/Smoothieware/pulls/1337/commits","review_comments_url":"https://api.github.com/repos/Smoothieware/Smoothieware/pulls/1337/comments","review_comment_url":"https://api.github.com/repos/Smoothieware/Smoothieware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/1337/comments","statuses_url":"https://api.github.com/repos/Smoothieware/Smoothieware/statuses/432dc0ea00eb7c7326e4ecbb98288c58fe03d38d","head":{"label":"manoukianv:feature/zprobe_m48","ref":"feature/zprobe_m48","sha":"432dc0ea00eb7c7326e4ecbb98288c58fe03d38d","user":{"login":"manoukianv","id":10980775,"node_id":"MDQ6VXNlcjEwOTgwNzc1","avatar_url":"https://avatars3.githubusercontent.com/u/10980775?v=4","gravatar_id":"","url":"https://api.github.com/users/manoukianv","html_url":"https://github.com/manoukianv","followers_url":"https://api.github.com/users/manoukianv/followers","following_url":"https://api.github.com/users/manoukianv/following{/other_user}","gists_url":"https://api.github.com/users/manoukianv/gists{/gist_id}","starred_url":"https://api.github.com/users/manoukianv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manoukianv/subscriptions","organizations_url":"https://api.github.com/users/manoukianv/orgs","repos_url":"https://api.github.com/users/manoukianv/repos","events_url":"https://api.github.com/users/manoukianv/events{/privacy}","received_events_url":"https://api.github.com/users/manoukianv/received_events","type":"User","site_admin":false},"repo":{"id":145706781,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU3MDY3ODE=","name":"Smoothieware","full_name":"manoukianv/Smoothieware","owner":{"login":"manoukianv","id":10980775,"node_id":"MDQ6VXNlcjEwOTgwNzc1","avatar_url":"https://avatars3.githubusercontent.com/u/10980775?v=4","gravatar_id":"","url":"https://api.github.com/users/manoukianv","html_url":"https://github.com/manoukianv","followers_url":"https://api.github.com/users/manoukianv/followers","following_url":"https://api.github.com/users/manoukianv/following{/other_user}","gists_url":"https://api.github.com/users/manoukianv/gists{/gist_id}","starred_url":"https://api.github.com/users/manoukianv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manoukianv/subscriptions","organizations_url":"https://api.github.com/users/manoukianv/orgs","repos_url":"https://api.github.com/users/manoukianv/repos","events_url":"https://api.github.com/users/manoukianv/events{/privacy}","received_events_url":"https://api.github.com/users/manoukianv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manoukianv/Smoothieware","description":"Modular, opensource, high performance G-code interpreter and CNC controller written in Object-Oriented C++","fork":true,"url":"https://api.github.com/repos/manoukianv/Smoothieware","forks_url":"https://api.github.com/repos/manoukianv/Smoothieware/forks","keys_url":"https://api.github.com/repos/manoukianv/Smoothieware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manoukianv/Smoothieware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manoukianv/Smoothieware/teams","hooks_url":"https://api.github.com/repos/manoukianv/Smoothieware/hooks","issue_events_url":"https://api.github.com/repos/manoukianv/Smoothieware/issues/events{/number}","events_url":"https://api.github.com/repos/manoukianv/Smoothieware/events","assignees_url":"https://api.github.com/repos/manoukianv/Smoothieware/assignees{/user}","branches_url":"https://api.github.com/repos/manoukianv/Smoothieware/branches{/branch}","tags_url":"https://api.github.com/repos/manoukianv/Smoothieware/tags","blobs_url":"https://api.github.com/repos/manoukianv/Smoothieware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manoukianv/Smoothieware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manoukianv/Smoothieware/git/refs{/sha}","trees_url":"https://api.github.com/repos/manoukianv/Smoothieware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manoukianv/Smoothieware/statuses/{sha}","languages_url":"https://api.github.com/repos/manoukianv/Smoothieware/languages","stargazers_url":"https://api.github.com/repos/manoukianv/Smoothieware/stargazers","contributors_url":"https://api.github.com/repos/manoukianv/Smoothieware/contributors","subscribers_url":"https://api.github.com/repos/manoukianv/Smoothieware/subscribers","subscription_url":"https://api.github.com/repos/manoukianv/Smoothieware/subscription","commits_url":"https://api.github.com/repos/manoukianv/Smoothieware/commits{/sha}","git_commits_url":"https://api.github.com/repos/manoukianv/Smoothieware/git/commits{/sha}","comments_url":"https://api.github.com/repos/manoukianv/Smoothieware/comments{/number}","issue_comment_url":"https://api.github.com/repos/manoukianv/Smoothieware/issues/comments{/number}","contents_url":"https://api.github.com/repos/manoukianv/Smoothieware/contents/{+path}","compare_url":"https://api.github.com/repos/manoukianv/Smoothieware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manoukianv/Smoothieware/merges","archive_url":"https://api.github.com/repos/manoukianv/Smoothieware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manoukianv/Smoothieware/downloads","issues_url":"https://api.github.com/repos/manoukianv/Smoothieware/issues{/number}","pulls_url":"https://api.github.com/repos/manoukianv/Smoothieware/pulls{/number}","milestones_url":"https://api.github.com/repos/manoukianv/Smoothieware/milestones{/number}","notifications_url":"https://api.github.com/repos/manoukianv/Smoothieware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manoukianv/Smoothieware/labels{/name}","releases_url":"https://api.github.com/repos/manoukianv/Smoothieware/releases{/id}","deployments_url":"https://api.github.com/repos/manoukianv/Smoothieware/deployments","created_at":"2018-08-22T12:34:46Z","updated_at":"2018-08-22T12:34:50Z","pushed_at":"2018-08-23T06:59:34Z","git_url":"git://github.com/manoukianv/Smoothieware.git","ssh_url":"git@github.com:manoukianv/Smoothieware.git","clone_url":"https://github.com/manoukianv/Smoothieware.git","svn_url":"https://github.com/manoukianv/Smoothieware","homepage":"http://smoothieware.org/","size":45691,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"edge"}},"base":{"label":"Smoothieware:edge","ref":"edge","sha":"d61deecbb482ec7c9838ca42112cb45af315a874","user":{"login":"Smoothieware","id":4834224,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4MzQyMjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/4834224?v=4","gravatar_id":"","url":"https://api.github.com/users/Smoothieware","html_url":"https://github.com/Smoothieware","followers_url":"https://api.github.com/users/Smoothieware/followers","following_url":"https://api.github.com/users/Smoothieware/following{/other_user}","gists_url":"https://api.github.com/users/Smoothieware/gists{/gist_id}","starred_url":"https://api.github.com/users/Smoothieware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Smoothieware/subscriptions","organizations_url":"https://api.github.com/users/Smoothieware/orgs","repos_url":"https://api.github.com/users/Smoothieware/repos","events_url":"https://api.github.com/users/Smoothieware/events{/privacy}","received_events_url":"https://api.github.com/users/Smoothieware/received_events","type":"Organization","site_admin":false},"repo":{"id":2418744,"node_id":"MDEwOlJlcG9zaXRvcnkyNDE4NzQ0","name":"Smoothieware","full_name":"Smoothieware/Smoothieware","owner":{"login":"Smoothieware","id":4834224,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4MzQyMjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/4834224?v=4","gravatar_id":"","url":"https://api.github.com/users/Smoothieware","html_url":"https://github.com/Smoothieware","followers_url":"https://api.github.com/users/Smoothieware/followers","following_url":"https://api.github.com/users/Smoothieware/following{/other_user}","gists_url":"https://api.github.com/users/Smoothieware/gists{/gist_id}","starred_url":"https://api.github.com/users/Smoothieware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Smoothieware/subscriptions","organizations_url":"https://api.github.com/users/Smoothieware/orgs","repos_url":"https://api.github.com/users/Smoothieware/repos","events_url":"https://api.github.com/users/Smoothieware/events{/privacy}","received_events_url":"https://api.github.com/users/Smoothieware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Smoothieware/Smoothieware","description":"Modular, opensource, high performance G-code interpreter and CNC controller written in Object-Oriented C++","fork":false,"url":"https://api.github.com/repos/Smoothieware/Smoothieware","forks_url":"https://api.github.com/repos/Smoothieware/Smoothieware/forks","keys_url":"https://api.github.com/repos/Smoothieware/Smoothieware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Smoothieware/Smoothieware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Smoothieware/Smoothieware/teams","hooks_url":"https://api.github.com/repos/Smoothieware/Smoothieware/hooks","issue_events_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/events{/number}","events_url":"https://api.github.com/repos/Smoothieware/Smoothieware/events","assignees_url":"https://api.github.com/repos/Smoothieware/Smoothieware/assignees{/user}","branches_url":"https://api.github.com/repos/Smoothieware/Smoothieware/branches{/branch}","tags_url":"https://api.github.com/repos/Smoothieware/Smoothieware/tags","blobs_url":"https://api.github.com/repos/Smoothieware/Smoothieware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Smoothieware/Smoothieware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Smoothieware/Smoothieware/git/refs{/sha}","trees_url":"https://api.github.com/repos/Smoothieware/Smoothieware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Smoothieware/Smoothieware/statuses/{sha}","languages_url":"https://api.github.com/repos/Smoothieware/Smoothieware/languages","stargazers_url":"https://api.github.com/repos/Smoothieware/Smoothieware/stargazers","contributors_url":"https://api.github.com/repos/Smoothieware/Smoothieware/contributors","subscribers_url":"https://api.github.com/repos/Smoothieware/Smoothieware/subscribers","subscription_url":"https://api.github.com/repos/Smoothieware/Smoothieware/subscription","commits_url":"https://api.github.com/repos/Smoothieware/Smoothieware/commits{/sha}","git_commits_url":"https://api.github.com/repos/Smoothieware/Smoothieware/git/commits{/sha}","comments_url":"https://api.github.com/repos/Smoothieware/Smoothieware/comments{/number}","issue_comment_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/comments{/number}","contents_url":"https://api.github.com/repos/Smoothieware/Smoothieware/contents/{+path}","compare_url":"https://api.github.com/repos/Smoothieware/Smoothieware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Smoothieware/Smoothieware/merges","archive_url":"https://api.github.com/repos/Smoothieware/Smoothieware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Smoothieware/Smoothieware/downloads","issues_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues{/number}","pulls_url":"https://api.github.com/repos/Smoothieware/Smoothieware/pulls{/number}","milestones_url":"https://api.github.com/repos/Smoothieware/Smoothieware/milestones{/number}","notifications_url":"https://api.github.com/repos/Smoothieware/Smoothieware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Smoothieware/Smoothieware/labels{/name}","releases_url":"https://api.github.com/repos/Smoothieware/Smoothieware/releases{/id}","deployments_url":"https://api.github.com/repos/Smoothieware/Smoothieware/deployments","created_at":"2011-09-19T22:21:05Z","updated_at":"2018-08-21T09:51:18Z","pushed_at":"2018-08-23T06:59:37Z","git_url":"git://github.com/Smoothieware/Smoothieware.git","ssh_url":"git@github.com:Smoothieware/Smoothieware.git","clone_url":"https://github.com/Smoothieware/Smoothieware.git","svn_url":"https://github.com/Smoothieware/Smoothieware","homepage":"http://smoothieware.org/","size":45525,"stargazers_count":692,"watchers_count":692,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":671,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":671,"open_issues":20,"watchers":692,"default_branch":"edge"}},"_links":{"self":{"href":"https://api.github.com/repos/Smoothieware/Smoothieware/pulls/1337"},"html":{"href":"https://github.com/Smoothieware/Smoothieware/pull/1337"},"issue":{"href":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/1337"},"comments":{"href":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/1337/comments"},"review_comments":{"href":"https://api.github.com/repos/Smoothieware/Smoothieware/pulls/1337/comments"},"review_comment":{"href":"https://api.github.com/repos/Smoothieware/Smoothieware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Smoothieware/Smoothieware/pulls/1337/commits"},"statuses":{"href":"https://api.github.com/repos/Smoothieware/Smoothieware/statuses/432dc0ea00eb7c7326e4ecbb98288c58fe03d38d"}},"author_association":"NONE"}}
{"actor":{"display_login":"wolfmanjm"}}