diff --git a/nebula_hw_interfaces/src/nebula_hesai_hw_interfaces/hesai_hw_interface.cpp b/nebula_hw_interfaces/src/nebula_hesai_hw_interfaces/hesai_hw_interface.cpp index 8bfe0399f..e71366831 100644 --- a/nebula_hw_interfaces/src/nebula_hesai_hw_interfaces/hesai_hw_interface.cpp +++ b/nebula_hw_interfaces/src/nebula_hesai_hw_interfaces/hesai_hw_interface.cpp @@ -189,7 +189,7 @@ void HesaiHwInterface::ReceiveCloudPacketCallback(const std::vector & b auto now_nanosecs = std::chrono::duration_cast(now.time_since_epoch()).count(); pandar_packet.stamp.sec = static_cast(now_secs); - pandar_packet.stamp.nanosec = static_cast(now_nanosecs % 1000000000); + pandar_packet.stamp.nanosec = static_cast(now_nanosecs % 1'000'000'000); scan_cloud_ptr_->packets.emplace_back(pandar_packet); int current_phase = 0; diff --git a/nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp b/nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp index 0aa2a4d3f..35aeeec82 100644 --- a/nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp +++ b/nebula_hw_interfaces/src/nebula_velodyne_hw_interfaces/velodyne_hw_interface.cpp @@ -72,7 +72,7 @@ void VelodyneHwInterface::ReceiveCloudPacketCallback(const std::vector std::chrono::duration_cast(now.time_since_epoch()).count(); velodyne_packet.data = packet_data; velodyne_packet.stamp.sec = static_cast(now_secs); - velodyne_packet.stamp.nanosec = static_cast(now_nanosecs % 1000000000); + velodyne_packet.stamp.nanosec = static_cast(now_nanosecs % 1'000'000'000); scan_cloud_ptr_->packets.emplace_back(velodyne_packet); processed_packets_++;