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

RangeFinder: allow two (or more) serial lidar to be used at the same time #7531

Closed
rmackay9 opened this issue Jan 12, 2018 · 1 comment
Closed

Comments

@rmackay9
Copy link
Contributor

We should support using two serial range finders at the same time.

The user should be able to define which two serial ports to use by setting multiple SERIALx_PROTOCOL parameters to "9" meaning "Lidar". i.e. SERIAL1_PROTOCOL = 9, SERIAL3_PROTOCOL = 9 to mean the first serial range finder should use serial port1, the 2nd should use serial port 3.

The reason that we can't currently is that our serial Lidar drivers (like the LightwareSerial driver) decide which serial port to use by asking the serial manager but it always asks for the first serial port configured for Lidar. Instead the serial lidar driver needs to know how many other serial lidar drivers have already been created and then ask for the next free serial port.

This is where the Lightware Serial driver is constructed: https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_RangeFinder/RangeFinder.cpp#L676
Serial manager: https://github.com/ArduPilot/ardupilot/tree/master/libraries/AP_SerialManager

@rmackay9
Copy link
Contributor Author

2-serial-rngfnds
Tested today with some patches from @OXINARF. looking good!

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

No branches or pull requests

2 participants