Skip to content

Commit

Permalink
Initial support for QT128
Browse files Browse the repository at this point in the history
Signed-off-by: amc-nu <[email protected]>
  • Loading branch information
amc-nu committed Nov 13, 2023
1 parent f71026f commit 05a3b24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions nebula_common/include/nebula_common/hesai/hesai_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ inline ReturnMode ReturnModeFromStringHesai(
case SensorModel::HESAI_PANDARXT32M:
case SensorModel::HESAI_PANDARAT128:
case SensorModel::HESAI_PANDAR128_E4X:
case SensorModel::HESAI_PANDARQT128:
if (return_mode == "Last") return ReturnMode::LAST;
if (return_mode == "Strongest") return ReturnMode::STRONGEST;
if (return_mode == "LastStrongest") return ReturnMode::DUAL_LAST_STRONGEST;
Expand Down Expand Up @@ -426,6 +427,7 @@ inline ReturnMode ReturnModeFromIntHesai(const int return_mode, const SensorMode
case SensorModel::HESAI_PANDARXT32M:
case SensorModel::HESAI_PANDARAT128:
case SensorModel::HESAI_PANDAR128_E4X:
case SensorModel::HESAI_PANDARQT128:
if (return_mode == 0) return ReturnMode::LAST;
if (return_mode == 1) return ReturnMode::STRONGEST;
if (return_mode == 2) return ReturnMode::DUAL_LAST_STRONGEST;
Expand Down Expand Up @@ -458,6 +460,7 @@ inline int IntFromReturnModeHesai(const ReturnMode return_mode, const SensorMode
case SensorModel::HESAI_PANDARXT32M:
case SensorModel::HESAI_PANDARAT128:
case SensorModel::HESAI_PANDAR128_E4X:
case SensorModel::HESAI_PANDARQT128:
if (return_mode == ReturnMode::LAST) return 0;
if (return_mode == ReturnMode::STRONGEST) return 1;
if (return_mode == ReturnMode::DUAL_LAST_STRONGEST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2986,7 +2986,8 @@ HesaiStatus HesaiHwInterface::CheckAndSetConfig(
std::this_thread::sleep_for(100ms);
}

if (sensor_configuration->sensor_model != SensorModel::HESAI_PANDARAT128){
if (sensor_configuration->sensor_model != SensorModel::HESAI_PANDARAT128
&& sensor_configuration->sensor_model != SensorModel::HESAI_PANDARQT128) {
set_flg = true;
auto sync_angle = static_cast<int>(hesai_config.sync_angle / 100);
auto scan_phase = static_cast<int>(sensor_configuration->scan_phase);
Expand Down

0 comments on commit 05a3b24

Please sign in to comment.