Skip to content

Commit

Permalink
fix(hesai): set PTP lock offset only for OT128, QT128
Browse files Browse the repository at this point in the history
Signed-off-by: Max SCHMELLER <[email protected]>
  • Loading branch information
mojomex committed Dec 2, 2024
1 parent cfadb5a commit 3007f2d
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1087,13 +1087,17 @@ HesaiStatus HesaiHwInterface::check_and_set_config(
t.join();
logger_->debug("Thread finished");

uint8_t sensor_ptp_lock_threshold = get_ptp_lock_offset();
if (sensor_ptp_lock_threshold != sensor_configuration_->ptp_lock_threshold) {
NEBULA_LOG_STREAM(
logger_->info, "changing sensor PTP lock offset from "
<< static_cast<int>(sensor_ptp_lock_threshold) << " to "
<< static_cast<int>(sensor_configuration_->ptp_lock_threshold));
set_ptp_lock_offset(sensor_configuration_->ptp_lock_threshold);
if (
sensor_configuration_->sensor_model == SensorModel::HESAI_PANDAR128_E4X ||
sensor_configuration_->sensor_model == SensorModel::HESAI_PANDARQT128) {
uint8_t sensor_ptp_lock_threshold = get_ptp_lock_offset();
if (sensor_ptp_lock_threshold != sensor_configuration_->ptp_lock_threshold) {
NEBULA_LOG_STREAM(
logger_->info, "changing sensor PTP lock offset from "
<< static_cast<int>(sensor_ptp_lock_threshold) << " to "
<< static_cast<int>(sensor_configuration_->ptp_lock_threshold));
set_ptp_lock_offset(sensor_configuration_->ptp_lock_threshold);
}
}

std::this_thread::sleep_for(wait_time);
Expand Down

0 comments on commit 3007f2d

Please sign in to comment.