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 : Add Hypersen HPS167 #23154

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

limshoonkit
Copy link

Solved Problem

Cubepilot forum and my own problem, someone in my department randomly bought some obscure sensors and I have to interface it with px4 firmware.

Solution

Added Hypersen HPS167 rangefinder driver with UART interface using CM8JL65 example as reference.

Changelog Entry

Feature: Add Hypersen HPS167 support

New parameters:

  1. SENS_HPS167_CFG
  2. SENS_HPS167_R_0

Documentation:
Need to update the doc Distance Sensors

Additional:

  1. The HPS167 also supports CAN bus; adding support for UAVCAN might be an option.
  2. There are other products in the series, such as the HPS166 and HPS167-L. May consider adding another parameter to switch support for different models of the sensor.

Datasheet can be found at
Hypersen ToF Ranging Sensor

Test coverage

Tested with Holybro Pixhawk 6C mini using firmware version 1.15.0dev at TELEM1 and TELEM2 port.
Need to disable default mavlink at TELEM1 port if enabling the sensor at TELEM1 port.

Context

Screenshot from 2024-05-17 22-50-23

hps167

hps167_qgc.mp4

@dakejahl
Copy link
Contributor

You should use the Serial class abstraction.
https://github.com/PX4/PX4-Autopilot/blob/main/platforms/common/include/px4_platform_common/Serial.hpp

See the GPS driver as an example: gps.cpp

@limshoonkit
Copy link
Author

You should use the Serial class abstraction. https://github.com/PX4/PX4-Autopilot/blob/main/platforms/common/include/px4_platform_common/Serial.hpp

See the GPS driver as an example: gps.cpp

sure, will update it

@limshoonkit limshoonkit marked this pull request as draft May 20, 2024 06:20
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.

None yet

2 participants