{"action":"created","comment":{"url":"https://api.github.com/repos/PX4/Firmware/pulls/comments/190440789","pull_request_review_id":122816563,"id":190440789,"diff_hunk":"@@ -847,6 +846,173 @@ class MavlinkStreamScaledIMU : public MavlinkStream\n \t}\n };\n \n+class MavlinkStreamScaledIMU2 : public MavlinkStream\n+{\n+public:\n+\tconst char *get_name() const\n+\t{\n+\t\treturn MavlinkStreamScaledIMU2::get_name_static();\n+\t}\n+\n+\tstatic const char *get_name_static()\n+\t{\n+\t\treturn \"SCALED_IMU2\";\n+\t}\n+\n+\tstatic uint16_t get_id_static()\n+\t{\n+\t\treturn MAVLINK_MSG_ID_SCALED_IMU2;\n+\t}\n+\n+\tuint16_t get_id()\n+\t{\n+\t\treturn get_id_static();\n+\t}\n+\n+\tstatic MavlinkStream *new_instance(Mavlink *mavlink)\n+\t{\n+\t\treturn new MavlinkStreamScaledIMU2(mavlink);\n+\t}\n+\n+\tunsigned get_size()\n+\t{\n+\t\treturn _raw_accel_sub->is_published() ? (MAVLINK_MSG_ID_SCALED_IMU2_LEN + MAVLINK_NUM_NON_PAYLOAD_BYTES) : 0;\n+\t}\n+\n+private:\n+\tMavlinkOrbSubscription *_raw_accel_sub;\n+\tMavlinkOrbSubscription *_raw_gyro_sub;\n+\tuint64_t _raw_accel_time;\n+\tuint64_t _raw_gyro_time;\n+\n+\t// do not allow top copy this class\n+\tMavlinkStreamScaledIMU2(MavlinkStreamScaledIMU2 &) = delete;\n+\tMavlinkStreamScaledIMU2 &operator = (const MavlinkStreamScaledIMU2 &) = delete;\n+\n+protected:\n+\texplicit MavlinkStreamScaledIMU2(Mavlink *mavlink) : MavlinkStream(mavlink),\n+\t\t_raw_accel_sub(_mavlink->add_orb_subscription(ORB_ID(sensor_accel))),\n+\t\t_raw_gyro_sub(_mavlink->add_orb_subscription(ORB_ID(sensor_gyro))),\n+\t\t_raw_accel_time(0),\n+\t\t_raw_gyro_time(0)\n+\t{}\n+\n+\tbool send(const hrt_abstime t)\n+\t{\n+\t\tsensor_accel_s sensor_accel = {};\n+\t\tsensor_gyro_s sensor_gyro = {};\n+\n+\t\tbool updated = false;\n+\t\tupdated |= _raw_accel_sub->update(&_raw_accel_time, &sensor_accel);\n+\t\tupdated |= _raw_gyro_sub->update(&_raw_gyro_time, &sensor_gyro);\n+\n+\t\tif (updated) {\n+\n+\t\t\tmavlink_scaled_imu2_t msg = {};\n+\n+\t\t\tmsg.time_boot_ms = sensor_accel.timestamp / 1000;\n+\t\t\tmsg.xacc = (int16_t)(sensor_accel.x_raw / CONSTANTS_ONE_G); // [milli g]\n+\t\t\tmsg.yacc = (int16_t)(sensor_accel.y_raw / CONSTANTS_ONE_G); // [milli g]\n+\t\t\tmsg.zacc = (int16_t)(sensor_accel.z_raw / CONSTANTS_ONE_G); // [milli g]\n+\t\t\tmsg.xgyro = sensor_gyro.x_raw; // [milli rad/s]\n+\t\t\tmsg.ygyro = sensor_gyro.y_raw; // [milli rad/s]\n+\t\t\tmsg.zgyro = sensor_gyro.z_raw; // [milli rad/s]\n+\t\t\tmsg.xmag = 0;\n+\t\t\tmsg.ymag = 0;\n+\t\t\tmsg.zmag = 0;\n+\n+\t\t\tmavlink_msg_scaled_imu2_send_struct(_mavlink->get_channel(), &msg);\n+\n+\t\t\treturn true;\n+\t\t}\n+\n+\t\treturn false;\n+\t}\n+};\n+class MavlinkStreamScaledIMU3 : public MavlinkStream\n+{\n+public:\n+\tconst char *get_name() const\n+\t{\n+\t\treturn MavlinkStreamScaledIMU3::get_name_static();\n+\t}\n+\n+\tstatic const char *get_name_static()\n+\t{\n+\t\treturn \"SCALED_IMU3\";\n+\t}\n+\n+\tstatic uint16_t get_id_static()\n+\t{\n+\t\treturn MAVLINK_MSG_ID_SCALED_IMU3;\n+\t}\n+\n+\tuint16_t get_id()\n+\t{\n+\t\treturn get_id_static();\n+\t}\n+\n+\tstatic MavlinkStream *new_instance(Mavlink *mavlink)\n+\t{\n+\t\treturn new MavlinkStreamScaledIMU3(mavlink);\n+\t}\n+\n+\tunsigned get_size()\n+\t{\n+\t\treturn _raw_accel_sub->is_published() ? (MAVLINK_MSG_ID_SCALED_IMU3_LEN + MAVLINK_NUM_NON_PAYLOAD_BYTES) : 0;\n+\t}\n+\n+private:\n+\tMavlinkOrbSubscription *_raw_accel_sub;\n+\tMavlinkOrbSubscription *_raw_gyro_sub;\n+\tuint64_t _raw_accel_time;\n+\tuint64_t _raw_gyro_time;\n+\n+\t// do not allow top copy this class\n+\tMavlinkStreamScaledIMU3(MavlinkStreamScaledIMU3 &) = delete;\n+\tMavlinkStreamScaledIMU3 &operator = (const MavlinkStreamScaledIMU3 &) = delete;\n+\n+protected:\n+\texplicit MavlinkStreamScaledIMU3(Mavlink *mavlink) : MavlinkStream(mavlink),\n+\t\t_raw_accel_sub(_mavlink->add_orb_subscription(ORB_ID(sensor_accel))),","path":"src/modules/mavlink/mavlink_messages.cpp","position":null,"original_position":149,"commit_id":"54c935efa692362f870c2ebd90cda772b04bb912","original_commit_id":"4fee5abcf694f978e6774f896e8d82e359ff99b6","user":{"login":"mcsauder","id":2497951,"avatar_url":"https://avatars2.githubusercontent.com/u/2497951?v=4","gravatar_id":"","url":"https://api.github.com/users/mcsauder","html_url":"https://github.com/mcsauder","followers_url":"https://api.github.com/users/mcsauder/followers","following_url":"https://api.github.com/users/mcsauder/following{/other_user}","gists_url":"https://api.github.com/users/mcsauder/gists{/gist_id}","starred_url":"https://api.github.com/users/mcsauder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcsauder/subscriptions","organizations_url":"https://api.github.com/users/mcsauder/orgs","repos_url":"https://api.github.com/users/mcsauder/repos","events_url":"https://api.github.com/users/mcsauder/events{/privacy}","received_events_url":"https://api.github.com/users/mcsauder/received_events","type":"User","site_admin":false},"body":"Fixed and pushed up. Thanks!","created_at":"2018-05-24T01:03:55Z","updated_at":"2018-05-24T01:03:56Z","html_url":"https://github.com/PX4/Firmware/pull/9520#discussion_r190440789","pull_request_url":"https://api.github.com/repos/PX4/Firmware/pulls/9520","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/comments/190440789"},"html":{"href":"https://github.com/PX4/Firmware/pull/9520#discussion_r190440789"},"pull_request":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/9520"}},"in_reply_to_id":190438957},"pull_request":{"url":"https://api.github.com/repos/PX4/Firmware/pulls/9520","id":190138107,"html_url":"https://github.com/PX4/Firmware/pull/9520","diff_url":"https://github.com/PX4/Firmware/pull/9520.diff","patch_url":"https://github.com/PX4/Firmware/pull/9520.patch","issue_url":"https://api.github.com/repos/PX4/Firmware/issues/9520","number":9520,"state":"open","locked":false,"title":"MavlinkStreamScaledIMU","user":{"login":"mcsauder","id":2497951,"avatar_url":"https://avatars2.githubusercontent.com/u/2497951?v=4","gravatar_id":"","url":"https://api.github.com/users/mcsauder","html_url":"https://github.com/mcsauder","followers_url":"https://api.github.com/users/mcsauder/followers","following_url":"https://api.github.com/users/mcsauder/following{/other_user}","gists_url":"https://api.github.com/users/mcsauder/gists{/gist_id}","starred_url":"https://api.github.com/users/mcsauder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcsauder/subscriptions","organizations_url":"https://api.github.com/users/mcsauder/orgs","repos_url":"https://api.github.com/users/mcsauder/repos","events_url":"https://api.github.com/users/mcsauder/events{/privacy}","received_events_url":"https://api.github.com/users/mcsauder/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nThis PR corrects the gyro struct type in MavlinkStreamScaledIMU and adds the missing MavlinkStreamScaledIMU2 and MavlinkStreamScaledIMU3 classes to the class definitions.\r\n\r\nIf you have any questions on this PR please let me know.\r\n\r\nThanks!\r\n\r\n-Mark","created_at":"2018-05-24T00:13:37Z","updated_at":"2018-05-24T01:03:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4725d87e4d12f0a582e25f32317b0910d6e0ba10","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PX4/Firmware/pulls/9520/commits","review_comments_url":"https://api.github.com/repos/PX4/Firmware/pulls/9520/comments","review_comment_url":"https://api.github.com/repos/PX4/Firmware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PX4/Firmware/issues/9520/comments","statuses_url":"https://api.github.com/repos/PX4/Firmware/statuses/54c935efa692362f870c2ebd90cda772b04bb912","head":{"label":"mcsauder:mavlinkMessageErrata","ref":"mavlinkMessageErrata","sha":"54c935efa692362f870c2ebd90cda772b04bb912","user":{"login":"mcsauder","id":2497951,"avatar_url":"https://avatars2.githubusercontent.com/u/2497951?v=4","gravatar_id":"","url":"https://api.github.com/users/mcsauder","html_url":"https://github.com/mcsauder","followers_url":"https://api.github.com/users/mcsauder/followers","following_url":"https://api.github.com/users/mcsauder/following{/other_user}","gists_url":"https://api.github.com/users/mcsauder/gists{/gist_id}","starred_url":"https://api.github.com/users/mcsauder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcsauder/subscriptions","organizations_url":"https://api.github.com/users/mcsauder/orgs","repos_url":"https://api.github.com/users/mcsauder/repos","events_url":"https://api.github.com/users/mcsauder/events{/privacy}","received_events_url":"https://api.github.com/users/mcsauder/received_events","type":"User","site_admin":false},"repo":{"id":124778471,"name":"Firmware","full_name":"mcsauder/Firmware","owner":{"login":"mcsauder","id":2497951,"avatar_url":"https://avatars2.githubusercontent.com/u/2497951?v=4","gravatar_id":"","url":"https://api.github.com/users/mcsauder","html_url":"https://github.com/mcsauder","followers_url":"https://api.github.com/users/mcsauder/followers","following_url":"https://api.github.com/users/mcsauder/following{/other_user}","gists_url":"https://api.github.com/users/mcsauder/gists{/gist_id}","starred_url":"https://api.github.com/users/mcsauder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcsauder/subscriptions","organizations_url":"https://api.github.com/users/mcsauder/orgs","repos_url":"https://api.github.com/users/mcsauder/repos","events_url":"https://api.github.com/users/mcsauder/events{/privacy}","received_events_url":"https://api.github.com/users/mcsauder/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mcsauder/Firmware","description":"PX4 Pro Autopilot Software","fork":true,"url":"https://api.github.com/repos/mcsauder/Firmware","forks_url":"https://api.github.com/repos/mcsauder/Firmware/forks","keys_url":"https://api.github.com/repos/mcsauder/Firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mcsauder/Firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mcsauder/Firmware/teams","hooks_url":"https://api.github.com/repos/mcsauder/Firmware/hooks","issue_events_url":"https://api.github.com/repos/mcsauder/Firmware/issues/events{/number}","events_url":"https://api.github.com/repos/mcsauder/Firmware/events","assignees_url":"https://api.github.com/repos/mcsauder/Firmware/assignees{/user}","branches_url":"https://api.github.com/repos/mcsauder/Firmware/branches{/branch}","tags_url":"https://api.github.com/repos/mcsauder/Firmware/tags","blobs_url":"https://api.github.com/repos/mcsauder/Firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mcsauder/Firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mcsauder/Firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/mcsauder/Firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mcsauder/Firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/mcsauder/Firmware/languages","stargazers_url":"https://api.github.com/repos/mcsauder/Firmware/stargazers","contributors_url":"https://api.github.com/repos/mcsauder/Firmware/contributors","subscribers_url":"https://api.github.com/repos/mcsauder/Firmware/subscribers","subscription_url":"https://api.github.com/repos/mcsauder/Firmware/subscription","commits_url":"https://api.github.com/repos/mcsauder/Firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/mcsauder/Firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/mcsauder/Firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/mcsauder/Firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/mcsauder/Firmware/contents/{+path}","compare_url":"https://api.github.com/repos/mcsauder/Firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mcsauder/Firmware/merges","archive_url":"https://api.github.com/repos/mcsauder/Firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mcsauder/Firmware/downloads","issues_url":"https://api.github.com/repos/mcsauder/Firmware/issues{/number}","pulls_url":"https://api.github.com/repos/mcsauder/Firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/mcsauder/Firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/mcsauder/Firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mcsauder/Firmware/labels{/name}","releases_url":"https://api.github.com/repos/mcsauder/Firmware/releases{/id}","deployments_url":"https://api.github.com/repos/mcsauder/Firmware/deployments","created_at":"2018-03-11T16:58:09Z","updated_at":"2018-05-19T07:21:18Z","pushed_at":"2018-05-24T01:02:51Z","git_url":"git://github.com/mcsauder/Firmware.git","ssh_url":"git@github.com:mcsauder/Firmware.git","clone_url":"https://github.com/mcsauder/Firmware.git","svn_url":"https://github.com/mcsauder/Firmware","homepage":"http://px4.io","size":94482,"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":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PX4:master","ref":"master","sha":"04cc5c5611e15bf772861fbf1d75d627256eea1d","user":{"login":"PX4","id":2096014,"avatar_url":"https://avatars3.githubusercontent.com/u/2096014?v=4","gravatar_id":"","url":"https://api.github.com/users/PX4","html_url":"https://github.com/PX4","followers_url":"https://api.github.com/users/PX4/followers","following_url":"https://api.github.com/users/PX4/following{/other_user}","gists_url":"https://api.github.com/users/PX4/gists{/gist_id}","starred_url":"https://api.github.com/users/PX4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PX4/subscriptions","organizations_url":"https://api.github.com/users/PX4/orgs","repos_url":"https://api.github.com/users/PX4/repos","events_url":"https://api.github.com/users/PX4/events{/privacy}","received_events_url":"https://api.github.com/users/PX4/received_events","type":"Organization","site_admin":false},"repo":{"id":5298790,"name":"Firmware","full_name":"PX4/Firmware","owner":{"login":"PX4","id":2096014,"avatar_url":"https://avatars3.githubusercontent.com/u/2096014?v=4","gravatar_id":"","url":"https://api.github.com/users/PX4","html_url":"https://github.com/PX4","followers_url":"https://api.github.com/users/PX4/followers","following_url":"https://api.github.com/users/PX4/following{/other_user}","gists_url":"https://api.github.com/users/PX4/gists{/gist_id}","starred_url":"https://api.github.com/users/PX4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PX4/subscriptions","organizations_url":"https://api.github.com/users/PX4/orgs","repos_url":"https://api.github.com/users/PX4/repos","events_url":"https://api.github.com/users/PX4/events{/privacy}","received_events_url":"https://api.github.com/users/PX4/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PX4/Firmware","description":"PX4 Pro Autopilot Software","fork":false,"url":"https://api.github.com/repos/PX4/Firmware","forks_url":"https://api.github.com/repos/PX4/Firmware/forks","keys_url":"https://api.github.com/repos/PX4/Firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PX4/Firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PX4/Firmware/teams","hooks_url":"https://api.github.com/repos/PX4/Firmware/hooks","issue_events_url":"https://api.github.com/repos/PX4/Firmware/issues/events{/number}","events_url":"https://api.github.com/repos/PX4/Firmware/events","assignees_url":"https://api.github.com/repos/PX4/Firmware/assignees{/user}","branches_url":"https://api.github.com/repos/PX4/Firmware/branches{/branch}","tags_url":"https://api.github.com/repos/PX4/Firmware/tags","blobs_url":"https://api.github.com/repos/PX4/Firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PX4/Firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PX4/Firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/PX4/Firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PX4/Firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/PX4/Firmware/languages","stargazers_url":"https://api.github.com/repos/PX4/Firmware/stargazers","contributors_url":"https://api.github.com/repos/PX4/Firmware/contributors","subscribers_url":"https://api.github.com/repos/PX4/Firmware/subscribers","subscription_url":"https://api.github.com/repos/PX4/Firmware/subscription","commits_url":"https://api.github.com/repos/PX4/Firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/PX4/Firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/PX4/Firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/PX4/Firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/PX4/Firmware/contents/{+path}","compare_url":"https://api.github.com/repos/PX4/Firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PX4/Firmware/merges","archive_url":"https://api.github.com/repos/PX4/Firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PX4/Firmware/downloads","issues_url":"https://api.github.com/repos/PX4/Firmware/issues{/number}","pulls_url":"https://api.github.com/repos/PX4/Firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/PX4/Firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/PX4/Firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PX4/Firmware/labels{/name}","releases_url":"https://api.github.com/repos/PX4/Firmware/releases{/id}","deployments_url":"https://api.github.com/repos/PX4/Firmware/deployments","created_at":"2012-08-04T21:19:36Z","updated_at":"2018-05-23T23:47:05Z","pushed_at":"2018-05-24T01:03:01Z","git_url":"git://github.com/PX4/Firmware.git","ssh_url":"git@github.com:PX4/Firmware.git","clone_url":"https://github.com/PX4/Firmware.git","svn_url":"https://github.com/PX4/Firmware","homepage":"http://px4.io","size":99444,"stargazers_count":1734,"watchers_count":1734,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5038,"mirror_url":null,"archived":false,"open_issues_count":427,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":5038,"open_issues":427,"watchers":1734,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/9520"},"html":{"href":"https://github.com/PX4/Firmware/pull/9520"},"issue":{"href":"https://api.github.com/repos/PX4/Firmware/issues/9520"},"comments":{"href":"https://api.github.com/repos/PX4/Firmware/issues/9520/comments"},"review_comments":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/9520/comments"},"review_comment":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/9520/commits"},"statuses":{"href":"https://api.github.com/repos/PX4/Firmware/statuses/54c935efa692362f870c2ebd90cda772b04bb912"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mcsauder"}}