Skip to content

AP_Proximity: PROXIMITY is optional, so the number of devices can be specified #29873

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

muramura
Copy link
Contributor

PROXIMITY devices are optional.
Recently, the number of devices increased from 4 to 5.
Therefore, the number of devices will be configurable.

AFTER
Screenshot from 2025-04-24 02-19-03

BEFORE
Screenshot from 2025-04-24 02-08-05

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -28,7 +28,9 @@

#include <AP_HAL/Semaphores.h>

#define PROXIMITY_MAX_INSTANCES 5 // Maximum number of proximity sensor instances available on this platform
#ifndef PROXIMITY_MAX_INSTANCES
Copy link
Contributor

Choose a reason for hiding this comment

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

On second thoughts, I think we really should rename this before making it something someone can reasonably put in their hwdefs:

Suggested change
#ifndef PROXIMITY_MAX_INSTANCES
#ifndef AP_PROXIMITY_MAX_INSTANCES

What do you think, @muramura ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the prefix "AP_" at the beginning.

@muramura muramura force-pushed the AP_PROXIMITY_is_optional_so_the_number_of_devices_can_be_specified branch from 72a2b9d to f08ce7a Compare April 24, 2025 21:42
@muramura muramura force-pushed the AP_PROXIMITY_is_optional_so_the_number_of_devices_can_be_specified branch from f08ce7a to 73335d3 Compare April 24, 2025 21:43
Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants