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

chore(hesai): enable PTP lock threshold setting for XT series sensors #265

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

mojomex
Copy link
Collaborator

@mojomex mojomex commented Feb 12, 2025

PR Type

  • Improvement

Related Links

Description

The new datasheets for the XT series also contain the SET/GET_PTP_LOCK_OFFSET command, enable it for those sensors.

Review Procedure

Test whether there is a PTC error thrown when using XT32 on its newest firmware.

Pre-Review Checklist for the PR Author

PR Author should check the checkboxes below when creating the PR.

  • Assign PR to reviewer

Checklist for the PR Reviewer

Reviewers should check the checkboxes below before approval.

  • Commits are properly organized and messages are according to the guideline
  • (Optional) Unit tests have been written for new behavior
  • PR title describes the changes

Post-Review Checklist for the PR Author

PR Author should check the checkboxes below before merging.

  • All open points are addressed and tracked via issues or tickets

CI Checks

  • Build and test for PR: Required to pass before the merge.

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 28.58%. Comparing base (44e6c88) to head (e014f74).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
.../nebula_hesai_hw_interfaces/hesai_hw_interface.cpp 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #265      +/-   ##
==========================================
- Coverage   28.89%   28.58%   -0.32%     
==========================================
  Files         105      105              
  Lines        9465     9355     -110     
  Branches     3115     2582     -533     
==========================================
- Hits         2735     2674      -61     
+ Misses       6240     6208      -32     
+ Partials      490      473      -17     
Flag Coverage Δ
differential 28.58% <0.00%> (?)
total ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@drwnz drwnz left a comment

Choose a reason for hiding this comment

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

LGTM - I haven't tested on a real sensor with old firmware what happens when set_ptp_lock_offset fails. Looks like it throws an error but should continue without issue, so approving this 👍

mojomex added a commit that referenced this pull request Feb 18, 2025
…#265)

commit e014f74
Author: Max SCHMELLER <[email protected]>
Date:   Wed Feb 12 09:52:12 2025 +0900

    chore(hesai): enable PTP lock threshold setting for XT series sensors

    Signed-off-by: Max SCHMELLER <[email protected]>

Signed-off-by: Max SCHMELLER <[email protected]>
@mojomex
Copy link
Collaborator Author

mojomex commented Feb 18, 2025

🟢 Evaluation

🟢 Works with sw_ver: 1.0.10, hw_ver: 1.0.0, control_fw_ver: 1.2.7, sensor_fw_ver: 1.5.7 on an XT32 from the end of 2022. Confirmed with Web UI.

The PTC API spec says the feature has been added in 04/2021 for sw_ver >= 0.1.25 and sw_ver >= 1.0.6 for XT16 and sw_ver >= 2.1.7 for XT32M.

Since these firmwares are ancient, it is safe to assume this feature is supported by all production-grade sensors. (If it is not supported, an exception is thrown and Nebula exits.)

@mojomex mojomex merged commit ad0e988 into main Feb 18, 2025
10 of 12 checks passed
@mojomex mojomex deleted the chore/xt32-support-ptp-lock-offset branch February 18, 2025 10:37
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.

2 participants