Skip to content
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

airspeed driver: un-advertise differential pressure topic #9147

Merged
merged 1 commit into from
Mar 23, 2018

Conversation

RomanBapst
Copy link
Contributor

@RomanBapst RomanBapst commented Mar 23, 2018

Signed-off-by: Roman [email protected]

LorenzMeier
LorenzMeier previously approved these changes Mar 23, 2018
@dagar
Copy link
Member

dagar commented Mar 23, 2018

There's already a NULL pointer check within uORB. https://github.com/PX4/Firmware/blob/master/src/modules/uORB/uORBDevices.cpp#L473

Copy link
Member

@dagar dagar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RomanBapst
Copy link
Contributor Author

@dagar I wanted to avoid people looking at that code and thinking what I'm doing is dangerous.
Looks like there was a 50 50 chance that you would complain because in about half of the cases in PX4 this check is done.

@dagar
Copy link
Member

dagar commented Mar 23, 2018

It's definitely good practice in general.

@dagar
Copy link
Member

dagar commented Mar 23, 2018

Once off it doesn't matter, but it's the kind of the thing that starts to add up across an entire codebase. Likewise for checking NULL before calling delete.

@RomanBapst
Copy link
Contributor Author

@dagar Done

@dagar dagar merged commit cc26c34 into master Mar 23, 2018
@dagar dagar deleted the pr-airspeed-unadvertise branch March 23, 2018 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants