-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
mavlink: include differential pressure in fields updated bit shift #9296
Conversation
@tstastny would this required any change on QGC side too? |
I don't believe so. At least I already saw the differential pressure values published on QGC before making this change. I think QGC just publishes whatever values are there without checking the "fields_updated" int. |
Ok sounds good. Thanks for the change then. |
@@ -718,7 +718,7 @@ class MavlinkStreamHighresIMU : public MavlinkStream | |||
|
|||
if (_baro_timestamp != air_data.timestamp) { | |||
/* mark last group dimensions as changed */ | |||
fields_updated |= (1 << 9) | (1 << 11) | (1 << 12); | |||
fields_updated |= (1 << 9) | (1 << 10) | (1 << 11) | (1 << 12); |
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.
Doesn't this need to be added below instead if differential_pressure updated?
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.
right -- i asked about this in the initial comment. I was only uncertain exactly how you may wish implement this -- does it then need it's own timestamp corresponding to the diff pres updated? (instead of sharing with the baro timestamp and the other three members?)
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.
Yes, duplicate the _baro_timestamp usage for differential_pressure (see a few lines below).
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.
Incorrectly marking diff_pressure field_updated.
06383f4
to
cf2dd8c
Compare
@dagar ok - made specific timestamp / field update for dpres - tested with mavros - can see numbers. |
That's weird, I'm not sure why Jenkins is unhappy. Can you rebase on current Firmware master? Once it's passing this looks good to merge. |
cf2dd8c
to
1431f19
Compare
adds differential pressure to the bit shifts on the fields_updated integer. diff pres values are already shown on QGC, but the MAVROS imu plugin has a condition with the fields_updated int before publishing new values. See mavlink/mavros#1001
Only question would be if including the bit shift within the "air_data" timestamp condition (a separate topic) is actually the most proper thing to do, or should there be a separate check specifically for the differential_pressure topic. And if so, how best to do this when "air_data" lumps all four quantities into one group?