-
Notifications
You must be signed in to change notification settings - Fork 16.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop sending sensor offsets mavlink message #18368
Merged
tridge
merged 7 commits into
ArduPilot:master
from
peterbarker:pr/stop-sending-sensor-offsets
Aug 18, 2021
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1c4dc54
GCS_MAVLink: stop sending SENSOR_OFFSETS
peterbarker eed16fd
AntennaTracker: stop sending SENSOR_OFFSETS
peterbarker ff7a131
ArduCopter: stop sending SENSOR_OFFSETS
peterbarker d22083d
ArduPlane: stop sending SENSOR_OFFSETS
peterbarker 652a128
ArduSub: stop sending SENSOR_OFFSETS
peterbarker fe30a22
Blimp: stop sending SENSOR_OFFSETS
peterbarker 7cf0ca8
Rover: stop sending SENSOR_OFFSETS
peterbarker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -807,7 +807,6 @@ ap_message GCS_MAVLINK::mavlink_id_to_ap_message_id(const uint32_t mavlink_id) c | |
{ MAVLINK_MSG_ID_SCALED_PRESSURE, MSG_SCALED_PRESSURE}, | ||
{ MAVLINK_MSG_ID_SCALED_PRESSURE2, MSG_SCALED_PRESSURE2}, | ||
{ MAVLINK_MSG_ID_SCALED_PRESSURE3, MSG_SCALED_PRESSURE3}, | ||
{ MAVLINK_MSG_ID_SENSOR_OFFSETS, MSG_SENSOR_OFFSETS}, | ||
{ MAVLINK_MSG_ID_GPS_RAW_INT, MSG_GPS_RAW}, | ||
{ MAVLINK_MSG_ID_GPS_RTK, MSG_GPS_RTK}, | ||
{ MAVLINK_MSG_ID_GPS2_RAW, MSG_GPS2_RAW}, | ||
|
@@ -1822,39 +1821,6 @@ void GCS_MAVLINK::send_scaled_pressure3() | |
send_scaled_pressure_instance(2, mavlink_msg_scaled_pressure3_send); | ||
} | ||
|
||
void GCS_MAVLINK::send_sensor_offsets() | ||
{ | ||
const AP_InertialSensor &ins = AP::ins(); | ||
const Compass &compass = AP::compass(); | ||
|
||
// run this message at a much lower rate - otherwise it | ||
// pointlessly wastes quite a lot of bandwidth | ||
if (send_sensor_offsets_counter++ < 10) { | ||
return; | ||
} | ||
send_sensor_offsets_counter = 0; | ||
|
||
const Vector3f &mag_offsets = compass.get_offsets(0); | ||
const Vector3f &accel_offsets = ins.get_accel_offsets(0); | ||
const Vector3f &gyro_offsets = ins.get_gyro_offsets(0); | ||
|
||
const AP_Baro &barometer = AP::baro(); | ||
|
||
mavlink_msg_sensor_offsets_send(chan, | ||
mag_offsets.x, | ||
mag_offsets.y, | ||
mag_offsets.z, | ||
compass.get_declination(), | ||
barometer.get_pressure(), | ||
barometer.get_temperature()*100, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't actually available via the parameters, but it is in the scaled pressure, which is better anyways. |
||
gyro_offsets.x, | ||
gyro_offsets.y, | ||
gyro_offsets.z, | ||
accel_offsets.x, | ||
accel_offsets.y, | ||
accel_offsets.z); | ||
} | ||
|
||
void GCS_MAVLINK::send_ahrs() | ||
{ | ||
const AP_AHRS &ahrs = AP::ahrs(); | ||
|
@@ -5018,11 +4984,6 @@ bool GCS_MAVLINK::try_send_message(const enum ap_message id) | |
send_scaled_pressure3(); | ||
break; | ||
|
||
case MSG_SENSOR_OFFSETS: | ||
CHECK_PAYLOAD_SIZE(SENSOR_OFFSETS); | ||
send_sensor_offsets(); | ||
break; | ||
|
||
case MSG_SERVO_OUTPUT_RAW: | ||
CHECK_PAYLOAD_SIZE(SERVO_OUTPUT_RAW); | ||
send_servo_output_raw(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha! This defeats a lot of the scheduling/buffering code as well because it's harder to land on the right order with stuff like this confusing the buffer backoffs :P